All versions of cocos2d-x embedded Luajit crash on Android

Hi,

I used lua script to complete my project. But when I set libc.debug.malloc=1 to debug memory leak, then the app can’t run on android platform.

I compiled my project, cocos2d-x, and luajit with -g, it crash in the luajit code.

And then I run the sample/Lua/TestLua/, also has the crash problem.

When I change luajit to lua5.1 and also set libc.debug.malloc=1, then the app is ok.

I have tested on following phones:
“Nexus 4, cm10.1 android 4.2.2”
“Htc Desire(G7), cm7 android 2.3.3”

With following steps can always meet the crash:

  1. adb shell setprop libc.debug.malloc 1
  2. adb shell stop (note do not use adb reboot)
  3. adb shell start
  4. adb shell getprop libc.debug.malloc (if result is 1 is ok, then try again from step one)

ok, now you can run the sample/Lua/Testlua/project.android. It could be crash.

I have tested following:
version 2.1rc0-x-2.1.3
version 2.2
version 3.0-develop (latest pulled)

bug posted at Bug #3074.

bump.