Skip to content

Commit

Permalink
YJIT: Add another regression test for empty splat
Browse files Browse the repository at this point in the history
Follow-up for 6c8ae44 ("YJIT: Fix out
of bounds access when splatting empty array"). This test crashes Ruby
3.3.2.
  • Loading branch information
XrXr committed Jun 3, 2024
1 parent 89ef139 commit 01f23dc
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions bootstraptest/test_yjit.rb
Original file line number Diff line number Diff line change
Expand Up @@ -4992,3 +4992,15 @@ def test_body(args) = callee(1, *args)
array.clear
test_body(array)
}

# regression test for splatting empty array to cfunc
assert_normal_exit %q{
def test_body(args) = Array(1, *args)
test_body([])
0x100.times do
array = Array.new(100)
array.clear
test_body(array)
end
}

0 comments on commit 01f23dc

Please sign in to comment.