diff options
Diffstat (limited to 'src/lj_snap.c')
-rw-r--r-- | src/lj_snap.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/lj_snap.c b/src/lj_snap.c index 96badaaa..7c26bfb9 100644 --- a/src/lj_snap.c +++ b/src/lj_snap.c | |||
@@ -231,7 +231,7 @@ const BCIns *lj_snap_restore(jit_State *J, void *exptr) | |||
231 | setcframe_pc(cframe_raw(L->cframe), pc+1); | 231 | setcframe_pc(cframe_raw(L->cframe), pc+1); |
232 | 232 | ||
233 | /* Make sure the stack is big enough for the slots from the snapshot. */ | 233 | /* Make sure the stack is big enough for the slots from the snapshot. */ |
234 | if (LJ_UNLIKELY(L->base + nslots > L->maxstack)) { | 234 | if (LJ_UNLIKELY(L->base + nslots > tvref(L->maxstack))) { |
235 | L->top = curr_topL(L); | 235 | L->top = curr_topL(L); |
236 | lj_state_growstack(L, nslots - curr_proto(L)->framesize); | 236 | lj_state_growstack(L, nslots - curr_proto(L)->framesize); |
237 | } | 237 | } |
@@ -255,10 +255,10 @@ const BCIns *lj_snap_restore(jit_State *J, void *exptr) | |||
255 | if (isluafunc(fn)) { | 255 | if (isluafunc(fn)) { |
256 | MSize framesize = funcproto(fn)->framesize; | 256 | MSize framesize = funcproto(fn)->framesize; |
257 | L->base = ++o; | 257 | L->base = ++o; |
258 | if (LJ_UNLIKELY(o + framesize > L->maxstack)) { /* Grow again? */ | 258 | if (LJ_UNLIKELY(o + framesize > tvref(L->maxstack))) { |
259 | ptrdiff_t fsave = savestack(L, frame); | 259 | ptrdiff_t fsave = savestack(L, frame); |
260 | L->top = o; | 260 | L->top = o; |
261 | lj_state_growstack(L, framesize); | 261 | lj_state_growstack(L, framesize); /* Grow again. */ |
262 | frame = restorestack(L, fsave); | 262 | frame = restorestack(L, fsave); |
263 | } | 263 | } |
264 | } | 264 | } |