lua-users home
lua-l archive

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

>  Andrew> Doesn't need the loop; just doing require 're';
>  Andrew> collectgarbage(); triggers it for me.
> So it looks like a bug in generational GC.
> What I've found so far is that the states of the "marked" flags of
> object U (the userdata) and T (the table stored in the uservalue)
> change like this, starting from the creation of T:
> [...]
> So unless I'm missing something, the problem here is that the userdata
> and its uservalue entries are being treated differently than a strong
> table would have been: the strong table is marked grayagain after
> traversing if gckind == KGC_GEN, but the userdata remains black after
> traversing its uservalue entries. Surely the logic should be the same
> for both cases, since both are strong references?

Many thanks for the detailed analysis. Great help!

-- Roberto