summaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorYukihiro "Matz" Matsumoto <[email protected]>2018-08-30 01:20:59 +0900
committerYukihiro "Matz" Matsumoto <[email protected]>2018-08-30 01:20:59 +0900
commit5addd5db4a59450427abae2e9925c529fd6868a1 (patch)
tree66e2c15ca5d912986b06e91dbf5fb982f432e9c7
parent500bd38dfe12899ded93f049741afffdb03974a1 (diff)
downloadmruby-5addd5db4a59450427abae2e9925c529fd6868a1.tar.gz
mruby-5addd5db4a59450427abae2e9925c529fd6868a1.zip
Need to clear `mrb->c->cibase->ridx` (toplevel ridx) at L_STOP; fix #4092
This problem only appears when `mrb` executed multiple times (i.e. `mirb`)
-rw-r--r--src/vm.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/src/vm.c b/src/vm.c
index c8088d22e..98e554607 100644
--- a/src/vm.c
+++ b/src/vm.c
@@ -2954,6 +2954,7 @@ RETRY_TRY_BLOCK:
while (mrb->c->eidx > 0) {
ecall(mrb);
}
+ mrb->c->cibase->ridx = 0;
ERR_PC_CLR(mrb);
mrb->jmp = prev_jmp;
if (mrb->exc) {