lua-users home
lua-l archive

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


I guess that’s because the default value of  LUAI_MAXCSTACK is 8000, so the lua_checkstack() can’t grow the stack anymore at that time.

在 2015年9月17日,下午11:04,Philipp Janda <siffiejoe@gmx.net> 写道:

Am 17.09.2015 um 16:24 schröbte 曹煦:
Sorry for the misleading conclusion.

The truth is that the broken code still crash under 5.1.5. However,it
happened to work fine after I inserted some lua_checkstack() calls
before those luaL_register(), which only work fine with lua5.1.5
(the code still crash under 5.1.4). So I simply thought it’s caused
by the lua version.


Maybe the problem still is with the "some lua_checkstack() calls". I can get to 7998 successful `luaL_register()` calls on Lua 5.1.4 before Lua raises an error. Valgrind can't find anything out of the order either. This is on Linux, though.

Philipp