diff options
Diffstat (limited to 'src/lj_record.c')
-rw-r--r-- | src/lj_record.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/src/lj_record.c b/src/lj_record.c index 76699a9f..48018f42 100644 --- a/src/lj_record.c +++ b/src/lj_record.c | |||
@@ -1765,6 +1765,8 @@ static void rec_varg(jit_State *J, BCReg dst, ptrdiff_t nresults) | |||
1765 | int32_t numparams = J->pt->numparams; | 1765 | int32_t numparams = J->pt->numparams; |
1766 | ptrdiff_t nvararg = frame_delta(J->L->base-1) - numparams - 1 - LJ_FR2; | 1766 | ptrdiff_t nvararg = frame_delta(J->L->base-1) - numparams - 1 - LJ_FR2; |
1767 | lua_assert(frame_isvarg(J->L->base-1)); | 1767 | lua_assert(frame_isvarg(J->L->base-1)); |
1768 | if (LJ_FR2 && dst > J->maxslot) | ||
1769 | J->base[dst-1] = 0; /* Prevent resurrection of unrelated slot. */ | ||
1768 | if (J->framedepth > 0) { /* Simple case: varargs defined on-trace. */ | 1770 | if (J->framedepth > 0) { /* Simple case: varargs defined on-trace. */ |
1769 | ptrdiff_t i; | 1771 | ptrdiff_t i; |
1770 | if (nvararg < 0) nvararg = 0; | 1772 | if (nvararg < 0) nvararg = 0; |