[Date Prev][Date Next][Thread Prev][Thread Next]
[Date Index]
[Thread Index]
- Subject: Re: pushclosure may be has a BUG
- From: Roberto Ierusalimschy <roberto@...>
- Date: Sun, 25 Dec 2022 12:35:16 -0300
> lua 5.4.4 lvm.c:794
> static void pushclosure(...) {
> ...
> ncl->p = p; /* it need barrier */
> luaC_objbarrier(L, ncl, p) /* fix BUG */
> ...
> }
> when I test my modified code on GC,I find it cause crash.
Are you sure? The sequence is this:
LClosure *ncl = luaF_newLclosure(L, nup);
ncl->p = p;
luaC_objbarrier(L, ncl, p); /* ??? */
As 'ncl' was just created, it must be white; but 'luaC_objbarrier' is
a macro that would only do anything if 'ncl' was black. That is,
the barrier would never be activated.
-- Roberto