Nodir Temirkhodjaev wrote: > Output on x86_64: > ===== > false test > PANIC: unprotected error in call to Lua API (test) > ===== Works for me on x86_64: $ gcc -O2 -fPIC -shared -o err.so err.c $ luajit test.lua false test false test You've probably miscompiled the C file. It looks like it's missing the unwind tables mandated by the POSIX/x64 ABI. --Mike