diff options
| author | John Hawthorn <john@hawthorn.email> | 2025-07-04 11:58:39 -0700 |
|---|---|---|
| committer | John Hawthorn <john@hawthorn.email> | 2025-07-04 14:54:49 -0700 |
| commit | 8cd583269428bf0f83b474ea7718715ce96f441b (patch) | |
| tree | a06690b4b30ef83e6d0fe9cd0ba03c5101a62e09 /variable.c | |
| parent | 32453560de9ac10c4d234686c94696625916dea6 (diff) | |
Fix wrong write barrier on fields copy
Previously this write barrier was using the destination object as the
new parent, rather than the fields object.
Found by wbcheck
Diffstat (limited to 'variable.c')
| -rw-r--r-- | variable.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/variable.c b/variable.c index 69aedf1133..d9ef42e257 100644 --- a/variable.c +++ b/variable.c @@ -2331,7 +2331,7 @@ rb_copy_generic_ivar(VALUE dest, VALUE obj) new_fields_obj = rb_imemo_fields_new(rb_obj_class(dest), RSHAPE_CAPACITY(dest_shape_id)); VALUE *src_buf = rb_imemo_fields_ptr(fields_obj); VALUE *dest_buf = rb_imemo_fields_ptr(new_fields_obj); - rb_shape_copy_fields(dest, dest_buf, dest_shape_id, obj, src_buf, src_shape_id); + rb_shape_copy_fields(new_fields_obj, dest_buf, dest_shape_id, obj, src_buf, src_shape_id); RBASIC_SET_SHAPE_ID(new_fields_obj, dest_shape_id); RB_VM_LOCKING() { |
