lua-users home
lua-l archive

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


>calling lua_getmetatable() on a stack index that is greater than lua_gettop() produces a segfault when lua_getmetatable() dereferences a null pointer returned by luaA_indexAcceptable().

The C API does not check the validity of the operations. It's assumed that
C programmers know what they are doing. The standard C library does the same.

>fh = io.open("somefile.txt")
>fh.read() -- with no arguments, including no self, segfaults

This is a known bug. See http://www.lua.org/bugs.html for a fix.
--lhf