lua-users home
lua-l archive

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


> 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