diff options
-rw-r--r-- | src/lj_ffrecord.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/src/lj_ffrecord.c b/src/lj_ffrecord.c index d050d12d..26af7d84 100644 --- a/src/lj_ffrecord.c +++ b/src/lj_ffrecord.c | |||
@@ -107,6 +107,10 @@ static void recff_stitch(jit_State *J) | |||
107 | const BCIns *pc = frame_pc(base-1); | 107 | const BCIns *pc = frame_pc(base-1); |
108 | TValue *pframe = frame_prevl(base-1); | 108 | TValue *pframe = frame_prevl(base-1); |
109 | 109 | ||
110 | /* Check for this now. Throwing in lj_record_stop messes up the stack. */ | ||
111 | if (J->cur.nsnap >= (MSize)J->param[JIT_P_maxsnap]) | ||
112 | lj_trace_err(J, LJ_TRERR_SNAPOV); | ||
113 | |||
110 | /* Move func + args up in Lua stack and insert continuation. */ | 114 | /* Move func + args up in Lua stack and insert continuation. */ |
111 | memmove(&base[1], &base[-1-LJ_FR2], sizeof(TValue)*nslot); | 115 | memmove(&base[1], &base[-1-LJ_FR2], sizeof(TValue)*nslot); |
112 | setframe_ftsz(nframe, ((char *)nframe - (char *)pframe) + FRAME_CONT); | 116 | setframe_ftsz(nframe, ((char *)nframe - (char *)pframe) + FRAME_CONT); |