[Date Prev][Date Next][Thread Prev][Thread Next]
[Date Index]
[Thread Index]
- Subject: Re: current status about last bugs
- From: Roberto Ierusalimschy <roberto@...>
- Date: Thu, 9 Jul 2020 11:17:50 -0300
> 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.
Note the macro updatestack: It should correct 'ra' in case of a stack
reallocation.
-- Roberto