Fix snapshot restore for exit to function header. - gsl-shell.git - gsl-shell

index : gsl-shell.git
gsl-shell
summary refs log tree commit diff
diff options
context:
space:
mode:
authorMike Pall <mike>2013年09月13日 00:33:58 +0200
committerMike Pall <mike>2013年09月13日 00:33:58 +0200
commitf1e7a4477ca4a5a8ef8c64135d9093d02451bb22 (patch)
tree04ee05ae53e6552f1ba7ef851639c6d365ff3221
parent1f7b32621700a7c104435a64d6cad5374cb8b9b7 (diff)
downloadgsl-shell-f1e7a4477ca4a5a8ef8c64135d9093d02451bb22.tar.gz
Fix snapshot restore for exit to function header.
Diffstat
-rw-r--r--src/lj_snap.c 9
1 files changed, 6 insertions, 3 deletions
diff --git a/src/lj_snap.c b/src/lj_snap.c
index 30ff9152..a25e4601 100644
--- a/src/lj_snap.c
+++ b/src/lj_snap.c
@@ -845,12 +845,15 @@ const BCIns *lj_snap_restore(jit_State *J, void *exptr)
/* Compute current stack top. */
switch (bc_op(*pc)) {
+ default:
+ if (bc_op(*pc) < BC_FUNCF) {
+ L->top = curr_topL(L);
+ break;
+ }
+ /* fallthrough */
case BC_CALLM: case BC_CALLMT: case BC_RETM: case BC_TSETM:
L->top = frame + snap->nslots;
break;
- default:
- L->top = curr_topL(L);
- break;
}
return pc;
}
generated by cgit v1.2.3 (git 2.39.1) at 2025年09月25日 00:07:41 +0000

AltStyle によって変換されたページ (->オリジナル) /