From 97c32b49e2fe4de8b57ce05146e63b2aa64c7a44 Mon Sep 17 00:00:00 2001 From: "NARUSE, Yui" Date: Wed, 18 Jan 2023 17:18:44 +0900 Subject: merge revision(s) 43ff0c2c488c80aaf83b486d45bcd4a92ebe3848: [Backport #19299] YJIT: Fix `yield` into block with >=30 locals on ARM It's a register spill issue. Fix by moving the Qnil fill snippet to after registers are released. [Bug #19299] --- test/ruby/test_yjit.rb | 14 ++++++++++++++ yjit/src/codegen.rs | 29 ++++++++++++++--------------- 2 files changed, 28 insertions(+), 15 deletions(-) --- test/ruby/test_yjit.rb | 14 ++++++++++++++ 1 file changed, 14 insertions(+) (limited to 'test/ruby') diff --git a/test/ruby/test_yjit.rb b/test/ruby/test_yjit.rb index 0ad443c885..1a552a1074 100644 --- a/test/ruby/test_yjit.rb +++ b/test/ruby/test_yjit.rb @@ -1028,6 +1028,20 @@ class TestYJIT < Test::Unit::TestCase RUBY end + def test_invokeblock_many_locals + # [Bug #19299] + assert_compiles(<<~'RUBY', result: :ok) + def foo + yield + end + + foo do + a1=a2=a3=a4=a5=a6=a7=a8=a9=a10=a11=a12=a13=a14=a15=a16=a17=a18=a19=a20=a21=a22=a23=a24=a25=a26=a27=a28=a29=a30 = :ok + a30 + end + RUBY + end + private def code_gc_helpers -- cgit v1.2.3