summaryrefslogtreecommitdiff
path: root/vm_insnhelper.c
diff options
context:
space:
mode:
authorJemma Issroff <[email protected]>2022-09-30 14:04:08 -0400
committerAaron Patterson <[email protected]>2022-09-30 12:41:12 -0700
commit850cfb021e2ee679bc62d3edc2246e5196630059 (patch)
tree0bfe4f476d5276d24420decad2a96a2087017a7c /vm_insnhelper.c
parent641310ce371bd220a5ddd5e54a86979f4055608b (diff)
Only assert ractor_shareable is consistent on ivar_set for T_OBJECT
Before d594a5a8bd0756f65c078fcf5ce0098250cba141, we were only asserting that the value on an ivar_get was ractor_sharable if the object was a T_OBJECT and also ractor shareable. We should still be doing this check only if the object is a T_OBJECT and ractor shareable
Notes
Notes: Merged: https://github.com/ruby/ruby/pull/6477
Diffstat (limited to 'vm_insnhelper.c')
-rw-r--r--vm_insnhelper.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/vm_insnhelper.c b/vm_insnhelper.c
index a915b1cf62..8d1369c604 100644
--- a/vm_insnhelper.c
+++ b/vm_insnhelper.c
@@ -1173,7 +1173,7 @@ vm_getivar(VALUE obj, ID id, const rb_iseq_t *iseq, IVC ic, const struct rb_call
}
val = ivar_list[index];
- VM_ASSERT(rb_ractor_shareable_p(obj) ? rb_ractor_shareable_p(val) : true);
+ VM_ASSERT(BUILTIN_TYPE(obj) == T_OBJECT && rb_ractor_shareable_p(obj) ? rb_ractor_shareable_p(val) : true);
}
else { // cache miss case
#if RUBY_DEBUG