mirror of
https://github.com/LuaJIT/LuaJIT.git
synced 2025-02-07 15:14:08 +00:00
Check frame size limit before returning to a lower frame.
Thanks to Sergey Kaplun. #1173
This commit is contained in:
parent
dda1ac273a
commit
302366a338
@ -749,6 +749,8 @@ void lj_record_ret(jit_State *J, BCReg rbase, ptrdiff_t gotresults)
|
||||
lj_trace_err(J, LJ_TRERR_LLEAVE);
|
||||
} else if (J->needsnap) { /* Tailcalled to ff with side-effects. */
|
||||
lj_trace_err(J, LJ_TRERR_NYIRETL); /* No way to insert snapshot here. */
|
||||
} else if (1 + pt->framesize >= LJ_MAX_JSLOTS) {
|
||||
lj_trace_err(J, LJ_TRERR_STACKOV);
|
||||
} else { /* Return to lower frame. Guard for the target we return to. */
|
||||
TRef trpt = lj_ir_kgc(J, obj2gco(pt), IRT_PROTO);
|
||||
TRef trpc = lj_ir_kptr(J, (void *)frame_pc(frame));
|
||||
|
Loading…
Reference in New Issue
Block a user