diff options
| author | Jemma Issroff <jemmaissroff@gmail.com> | 2022-09-30 14:04:08 -0400 |
|---|---|---|
| committer | Aaron Patterson <aaron.patterson@gmail.com> | 2022-09-30 12:41:12 -0700 |
| commit | 850cfb021e2ee679bc62d3edc2246e5196630059 (patch) | |
| tree | 0bfe4f476d5276d24420decad2a96a2087017a7c | |
| parent | 641310ce371bd220a5ddd5e54a86979f4055608b (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
| -rw-r--r-- | vm_insnhelper.c | 2 |
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 |
