Skip to content

Commit

Permalink
Fix stack check when recording BC_VARG.
Browse files Browse the repository at this point in the history
Contributed by Yichun Zhang.
  • Loading branch information
Mike Pall committed Dec 8, 2019
1 parent 1d1bac5 commit e0388e6
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/lj_record.c
Original file line number Diff line number Diff line change
Expand Up @@ -1602,6 +1602,8 @@ static void rec_varg(jit_State *J, BCReg dst, ptrdiff_t nresults)
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 -------------------------------------------------- */
Expand Down

0 comments on commit e0388e6

Please sign in to comment.