diff options
| author | Yukihiro "Matz" Matsumoto <[email protected]> | 2017-07-01 12:30:15 +0900 |
|---|---|---|
| committer | Yukihiro "Matz" Matsumoto <[email protected]> | 2017-07-01 12:45:27 +0900 |
| commit | 9b8956cdd0165e1bc2295694720b5c70dba39fce (patch) | |
| tree | 6d37e8ae764b15114a3d39291e0e622d2d32b2af | |
| parent | 7d99830211ff50e1068dd1967a7abbe5f03db12f (diff) | |
| download | mruby-9b8956cdd0165e1bc2295694720b5c70dba39fce.tar.gz mruby-9b8956cdd0165e1bc2295694720b5c70dba39fce.zip | |
`break` should not cross fiber-context boundary; fix #3724
| -rw-r--r-- | src/vm.c | 3 |
1 files changed, 3 insertions, 0 deletions
@@ -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); } |
