From 1a42c038071d31a0ba8a300e59bb6b2b1d8d5fb1 Mon Sep 17 00:00:00 2001 From: Mike Pall Date: Fri, 25 Nov 2011 19:36:48 +0100 Subject: [PATCH] Fix stack check in side exit. --- src/lj_snap.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/lj_snap.c b/src/lj_snap.c index 89f73982..10fd6af7 100644 --- a/src/lj_snap.c +++ b/src/lj_snap.c @@ -352,7 +352,7 @@ const BCIns *lj_snap_restore(jit_State *J, void *exptr) setcframe_pc(cframe_raw(L->cframe), pc+1); /* 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); lj_state_growstack(L, snap->topslot - curr_proto(L)->framesize); } -- 2.11.4.GIT