break should not cross fiber-context boundary; fix #3724

This commit is contained in:
Yukihiro "Matz" Matsumoto
2017-07-01 12:30:15 +09:00
parent 7d99830211
commit 9b8956cdd0
+3
View File
@@ -1991,6 +1991,9 @@ RETRY_TRY_BLOCK:
if (!proc->env || !MRB_ENV_STACK_SHARED_P(proc->env)) {
goto L_BREAK_ERROR;
}
if (proc->env->cxt.c != mrb->c) {
goto L_BREAK_ERROR;
}
while (mrb->c->eidx > mrb->c->ci->epos) {
ecall(mrb, --mrb->c->eidx);
}