[Date Prev][Date Next][Thread Prev][Thread Next]
[Date Index]
[Thread Index]
- Subject: SEGFAULT in newkey
- From: "Aaron Saarela" <Aaron.Saarela@...>
- Date: Wed, 24 Sep 2008 19:27:41 -0400
I'm getting a setfault in newkey when I have Lua built with -O2 on Linux.
I've verified that my application only links in one instance of the Lua
runtime. It seems to crash simply loading my module. The 'othern' variable at
line 426 is NULL -- I'm assuming it should be a valid address? This is Lua
5.1.3. Does anyone recognize what I'm doing wrong?
Thanks,
-Aaron
Stack trace:
#0 newkey (L=0x84b63f8, t=0x8607838, key=0xbfef1c44) at ltable.c:426
#1 0x080bc7fb in luaH_set (L=0x84b63f8, t=0x8607838, key=0xbfef1c44) at
ltable.c:523
#2 0x080bcd2b in newkey (L=0x84b63f8, t=0x8607838, key=0xbfef1c44) at
ltable.c:420
#3 0x080bcd96 in luaH_setstr (L=0x84b63f8, t=0x8607838, key=0x84ea130) at
ltable.c:547
#4 0x080c42f3 in luaX_newstring (ls=0xbfef24d4, str=0x85e71a8 "math0001",
l=4) at llex.c:129
#5 0x080c531e in llex (ls=0xbfef24d4, seminfo=0xbfef24e4) at llex.c:439
#6 0x080c53e2 in luaX_next (ls=0xbfef24d4) at llex.c:466
#7 0x080baa68 in primaryexp (ls=0xbfef24d4, v=0xbfef1d9c) at lparser.c:671
#8 0x080ba1b0 in subexpr (ls=0xbfef24d4, v=0xbfef1d9c, limit=0) at
lparser.c:781
#9 0x080ba358 in cond (ls=0x0) at lparser.c:979
#10 0x080bb5dd in test_then_block (ls=0xbfef24d4) at lparser.c:1145
#11 0x080baeee in chunk (ls=0xbfef24d4) at lparser.c:1157
#12 0x080b9c63 in body (ls=0xbfef24d4, e=0xbfef2214, needself=3, line=279) at
lparser.c:587
#13 0x080bae84 in chunk (ls=0xbfef24d4) at lparser.c:1229
#14 0x080bb7df in luaY_parser (L=0x84b63f8, z=0xbfef26b8, buff=0xbfef2670,
name=0x85e8078
"@../../../../Test/egf/TestScheduler/Data/Lua/EsePropertyTest.lua") at
lparser.c:390
#15 0x080b5f05 in f_parser (L=0x84b63f8, ud=0xbfef266c) at ldo.c:497
#16 0x080b6247 in luaD_rawrunprotected (L=0x84b63f8, f=0x80b5eb0 <f_parser>,
ud=0xbfef266c) at ldo.c:116
#17 0x080b62af in luaD_pcall (L=0x84b63f8, func=0x80b5eb0 <f_parser>,
u=0xbfef266c, old_top=264, ef=0) at ldo.c:463
#18 0x080b636d in luaD_protectedparser (L=0x84b63f8, z=0xbfef26b8,
name=0x85e8078
"@../../../../Test/egf/TestScheduler/Data/Lua/EsePropertyTest.lua") at
ldo.c:513
#19 0x080b3db6 in lua_load (L=0x84b63f8, reader=0x80c1380 <getF>,
data=0xbfef2704,
chunkname=0x85e8078
"@../../../../Test/egf/TestScheduler/Data/Lua/EsePropertyTest.lua") at
lapi.c:930
#20 0x080c11e1 in luaL_loadfile (L=0x84b63f8, filename=0x85e8020
"../../../../Test/egf/TestScheduler/Data/Lua/EsePropertyTest.lua")
at lauxlib.c:591
#21 0x080ce243 in loader_Lua (L=0x84b63f8) at loadlib.c:393
#22 0x080b66b4 in luaD_precall (L=0x84b63f8, func=0x8500464, nresults=1) at
ldo.c:319
#23 0x080b6af5 in luaD_call (L=0x84b63f8, func=0x8500464, nResults=1) at
ldo.c:376
#24 0x080b4053 in lua_call (L=0x84b63f8, nargs=1, nresults=1) at lapi.c:843
#25 0x080cd82f in ll_require (L=0x84b63f8) at loadlib.c:481
#26 0x080b66b4 in luaD_precall (L=0x84b63f8, func=0x850041c, nresults=1) at
ldo.c:319
#27 0x080bf5a2 in luaV_execute (L=0x84b63f8, nexeccalls=1) at lvm.c:787
#28 0x080b6b40 in luaD_call (L=0x84b63f8, func=0x85003bc, nResults=0) at
ldo.c:377
#29 0x080b4011 in f_call (L=0x84b63f8, ud=0xbfef4a64) at lapi.c:861
#30 0x080b6247 in luaD_rawrunprotected (L=0x84b63f8, f=0x80b3ff0 <f_call>,
ud=0xbfef4a64) at ldo.c:116
#31 0x080b62af in luaD_pcall (L=0x84b63f8, func=0x80b3ff0 <f_call>,
u=0xbfef4a64, old_top=12, ef=0) at ldo.c:463
#32 0x080b3e67 in lua_pcall (L=0x84b63f8, nargs=5, nresults=0, errfunc=0) at
lapi.c:882
Offending code:
422 lua_assert(n != dummynode);
423 othern = mainposition(t, key2tval(mp));
424 if (othern != mp) { /* is colliding node out of its main
position? */
425 /* yes; move colliding node into free position */
426 while (gnext(othern) != mp) {
427 othern = gnext(othern); /* find previous */
428 }