lua-users home
lua-l archive

[Date Prev][Date Next][Thread Prev][Thread Next] [Date Index] [Thread Index]


Before I begin, I'd like to mention that the same project works fine in 32-bit.

I've compiled LuaJIT 2.0.0 beta 9 (I've also used trunk, but no
difference) for 64-bit Mac, static only. The command-line tool works,
but my application crashes in luaL_newstate(), with no useful stack
trace. When single-stepping through the code, it gets as far as the
lj_vm_cpcall invocation inside lj_state_newstate; stepping over this
(since obviously I can't step INTO it) triggers EXC_BAD_ACCESS and the
debugger jumps to some other (apparently unrelated) place in the code.

I've made sure to link my final application with "-pagezero_size 10000
-image_base 100000000" but it doesn't seem to make a difference. I
don't load any dynamic libraries at runtime (that's part of the reason
I'm using Lua in the first place -- I'm tired of dealing with plugins)
so I don't THINK I need to rebase anything.

Does anyone have any suggestions on how to troubleshoot this problem?

The LuaJIT-style FFI is important to me so I'd like to avoid switching
to stock Lua if I can avoid it.

/s/ Adam