Skip to content

Commit dbb46dc

Browse files
committed
.
1 parent a59c08e commit dbb46dc

File tree

2 files changed

+2
-1
lines changed

2 files changed

+2
-1
lines changed

test/ruby/test_yjit.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -658,7 +658,7 @@ def foo(obj)
658658
end
659659

660660
def test_struct_aset_guards_recv_is_not_frozen
661-
assert_compiles(<<~RUBY), result: :ok
661+
assert_compiles(<<~RUBY, result: :ok, exits: { opt_send_without_block: 1 })
662662
def foo(obj)
663663
obj.foo = 123
664664
end

yjit/src/codegen.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8977,6 +8977,7 @@ fn gen_struct_aset(
89778977
// that the recv is not frozen.
89788978
// We know all structs are heap objects, so we can check the flag directly.
89798979
let recv = asm.stack_opnd(1);
8980+
let recv = asm.load(recv);
89808981
let flags = asm.load(Opnd::mem(VALUE_BITS, recv, RUBY_OFFSET_RBASIC_FLAGS));
89818982
asm.test(flags, (RUBY_FL_FREEZE as u64).into());
89828983
asm.jnz(Target::side_exit(Counter::opt_aset_frozen));

0 commit comments

Comments
 (0)