LJ_GC64: Various fixes.

Contributed by Peter Cawley.
This commit is contained in:
Mike Pall
2016-10-12 17:36:45 +02:00
parent 63465fe71d
commit 54b78e7c66
2 changed files with 3 additions and 1 deletions

View File

@@ -1765,6 +1765,8 @@ static void rec_varg(jit_State *J, BCReg dst, ptrdiff_t nresults)
int32_t numparams = J->pt->numparams;
ptrdiff_t nvararg = frame_delta(J->L->base-1) - numparams - 1 - LJ_FR2;
lua_assert(frame_isvarg(J->L->base-1));
if (LJ_FR2 && dst > J->maxslot)
J->base[dst-1] = 0; /* Prevent resurrection of unrelated slot. */
if (J->framedepth > 0) { /* Simple case: varargs defined on-trace. */
ptrdiff_t i;
if (nvararg < 0) nvararg = 0;