summaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorYukihiro "Matz" Matsumoto <[email protected]>2017-04-10 20:39:49 +0900
committerYukihiro "Matz" Matsumoto <[email protected]>2017-04-10 20:39:49 +0900
commita55b237d89e1397da8dc879b24c1a34e80ad4e91 (patch)
tree7ec5f431df4bc9fb07a9872a06a10c0419ba8be6
parentab25eaea2345577b4e28672908f0190ce6b21684 (diff)
downloadmruby-a55b237d89e1397da8dc879b24c1a34e80ad4e91.tar.gz
mruby-a55b237d89e1397da8dc879b24c1a34e80ad4e91.zip
Callinfo may be changed in `ecall()`; fix #3589
-rw-r--r--src/vm.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/vm.c b/src/vm.c
index 9c4277725..1b967ef7e 100644
--- a/src/vm.c
+++ b/src/vm.c
@@ -1161,6 +1161,7 @@ RETRY_TRY_BLOCK:
for (n=0; n<a && (ci == mrb->c->cibase || eidx > ci[-1].eidx); n++) {
ecall(mrb, --eidx);
+ ci = mrb->c->ci;
ARENA_RESTORE(mrb, ai);
}
NEXT;
@@ -1706,6 +1707,7 @@ RETRY_TRY_BLOCK:
if (ci[0].ridx == ci[-1].ridx) {
while (eidx > ci[-1].eidx) {
ecall(mrb, --eidx);
+ ci = mrb->c->ci;
}
}
}