lua-users home
lua-l archive

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


In fact, my compilation of the LUA language fails on the following code:
 

lua_State * L = lua_open ( ) ;

if ( L )

{

int ref ;

lua_newtable ( L ) ;

ref = luaL_ref ( L , LUA_REGISTRYINDEX ) ; // HERE IS MY PROBLEM

lua_close ( L ) ;

}

 
What happens is that luaL_setn causes some registry-stored size table to grow, but for some reason, this does not behave normally, and I get the following call stack:
 
...
#144 0x5f0311a4 in resize (L=0xf7dff8, t=0xf7a2e0, nasize=0, nhsize=1) at ltable.c:315
#145 0x5f03123e in rehash (L=0xf7dff8, t=0xf7a2e0) at ltable.c:326
#146 0x5f0314ce in newkey (L=0xf7dff8, t=0xf7a2e0, key=0xf7a250) at ltable.c:420
#147 0x5f0317c2 in luaH_set (L=0xf7dff8, t=0xf7a2e0, key=0xf7a250) at ltable.c:505
#148 0x5f0311a4 in resize (L=0xf7dff8, t=0xf7a2e0, nasize=0, nhsize=1) at ltable.c:315
#149 0x5f03123e in rehash (L=0xf7dff8, t=0xf7a2e0) at ltable.c:326
#150 0x5f0314ce in newkey (L=0xf7dff8, t=0xf7a2e0, key=0xf7a278) at ltable.c:420
#151 0x5f0317c2 in luaH_set (L=0xf7dff8, t=0xf7a2e0, key=0xf7a278) at ltable.c:505
#152 0x5f0311a4 in resize (L=0xf7dff8, t=0xf7a2e0, nasize=0, nhsize=1) at ltable.c:315
#153 0x5f03123e in rehash (L=0xf7dff8, t=0xf7a2e0) at ltable.c:326
#154 0x5f0314ce in newkey (L=0xf7dff8, t=0xf7a2e0, key=0xf7a2a0) at ltable.c:420
#155 0x5f0317c2 in luaH_set (L=0xf7dff8, t=0xf7a2e0, key=0xf7a2a0) at ltable.c:505
#156 0x5f0311a4 in resize (L=0xf7dff8, t=0xf7a2e0, nasize=0, nhsize=1) at ltable.c:315
#157 0x5f03123e in rehash (L=0xf7dff8, t=0xf7a2e0) at ltable.c:326
#158 0x5f0314ce in newkey (L=0xf7dff8, t=0xf7a2e0, key=0xf7d64e) at ltable.c:420
#159 0x5f0317c2 in luaH_set (L=0xf7dff8, t=0xf7a2e0, key=0xf7d64e) at ltable.c:505
#160 0x5f01c7c4 in lua_rawset (L=0xf7dff8, idx=-3) at lapi.c:583
#161 0x5f01eb48 in luaL_setn (L=0xf7dff8, t=-10000, n=3) at lauxlib.c:298
#162 0x5f01ef6e in luaL_ref (L=0xf7dff8, t=-10000) at lauxlib.c:443
 
 
Has the problem been encountered on other 16-bits platforms ?
 
Thanks for any insight,
 
 
Benoit.