[Date Prev][Date Next][Thread Prev][Thread Next]
[Date Index]
[Thread Index]
- Subject: Re: possible bug in lua.c main report lua_tostring malloc
- From: Roberto Ierusalimschy <roberto@...>
- Date: Mon, 10 Aug 2009 13:23:02 -0300
> In Lua 5.1.4, in lua.h:main, the call to "report" invokes
> lua_tostring, which according to the Lua Reference Manual may raise a
> memory error, presumably in the condition where the error value is a
> number that must be translated into a string and therefore allocate
> memory for the string. In this context, the call to lua_tostring is
> unprotected.
>
> I was able to cause "lua -e 'error(5)'" to crash by triggering an
> allocation failure in lmem.c:
>
> [...]
Just a small detail: By "crash" you mean a panicked exit, right?
-- Roberto