[Date Prev][Date Next][Thread Prev][Thread Next]
[Date Index]
[Thread Index]
- Subject: Re: The Lua interpreter and large scripts
- From: Roberto Ierusalimschy <roberto@...>
- Date: Fri, 13 Nov 2009 18:12:36 -0200
> BTW: I found another problem: luaX_setinput() calls next() which
> in turn may call the reader function which in turn may run the GC.
> But the chunkname string is still unanchored. It's only anchored
> when open_func runs and anchors the prototype in the stack.
>
> It looks like this can't trigger right now, because of the
> lookahead check for the bytecode signature in f_parser. But it's a
> potential GC bug, if that behavior ever changes.
This already was fixed in 5.2. The current code is like this:
TString *tname = luaS_new(L, name);
setsvalue2s(L, L->top, tname); /* protect name */
incr_top(L);
-- Roberto
- References:
- Re: The Lua interpreter and large scripts, Sean Conner
- Re: The Lua interpreter and large scripts, Mike Pall
- Re: The Lua interpreter and large scripts, Sean Conner
- Re: The Lua interpreter and large scripts, KHMan
- Re: The Lua interpreter and large scripts, Sean Conner
- Re: The Lua interpreter and large scripts, Luiz Henrique de Figueiredo
- Re: The Lua interpreter and large scripts, Sean Conner
- Re: The Lua interpreter and large scripts, Norbert Kiesel
- Re: The Lua interpreter and large scripts, Norbert Kiesel
- Re: The Lua interpreter and large scripts, Mike Pall