[Date Prev][Date Next][Thread Prev][Thread Next]
[Date Index]
[Thread Index]
- Subject: Re: coroutine library can cause panic with low memory
- From: M Joonas Pihlaja <jpihlaja@...>
- Date: Mon, 2 Mar 2009 21:07:57 +0200 (EET)
Hey,
On Mon, 2 Mar 2009, Patrick Donnelly wrote:
> Using the attached script one can cause Lua to panic. The problem is
> the API call lua_checkstack which may throw a memory error.
[snip]
> lua_checkstack should probably not throw memory errors because it
> cannot knowingly throw the error on the currently running thread. The
> thread you are checking stack space for may not actually be running!
Uhm.. sorry if I'm being dense, but isn't growing stack and possibly
throwing a memory error the very reason for calling lua_checkstack in
the first place? What on earth is it supposed to do if it can't throw
memory errors when it can't grow the stack?
Cheers,
Joonas