lua-users home
lua-l archive

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


Hi all, 

This is a minimal lua script that cause the crash: 

  local t = {}  
  print(t[#t]+1) 

The bug is in ldebug.c: 

static void kname (Proto *p, int c, int reg, const char *what,  
                   const char **name) {  
  if (c == reg && *what == 'c') /* !!! here 'what' may be NULL !!! */ 
    return;  /* index is a constant; name already correct */  

call stack: 

> lua.exe!kname(Proto * p=0x0037a288, int c=2, int reg=2, const char * what=0x00000000, const char * * name=0x0012f944)  line 267 + 0xb bytes 
  lua.exe!getobjname(lua_State * L=0x003728b8, CallInfo * ci=0x00379238, int reg=2, const char * * name=0x0012f944)  line 308 + 0x19 bytes 
  lua.exe!luaG_typeerror(lua_State * L=0x003728b8, const lua_TValue * o=0x00372ac0, const char * op=0x00464514)  line 449 + 0x1e bytes 
  lua.exe!luaG_aritherror(lua_State * L=0x003728b8, const lua_TValue * p1=0x00372ac0, const lua_TValue * p2=0x00372ac0)  line 470 + 0x12 bytes 
  lua.exe!luaV_arith(lua_State * L=0x003728b8, lua_TValue * ra=0x00372ac0, const lua_TValue * rb=0x00372ac0, const lua_TValue * rc=0x0037a388, TMS op=TM_ADD)  line 344 + 0x11 bytes 
  lua.exe!luaV_execute(lua_State * L=0x003728b8)  line 525 + 0x10c bytes 
  lua.exe!luaD_call(lua_State * L=0x003728b8, lua_TValue * func=0x00372a90, int nResults=-1, int allowyield=0)  line 399 + 0x9 bytes 
  lua.exe!f_call(lua_State * L=0x003728b8, void * ud=0x0012fd90)  line 821 + 0x18 bytes 
  lua.exe!luaD_rawrunprotected(lua_State * L=0x003728b8, void (lua_State *, void *)* f=0x00404800, void * ud=0x0012fd90)  line 133 + 0x1d bytes 
  lua.exe!luaD_pcall(lua_State * L=0x003728b8, void (lua_State *, void *)* func=0x00404800, void * u=0x0012fd90, int old_top=80, int ef=64)  line 596 + 0x11 bytes C 
  ...... 

dwing,dwingg@gmail.com  
2010-06-16