Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

YJIT: Fix large ISeq rejection #7576

Merged
merged 1 commit into from Mar 21, 2023
Merged

Conversation

XrXr
Copy link
Member

@XrXr XrXr commented Mar 21, 2023

We crashed in some edge cases due to the recent change to not compile
encoded iseqs that are larger than u16::MAX.

  • Match the C signature of rb_yjit_constant_ic_update() and clamp down
    to IseqIdx size
  • Return failure instead of panicking with unwrap() in codegen when
    the iseq is too large

@XrXr XrXr force-pushed the yjit-abi-mismatch branch 2 times, most recently from f34d252 to 1ffc25a Compare March 21, 2023 17:07
We crashed in some edge cases due to the recent change to not compile
encoded iseqs that are larger than `u16::MAX`.

- Match the C signature of rb_yjit_constant_ic_update() and clamp down
  to `IseqIdx` size
- Return failure instead of panicking with `unwrap()` in codegen when
  the iseq is too large

Co-authored-by: Maxime Chevalier-Boisvert <maxime.chevalierboisvert@shopify.com>
Co-authored-by: Noah Gibbs <noah.gibbs@shopify.com>
@XrXr XrXr marked this pull request as ready for review March 21, 2023 18:20
@matzbot matzbot requested a review from a team March 21, 2023 18:21
@maximecb maximecb merged commit aa54082 into ruby:master Mar 21, 2023
@maximecb maximecb deleted the yjit-abi-mismatch branch March 21, 2023 18:24
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
2 participants