[Date Prev][Date Next][Thread Prev][Thread Next]
[Date Index]
[Thread Index]
- Subject: Re: lua_checkstack in Lua 5.0
- From: Roberto Ierusalimschy <roberto@...>
- Date: Tue, 10 Jun 2003 13:39:22 -0300
> Uncommenting this line leads to a failed assert in traversestack()
> (line:245 / lgc.c) while still in openstdlibs above.
This is a bug :( The patch is
* lgc.c:
247c247
< if (!(ci->state & CI_C) && lim < ci->top)
---
> if (lim < ci->top)
What is happening is that, in a garbage collection, Lua may shrink the
stack more than it should (that is, after the gc the stack may not have
that extra space that you asked).
-- Roberto