[Date Prev][Date Next][Thread Prev][Thread Next]
- Subject: Re: [BUG] uservalue has an incorrect value In lua 5.4(work2)
- From: Roberto Ierusalimschy <roberto@...>
- Date: Fri, 6 Jul 2018 13:53:13 -0300
> 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!