segfault

  • From: Justin Cormack <justin@xxxxxxxxxxxxxxxxxxxxx>
  • To: luajit@xxxxxxxxxxxxx
  • Date: Fri, 3 Aug 2012 00:42:47 +0100

I seem to get an occasional segfault in git head


Program terminated with signal 11, Segmentation fault.
#0  lj_ctype_getfield (cts=0x40c83c60, ct=<optimized out>,
name=0x4135e7e8, ofs=0x7fff28c12c3c)
    at lj_ctype.c:228
228         if (gcref(ct->name) == obj2gco(name)) {
(gdb) bt
#0  lj_ctype_getfield (cts=0x40c83c60, ct=<optimized out>,
name=0x4135e7e8, ofs=0x7fff28c12c3c)
    at lj_ctype.c:228
#1  0x000000000043ea1b in carith_checkarg (ca=0x7fff28c12bf0,
cts=0x40c83c60, L=0x403ec378)
    at lj_carith.c:69
#2  lj_carith_op (L=0x403ec378, mm=<optimized out>) at lj_carith.c:256
#3  0x000000000041c943 in lj_BC_FUNCC ()
#4  0x000000000040b570 in lua_pcall (L=<optimized out>, nargs=<optimized out>,
    nresults=<optimized out>, errfunc=<optimized out>) at lj_api.c:1034
#5  0x0000000000403fe6 in docall (L=0x403ec378, narg=0, clear=0) at luajit.c:134
#6  0x0000000000404b1d in handle_script (n=<optimized out>,
argv=<optimized out>,
    L=<optimized out>) at luajit.c:301
#7  pmain (L=0x403ec378) at luajit.c:550
#8  0x000000000041c943 in lj_BC_FUNCC ()
#9  0x000000000040b602 in lua_cpcall (L=<optimized out>, func=<optimized out>,
    ud=<optimized out>) at lj_api.c:1056
#10 0x0000000000403904 in main (argc=2, argv=0x7fff28c12ef8) at luajit.c:579

It happens where I compare a (struct) ctype to a string (fixed if I
check the type first). Wondering if it could be related to the enum
changes as I never saw it before updating luajit recently. Might of
course be a bug in my code...

Justin

Other related posts: