lua-users home
lua-l archive

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

> Using the AFL fuzzer ( ) I found a few
> segfaults (and a failed assertion, id:000019) in luac when inputting
> files from stdin. All files are run with lua 5.2.3 and the patch from
> by executing "luac - < inputfile".

I can't reproduce any crashes.
The scripts you sent are strange. id:000007 does not compile.

Anyway, does it work in unpatched Lua 5.2.3?

I don't see any reason in luac why using stdin would be different
from using the file, except that the issue seems related to garbage
collection and using a filename may change the memory allocation pattern.

Try stopping the garbage collection in luac.c by adding the line below
just before "lua_pushcfunction(L,&pmain)":

	lua_gc(L, LUA_GCSTOP, 0);