#0 0x0000000800b5b0ba in thr_kill () from /lib/libc.so.7
(gdb) bt
#0 0x0000000800b5b0ba in thr_kill () from /lib/libc.so.7
#1 0x0000000800b5b084 in raise () from /lib/libc.so.7
#2 0x0000000800b5aff9 in abort () from /lib/libc.so.7
#3 0x0000000000407df3 in luaD_throw ()
#4 0x00000000004072c7 in luaG_errormsg ()
#5 0x0000000000406e71 in luaG_runerror ()
#6 0x0000000000406b8f in luaG_typeerror ()
#7 0x0000000000418116 in luaV_finishget ()
#8 0x0000000000403f73 in lua_getglobal ()
#9 0x0000000000402651 in main ()
(gdb)
Can anyone please tell what I'm doing wrong here?
If I removed following lines, the program doesn't crash:
lua_pushinteger(L, LUA_RIDX_GLOBALS);
lua_insert(L, -2);
lua_settable(L, LUA_REGISTRYINDEX);