mirror of
https://github.com/LuaJIT/LuaJIT.git
synced 2025-02-07 23:24:09 +00:00
Fix stack check in side exit.
This commit is contained in:
parent
c142b6c53e
commit
1a42c03807
@ -352,7 +352,7 @@ const BCIns *lj_snap_restore(jit_State *J, void *exptr)
|
|||||||
setcframe_pc(cframe_raw(L->cframe), pc+1);
|
setcframe_pc(cframe_raw(L->cframe), pc+1);
|
||||||
|
|
||||||
/* Make sure the stack is big enough for the slots from the snapshot. */
|
/* Make sure the stack is big enough for the slots from the snapshot. */
|
||||||
if (LJ_UNLIKELY(L->base + snap->topslot > tvref(L->maxstack))) {
|
if (LJ_UNLIKELY(L->base + snap->topslot >= tvref(L->maxstack))) {
|
||||||
L->top = curr_topL(L);
|
L->top = curr_topL(L);
|
||||||
lj_state_growstack(L, snap->topslot - curr_proto(L)->framesize);
|
lj_state_growstack(L, snap->topslot - curr_proto(L)->framesize);
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user