Skip to content

Commit 6d33843

Browse files
jhawthornk0kubun
authored andcommitted
Add missing write barrier for hash on iseq
Found by wbcheck
1 parent 7de0955 commit 6d33843

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

compile.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4059,7 +4059,7 @@ iseq_peephole_optimize(rb_iseq_t *iseq, LINK_ELEMENT *list, const int do_tailcal
40594059
unsigned int flags = vm_ci_flag(ci);
40604060
if ((flags & set_flags) == set_flags && !(flags & unset_flags)) {
40614061
((INSN*)niobj)->insn_id = BIN(putobject);
4062-
OPERAND_AT(niobj, 0) = rb_hash_freeze(rb_hash_resurrect(OPERAND_AT(niobj, 0)));
4062+
RB_OBJ_WRITE(iseq, &OPERAND_AT(niobj, 0), rb_hash_freeze(rb_hash_resurrect(OPERAND_AT(niobj, 0))));
40634063

40644064
const struct rb_callinfo *nci = vm_ci_new(vm_ci_mid(ci),
40654065
flags & ~VM_CALL_KW_SPLAT_MUT, vm_ci_argc(ci), vm_ci_kwarg(ci));

0 commit comments

Comments
 (0)