Check env context before jump from OP_RETURN; fix #3673

This commit is contained in:
Yukihiro "Matz" Matsumoto
2017-05-30 15:42:10 +09:00
parent 27a5e10454
commit ef1158485b
+1 -1
View File
@@ -1821,7 +1821,7 @@ RETRY_TRY_BLOCK:
struct REnv *e = top_env(mrb, proc);
mrb_callinfo *ce;
if (!MRB_ENV_STACK_SHARED_P(e)) {
if (!MRB_ENV_STACK_SHARED_P(e) || e->cxt.c != mrb->c) {
localjump_error(mrb, LOCALJUMP_ERROR_RETURN);
goto L_RAISE;
}