Handle on-trace OOM errors from helper functions.
This commit is contained in:
@@ -832,6 +832,7 @@ void lj_record_ret(jit_State *J, BCReg rbase, ptrdiff_t gotresults)
|
||||
J->base -= cbase;
|
||||
J->base[--rbase] = TREF_TRUE; /* Prepend true to results. */
|
||||
frame = frame_prevd(frame);
|
||||
J->needsnap = 1; /* Stop catching on-trace errors. */
|
||||
}
|
||||
/* Return to lower frame via interpreter for unhandled cases. */
|
||||
if (J->framedepth == 0 && J->pt && bc_isret(bc_op(*J->pc)) &&
|
||||
@@ -2050,7 +2051,7 @@ void lj_record_ins(jit_State *J)
|
||||
/* Need snapshot before recording next bytecode (e.g. after a store). */
|
||||
if (J->needsnap) {
|
||||
J->needsnap = 0;
|
||||
lj_snap_purge(J);
|
||||
if (J->pt) lj_snap_purge(J);
|
||||
lj_snap_add(J);
|
||||
J->mergesnap = 1;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user