1
0
Fork 0
mirror of https://github.com/ruby/ruby.git synced 2022-11-09 12:17:21 -05:00

Only assert ractor_shareable is consistent on ivar_set for T_OBJECT

Before d594a5a8bd, 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
This commit is contained in:
Jemma Issroff 2022-09-30 14:04:08 -04:00 committed by Aaron Patterson
parent 641310ce37
commit 850cfb021e
Notes: git 2022-10-01 04:41:34 +09:00

View file

@ -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