diff options
author | Alan Wu <XrXr@users.noreply.github.com> | 2023-11-27 19:19:41 -0500 |
---|---|---|
committer | Alan Wu <XrXr@users.noreply.github.com> | 2023-11-28 13:03:04 -0500 |
commit | cd4207869ff831c41db3ec873b175369ffca080a (patch) | |
tree | e3a63a06f41f952077aa84d2e300cf68b24ca113 /vm_insnhelper.c | |
parent | 0704f40787d306b00db6bbdfee7e13ee172f600a (diff) |
Fix cache incoherency for ME resolved through VM_METHOD_TYPE_REFINED
Previously, we didn't invalidate the method entry wrapped by
VM_METHOD_TYPE_REFINED method entries which could cause calls to
land in the wrong method like it did in the included test.
Do the invalidation, and adjust rb_method_entry_clone() to accommodate
this new invalidation vector.
Fix: cfd7729ce7a31c8b6ec5dd0e99c67b2932de4732
See-also: e201b81f79828c30500947fe8c8ea3c515e3d112
Diffstat (limited to 'vm_insnhelper.c')
-rw-r--r-- | vm_insnhelper.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/vm_insnhelper.c b/vm_insnhelper.c index 9f9d0fcfd8..9352820b82 100644 --- a/vm_insnhelper.c +++ b/vm_insnhelper.c @@ -4379,6 +4379,8 @@ vm_call_method_each_type(rb_execution_context_t *ec, rb_control_frame_t *cfp, st const rb_callable_method_entry_t *cme = vm_cc_cme(cc); VALUE v; + VM_ASSERT(! METHOD_ENTRY_INVALIDATED(cme)); + switch (cme->def->type) { case VM_METHOD_TYPE_ISEQ: CC_SET_FASTPATH(cc, vm_call_iseq_setup, TRUE); |