lua-users home
lua-l archive

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


On Wed, 8 Jul 2020 at 21:29, Dibyendu Majumdar <mobile@majumdar.org.uk> wrote:
>
> On Wed, 8 Jul 2020 at 20:17, Roberto Ierusalimschy
> <roberto@inf.puc-rio.br> wrote:
> >
> > > Does this bug only appear in generational GC?
> >
> > Apparently yes. As I said, any small changes can hide it. Maybe some
> > other parameters in incremental mode can expose it.
> >
>

I was able to reproduce the issue in Ravi in an older version. I
thought I would let you know what my issue was, maybe same thing is
happening  here.

vmcase(OP_RETURN) {
int n = GETARG_B(i) - 1; /* number of results */
int nparams1 = GETARG_C(i);
if (n < 0) /* not fixed? */
n = cast_int(L->top - ra); /* get what is available */
savepc(ci);
if (TESTARG_k(i)) { /* may there be open upvalues? */
if (L->top < ci->top)
L->top = ci->top;
luaF_close(L, base, LUA_OK);
updatetrap(ci);
updatestack(ci);
}
if (nparams1) /* vararg function? */
ci->func -= ci->u.l.nextraargs + nparams1;
L->top = ra + n; /* set call for 'luaD_poscall' */
luaD_poscall(L, ci, n);
return;
}

The use of ra - is ra still correct? Stacke may have been reallocated?
There was similar  bug in Ravi.

Regards