lua-users home
lua-l archive

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

Hi, list!

OS X 10.5.3, i686-apple-darwin9-gcc-4.0.1, gdb 6.3.50-20050815
Lua 5.1.3 with several third-party modules, all built as C++.

In my application after Lua error I sometimes (in roughly one of five
runs) get a segfault on lua_close() in module unload.

Lua-related part of the stack trace:

#0  0x8fe1d10a in __dyld_munmap$UNIX2003 ()
#1  0x8fe13a03 in __dyld__ZN16ImageLoaderMachOD0Ev ()
#2  0x8fe03206 in __dyld__ZN4dyld20garbageCollectImagesEv ()
#3  0x8fe0bd46 in __dyld_dlclose ()
#4  0x97197bae in dlclose ()
#5  0x00fcbcdf in gctm (L=0x0) at src/loadlib.c:64
#6  0x00fc2bdf in luaD_precall (L=0x1228d80, func=0x18cf20c,
nresults=0) at src/ldo.c:319
#7  0x00fc3173 in luaD_call (L=0x1209f00, func=0x18cf20c, nResults=0)
at src/ldo.c:376
#8  0x00fc5766 in GCTM (L=0x1209f00) at src/lgc.c:467
#9  0x00fc57e8 in luaC_callGCTM (L=0x1209f00) at src/lgc.c:479
#10 0x00fc1a8a in luaD_rawrunprotected (L=0x1209f00, f=0xfd2900
<callallgcTM>, ud=0x0) at src/ldo.c:116
#11 0x00fd298e in lua_close (L=0x1209f00) at src/lstate.c:205

If I build Lua and my application with -DLUA_USE_APICHECK and
-Dlua_assert=assert I still get the same segfault. I have checked my
application against multiple links to lua shared library, and found

I'd like to know at least which module crashes. Any advice on the best
way to get this info?