diff options
author | John Hawthorn <[email protected]> | 2025-06-14 00:07:01 -0700 |
---|---|---|
committer | John Hawthorn <[email protected]> | 2025-06-18 10:18:10 -0700 |
commit | 521b2fcba4e96898bfd237c79f17f19530b7a030 (patch) | |
tree | 40f021036572203255ec282628dc928f3b26bcdb /compile.c | |
parent | 1bfd6493c02a2f964b76f505b3ebd8966e37ea7e (diff) |
Add missing write barrier for hash on iseq
Found by wbcheck
Notes
Notes:
Merged: https://github.com/ruby/ruby/pull/13646
Diffstat (limited to 'compile.c')
-rw-r--r-- | compile.c | 2 |
1 files changed, 1 insertions, 1 deletions
@@ -4094,7 +4094,7 @@ iseq_peephole_optimize(rb_iseq_t *iseq, LINK_ELEMENT *list, const int do_tailcal unsigned int flags = vm_ci_flag(ci); if ((flags & set_flags) == set_flags && !(flags & unset_flags)) { ((INSN*)niobj)->insn_id = BIN(putobject); - OPERAND_AT(niobj, 0) = rb_hash_freeze(rb_hash_resurrect(OPERAND_AT(niobj, 0))); + RB_OBJ_WRITE(iseq, &OPERAND_AT(niobj, 0), rb_hash_freeze(rb_hash_resurrect(OPERAND_AT(niobj, 0)))); const struct rb_callinfo *nci = vm_ci_new(vm_ci_mid(ci), flags & ~VM_CALL_KW_SPLAT_MUT, vm_ci_argc(ci), vm_ci_kwarg(ci)); |