[Date Prev][Date Next][Thread Prev][Thread Next]
[Date Index]
[Thread Index]
- Subject: Re: [LuaJIT] Segmentation Faults When GC'ing
- From: Mike Pall <mikelu-1204@...>
- Date: Tue, 24 Apr 2012 17:08:17 +0200
Alex wrote:
> Hi again. I'm having issues closing my server program. It's causing a
> segfault in the GC with the following backtrace:
>
> #0 0x66dcaee1 in lj_alloc_free (msp=0x2b0008, ptr=<optimized out>) at
> lj_alloc.c:1268
This looks like a buffer overrun, which corrupts the free lists of
the memory allocator. One possible cause is misuse of the FFI
(0-based vs. 1-based array mixup).
First, try using the system memory allcator, which often has some
extra debug options.
Or try Valgrind, except ...
> Win7 x64 (but compiled with -m32), compiled with asserts, debug info, and
> gdb jit stuff.
... Valgrind doesn't run on Windows.
And in fact the GDB JIT stuff only works on ELF targets, so you
might as well disable it. But I don't think it should cause a
crash, except when GDB tries to access the JIT symbols. The bogus
notifications from GDB in your other message indicate it doesn't
handle that very well.
--Mike