Fix stack check when recording BC_VARG.

Contributed by Yichun Zhang.
This commit is contained in:
Mike Pall 2019-12-08 19:32:27 +01:00
parent 1d1bac5a65
commit e0388e6c00

View File

@ -1602,6 +1602,8 @@ static void rec_varg(jit_State *J, BCReg dst, ptrdiff_t nresults)
lj_trace_err_info(J, LJ_TRERR_NYIBC); lj_trace_err_info(J, LJ_TRERR_NYIBC);
} }
} }
if (J->baseslot + J->maxslot >= LJ_MAX_JSLOTS)
lj_trace_err(J, LJ_TRERR_STACKOV);
} }
/* -- Record allocations -------------------------------------------------- */ /* -- Record allocations -------------------------------------------------- */