Should call `ecall()` before callinfo adjustment; fix #3715

parent bf1cb87b
......@@ -1989,21 +1989,18 @@ RETRY_TRY_BLOCK:
if (!proc->env || !MRB_ENV_STACK_SHARED_P(proc->env)) {
goto L_BREAK_ERROR;
}
while (mrb->c->eidx > mrb->c->ci->epos) {
ecall(mrb, --mrb->c->eidx);
}
/* break from fiber block */
if (mrb->c->ci == mrb->c->cibase && mrb->c->ci->pc) {
struct mrb_context *c = mrb->c;
while (mrb->c->eidx > 0) {
ecall(mrb, --mrb->c->eidx);
}
mrb->c = c->prev;
c->prev = NULL;
ci = mrb->c->ci;
}
if (ci->acc < 0) {
while (mrb->c->eidx > mrb->c->ci->epos) {
ecall(mrb, --mrb->c->eidx);
}
ARENA_RESTORE(mrb, ai);
mrb->c->vmexec = FALSE;
mrb->exc = (struct RObject*)break_new(mrb, proc, v);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment