Skip to content

Commit 521b2fc

Browse files
committed
Add missing write barrier for hash on iseq
Found by wbcheck
1 parent 1bfd649 commit 521b2fc

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
@@ -4094,7 +4094,7 @@ iseq_peephole_optimize(rb_iseq_t *iseq, LINK_ELEMENT *list, const int do_tailcal
40944094
unsigned int flags = vm_ci_flag(ci);
40954095
if ((flags & set_flags) == set_flags && !(flags & unset_flags)) {
40964096
((INSN*)niobj)->insn_id = BIN(putobject);
4097-
OPERAND_AT(niobj, 0) = rb_hash_freeze(rb_hash_resurrect(OPERAND_AT(niobj, 0)));
4097+
RB_OBJ_WRITE(iseq, &OPERAND_AT(niobj, 0), rb_hash_freeze(rb_hash_resurrect(OPERAND_AT(niobj, 0))));
40984098

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

0 commit comments

Comments
 (0)