"PANIC: unprotected error in call to Lua API" in LuaJIT 2.0.0-10 on Win64 (mingw64 on Linux64)

  • From: Declan White <deco.da.man@xxxxxxxxx>
  • To: luajit@xxxxxxxxxxxxx
  • Date: Wed, 22 Aug 2012 11:18:08 +0800

Howdy,

I am compiling for 64-bit Windows 7 with:
    make TARGET_SYS=Windows CC="x86_64-w64-mingw32-gcc" HOST_CC="gcc"
on 64-bit Fedora.

Any Lua error at all causes the program to crash with the following error
message:
    PANIC: unprotected error in call to Lua API ('insert error here')

For example:
    x = "invalid"+5
    x = invalid syntax
    pcall(function() error("wat") end)

All three examples do the same thing: crash it with "luajit.exe is not
responding."

It was suggested on #lua that there is an issue with "unwinding."
Adding "XCFLAGS+=-DLUA_USE_APICHECK" and "XCFLAGS+=-DLUA_USE_ASSERT" did
nothing

I have no idea where to go from here, so any help would be appreciated.
Thanks,
Declan.

Other related posts: