Skip to content

Commit

Permalink
Add missing LJ_MAX_JSLOTS check.
Browse files Browse the repository at this point in the history
Thanks to Yichun Zhang.
  • Loading branch information
Mike Pall committed May 17, 2017
1 parent 1c89933 commit 630ff31
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 @@ -633,6 +633,8 @@ void lj_record_call(jit_State *J, BCReg func, ptrdiff_t nargs)
J->framedepth++;
J->base += func+1;
J->baseslot += func+1;
if (J->baseslot + J->maxslot >= LJ_MAX_JSLOTS)
lj_trace_err(J, LJ_TRERR_STACKOV);
}

/* Record tail call. */
Expand Down

0 comments on commit 630ff31

Please sign in to comment.