lua-users home
lua-l archive

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


I wrote previously:
> Any other likely causes of illegal instruction besides lj_mcode_sync()?
>
> Just compiled GDB 7.3 to see what I can find.
>
> Thanks,
> ~Jeff

Well after looking into the implementation of __kernel_sync_dicache in vdso32.so, it was pretty clear that it was not doing its job correctly...
LuaJIT died in random places since the instruction cache wasn't being flushed.

I discovered that that in linux 2.6.20.14 the __kernel_sync_dicache function was only flushing the data cache and not the instruction cache (it was broken).  After fixing it, it now fully executes the source file I give it, without the Illegal Instruction error, however after finishing it always segmentation faults.  Not sure where it is dying yet, as GDB's backtrace is complete garbage, no symbols at all, even though I've compiled with debug symbols and -O0.  

What part of the code base does LuaJIT leave the jitted machine code and jump back to the interpreter? I would like to add some debugging prints around that point to help determine where this segmentation fault is occurring. 

~Jeff