lua-users home
lua-l archive

segv in ldo.c:line 284 for lua version 5.0

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


Hi, 
I got the following segv: it happened in vm 
post calling a c function.
I was wondering if this is caused by a known problem?
thanks,
Jiangwei
I was calling a script function call "AppMain"
in a loop, like this:
name: is the script file name
APPINITNAME: AppInit
 /* load the script "name" */
 status = report(l, luaL_loadfile(l, name) || lua_pcall(l, 0, 0, 0));
 if(status) { return status;}
 
 /* execute a script function called "AppInit" */
 lua_pushliteral(l, APPINITNAME); 
 lua_gettable(l, LUA_GLOBALSINDEX);
 status=report(l, lcall(l, 0, 1));
 if(status) { return status;}
 /* calling script function called "AppMain" in a loop 100x100 times*/
 for(iy=0; iy<100; iy++) {
 for(ix=0; ix<100; ix++) {
 lua_pushliteral(l, APPMAINNAME); 
 lua_gettable(l, LUA_GLOBALSINDEX);
 status = report(l, lcall(l, 0, 1));
 if(status) {break;}
 } 
 }
Here is my setting:
_VERSION	Lua 5.0
FreeBSD host1 4.8-20040414-STABLE FreeBSD 4.8-20040414-STABLE #0 
here is the calling stack:
(gdb) where
#0 0x08123770 in luaD_poscall (L=0x818d7a8, wanted=0, firstResult=0x68645f4) at ldo.c:284
#1 0x0812ecdc in luaV_execute (L=0x818d7a8) at lvm.c:634
#2 0x08123876 in luaD_call (L=0x818d7a8, func=0x16c3e480, nResults=0) at ldo.c:313
#3 0x08120cd1 in f_call (L=0x818d7a8, ud=0xbf7ef300) at lapi.c:672
#4 0x08122b98 in luaD_rawrunprotected (L=0x818d7a8, f=0x8120cac <f_call>, ud=0xbf7ef300) at ldo.c:88
#5 0x08123c80 in luaD_pcall (L=0x818d7a8, func=0x8120cac <f_call>, u=0xbf7ef300, old_top=288, ef=276) at ldo.c:403
#6 0x08120d54 in lua_pcall (L=0x818d7a8, nargs=0, nresults=0, errfunc=23) at lapi.c:685
#7 0x080dab4e in lcall (l=0x818d7a8, narg=0, clear=1) at dt_vm.c:494
#8 0x080dbf76 in dt_vm_main (argc=3, argv=0xbf7ffba0) at dt_vm.c:969
#9 0x0808bc97 in main (argc=3, argv=0xbf7ffba0) at parser2.cc:908
#10 0x08088dce in _start ()

AltStyle によって変換されたページ (->オリジナル) /