Skip to content

Commit

Permalink
YJIT: Fix cfp inconsistency on tailcall (#8107)
Browse files Browse the repository at this point in the history
[Bug #19781]
  • Loading branch information
k0kubun committed Jul 25, 2023
1 parent 99162de commit e110401
Showing 1 changed file with 14 additions and 0 deletions.
14 changes: 14 additions & 0 deletions test/ruby/test_optimization.rb
Expand Up @@ -437,6 +437,20 @@ def add_one_and_two
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;'}"
Expand Down

0 comments on commit e110401

Please sign in to comment.