aboutsummaryrefslogtreecommitdiff
path: root/src/lj_snap.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/lj_snap.c')
-rw-r--r--src/lj_snap.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/src/lj_snap.c b/src/lj_snap.c
index cb104439..d0d28c81 100644
--- a/src/lj_snap.c
+++ b/src/lj_snap.c
@@ -956,8 +956,10 @@ const BCIns *lj_snap_restore(jit_State *J, void *exptr)
956 const BCIns *pc = snap_pc(&map[nent]); 956 const BCIns *pc = snap_pc(&map[nent]);
957 lua_State *L = J->L; 957 lua_State *L = J->L;
958 958
959 /* Set interpreter PC to the next PC to get correct error messages. */ 959 /* Set interpreter PC to the next PC to get correct error messages.
960 setcframe_pc(L->cframe, pc+1); 960 ** But not for returns or tail calls, since pc+1 may be out-of-range.
961 */
962 setcframe_pc(L->cframe, bc_isret_or_tail(bc_op(*pc)) ? pc : pc+1);
961 setcframe_pc(cframe_raw(cframe_prev(L->cframe)), pc); 963 setcframe_pc(cframe_raw(cframe_prev(L->cframe)), pc);
962 964
963 /* Make sure the stack is big enough for the slots from the snapshot. */ 965 /* Make sure the stack is big enough for the slots from the snapshot. */