Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
YJIT: Fix missing arity check for splat calls to methods with optionals
Previously, for splat callsites that land in methods with optional parameters, we didn't reject the case where the caller supplies too many arguments. Accepting those calls previously caused YJIT to construct corrupted control frames, which leads to crashes if the callee uses certain stack walking methods such as Kernel#raise and String#gsub (for setting up the frame-local `$~`). Example crash in a debug build: Assertion Failed: ../vm_core.h:1375:VM_ENV_FLAGS:FIXNUM_P(flags)
- Loading branch information
Showing
2 changed files
with
34 additions
and
3 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters