[Date Prev][Date Next][Thread Prev][Thread Next]
- Subject: Re: stack/memory problem
- From: Oskar Forsslund <matrixsmurfen@...>
- Date: Wed, 14 Dec 2011 14:34:01 +0100
I rebuilt lua and got an assertion failure
On Wed, Dec 14, 2011 at 2:03 PM, Luiz Henrique de Figueiredo <email@example.com>
> If I don't do anything (don't pop values, don't use checkstack and don'tThere is no need to lua_settop(L, 0) if you're in a C function called by Lua.
> use lua_settop(L, 0)) I run out of memory, no surprise there.
There is, however, a need to call lua_checkstack/luaL_checkstack if you
use more than 20 stack entries.
Perhaps rebuilding Lua with LUA_USE_APICHECK on will help pinpoint the problem.
> How is proper stack handling supposed to be done?
_expression_: L->top < L->ci->top
line 514 is within lua_pushlightuserdata
this doesn't really tell me much though...
I just #define LUA_USE_APICHECK in luaconf.h, am I supposed to write some sort of checking function as well or is this enough?