summaryrefslogtreecommitdiff
path: root/vm.c
diff options
context:
space:
mode:
Diffstat (limited to 'vm.c')
-rw-r--r--vm.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/vm.c b/vm.c
index 646b92accf..902ac48847 100644
--- a/vm.c
+++ b/vm.c
@@ -1007,6 +1007,11 @@ vm_make_env_each(const rb_execution_context_t * const ec, rb_control_frame_t *co
}
#endif
+ // Invalidate JIT code that assumes cfp->ep == vm_base_ptr(cfp).
+ if (env->iseq) {
+ rb_yjit_invalidate_ep_is_bp(env->iseq);
+ }
+
return (VALUE)env;
}