diff options
| author | nagachika <nagachika@ruby-lang.org> | 2024-07-20 15:12:36 +0900 |
|---|---|---|
| committer | nagachika <nagachika@ruby-lang.org> | 2024-07-20 15:12:36 +0900 |
| commit | 2ac8e2049bad37da38576b1ed263713c66eba2c9 (patch) | |
| tree | f0807ca143df1019faf325b08319f8746c9594ec /test/ruby | |
| parent | 4f1e047f86b159528055d37ee0da2ad6e5a38c23 (diff) | |
merge revision(s) e1104017e3080fd432c0b5fdc3ae6e004ffd0834: [Backport #19781]
YJIT: Fix cfp inconsistency on tailcall (#8107)
[Bug #19781]
Diffstat (limited to 'test/ruby')
| -rw-r--r-- | test/ruby/test_optimization.rb | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/test/ruby/test_optimization.rb b/test/ruby/test_optimization.rb index 80c3c3860b..88de3fa8b9 100644 --- a/test/ruby/test_optimization.rb +++ b/test/ruby/test_optimization.rb @@ -437,6 +437,20 @@ class TestRubyOptimization < Test::Unit::TestCase message(bug12565) {disasm(:add_one_and_two)}) end + def test_c_func_with_sp_offset_under_tailcall + tailcall("#{<<-"begin;"}\n#{<<~"end;"}") + begin; + def calc_one_plus_two + 1 + 2.abs + end + + def one_plus_two + calc_one_plus_two + end + end; + assert_equal(3, one_plus_two) + end + def test_tailcall_interrupted_by_sigint bug12576 = 'ruby-core:76327' script = "#{<<-"begin;"}\n#{<<~'end;'}" |
