summaryrefslogtreecommitdiff
path: root/test/ruby
diff options
context:
space:
mode:
authorNARUSE, Yui <naruse@airemix.jp>2023-01-18 17:18:44 +0900
committerNARUSE, Yui <naruse@airemix.jp>2023-01-18 17:18:44 +0900
commit97c32b49e2fe4de8b57ce05146e63b2aa64c7a44 (patch)
treef145b3c0300a78e7b70ca28e841555243a0d39d7 /test/ruby
parent52ea5ea9906c3a96c60a68e01b303672602a6832 (diff)
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(-)
Diffstat (limited to 'test/ruby')
-rw-r--r--test/ruby/test_yjit.rb14
1 files changed, 14 insertions, 0 deletions
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