lua-users home
lua-l archive

Odd GC recursion

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


 I'm seeing a lot of function recursion on the stack while executing this
loop using Lua 5.1 (work2):
	for i=0, 1000 do
		point2()
	end
 The function point2() just returns a userdata with metatable and __gc
method... It doesn't do any lua_calls. If 1000 is changed to 10000 the
executable crashes when it runs out of stack space. I get this repeating
sequence of calls on the stack...
 GCTM(lua_State * L=0x00b62838) Line 475 + 0x15	C
 singlestep(lua_State * L=0x00b62838) Line 604 + 0x9	C
 luaC_step(lua_State * L=0x00b62838) Line 623 + 0x9	C
 luaD_call(lua_State * L=0x00b62838, ...) Line 353 + 0x1d	C
 GCTM(lua_State * L=0x00b62838) Line 475 + 0x15	C
 singlestep(lua_State * L=0x00b62838) Line 604 + 0x9	C
 luaC_step(lua_State * L=0x00b62838) Line 623 + 0x9	C
 luaD_call(lua_State * L=0x00b62838, ...) Line 353 + 0x1d	C
 GCTM(lua_State * L=0x00b62838) Line 475 + 0x15	C
 Anything I could have done in setting up my userdata which would cause
this?
 Tom Spilman
 Co-owner | Programmer
 www.sickheadgames.com

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