Skip to content
Permalink
Browse files
Check env context before jump from OP_RETURN; fix #3673
  • Loading branch information
matz committed May 30, 2017
1 parent 27a5e10 commit ef1158485b9b0ef2e52d9f3a539b41ca3cb3f73d
Showing 1 changed file with 1 addition and 1 deletion.
@@ -1821,7 +1821,7 @@ mrb_vm_exec(mrb_state *mrb, struct RProc *proc, mrb_code *pc)
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;
}

0 comments on commit ef11584

Please sign in to comment.