lua-users home
lua-l archive

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


> I'm trying to load strict.lua (from the standard Lua distribution) via
> luaL_dofile() in my C code just after creating the Lua state. In other
> words, I do something like this:
> 
> lua_State* L = luaL_newstate();
> if (luaL_dofile(L, "strict.lua")) {
>   printf("failed to load strict.lua: %s\n", lua_tostring(L, -1));
> }
> 
> However, this fails and the error is "C stack overflow" pointing to
> line 18 in strict.lua:

strict.lua has a known bug (and a fix). Have a look at

  http://lua-users.org/lists/lua-l/2006-11/msg00116.html

-- Roberto