Skip to content

Commit 36d6901

Browse files
committed
ZJIT was failing CI, adding this lock will probably fix it
This lock should have been there in the first place, and it was just that the lock assertions weren't running in single ractor mode that we failed to recognize the issue.
1 parent aa7406d commit 36d6901

File tree

1 file changed

+5
-4
lines changed

1 file changed

+5
-4
lines changed

vm_method.c

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1514,10 +1514,11 @@ rb_check_overloaded_cme(const rb_callable_method_entry_t *cme, const struct rb_c
15141514
(int)vm_ci_argc(ci) == ISEQ_BODY(method_entry_iseqptr(cme))->param.lead_num) {
15151515
VM_ASSERT(cme->def->type == VM_METHOD_TYPE_ISEQ, "type: %d", cme->def->type); // iseq_overload is marked only on ISEQ methods
15161516

1517-
cme = get_overloaded_cme(cme);
1518-
1519-
VM_ASSERT(cme != NULL);
1520-
METHOD_ENTRY_CACHED_SET((struct rb_callable_method_entry_struct *)cme);
1517+
RB_VM_LOCKING() {
1518+
cme = get_overloaded_cme(cme);
1519+
VM_ASSERT(cme != NULL);
1520+
METHOD_ENTRY_CACHED_SET((struct rb_callable_method_entry_struct *)cme);
1521+
}
15211522
}
15221523

15231524
return cme;

0 commit comments

Comments
 (0)