[Date Prev][Date Next][Thread Prev][Thread Next]
[Date Index]
[Thread Index]
- Subject: Re: Lua assertion during garbage collection when using a weak table
- From: Roberto Ierusalimschy <roberto@...>
- Date: Thu, 28 Mar 2019 15:22:37 -0300
> Sorry to come that late to this problem. Many thanks for the detailed
> analysis.
>
>
> > I _think_ the assertion is invalid and that there's no real problem.
> > (But I'm not completely sure.)
>
> I guess you are right. After that assertion, 'atomic' does a
> 'propagateall' itself, which will add objects to those lists.
> Nothing between the assertion and this first 'propagateall'
> are affected by those lists. Probably, that assertion could
> come before that previous 'propagateall', or that 'propagateall'
> could be removed.
I am afraid we were wrong. If the table is modified while in list
'weak' (but still before the atomic phase), it won't be traversed
again. So, a new element assigned to it may not be marked; it then
wll be collected while still in the table, eventually crashing the
system. It seems this is a real bug.
-- Roberto