[pull] master from ruby:master#96
Merged
pull[bot] merged 16 commits intoturkdevops:masterfrom Jul 16, 2025
Merged
Conversation
A command-call-like `not true` must be rejected after `&&` and `||`. https://bugs.ruby-lang.org/issues/21337 ruby/prism@0513cf22ad
Co-authored-by: Alan Wu <XrXr@users.noreply.github.com>
* ZJIT: Profile each instruction at most num_profiles times * Use saturating_add for num_profiles
…atching When arithmetic expressions like `-1**2` are used in pattern matching contexts, Ruby crashes with "Unexpected node type in pattern matching expression: PM_CALL_NODE". This happens because the Prism parser creates `PM_CALL_NODE` for arithmetic operations, but Ruby's pattern matching compiler doesn't handle call nodes. This fix adds validation to reject `PM_CALL_NODE` in pattern contexts with a proper syntax error. ruby/prism@365049a767
See: 58bc976 getpwnam(3) says the same thing. I got ENOENT in my Linux environment. 1) Failure: TestProcess#test_uid_from_name [/home/k0kubun/src/github.com/ruby/ruby/test/ruby/test_process.rb:1685]: Exception(ArgumentError) with message matches to /\u{4e0d 5b58 5728}/. [ArgumentError] exception expected, not #<Errno::ENOENT: No such file or directory - getpwnam_r>.
This is so that e.g. building with `--enable-zjit=dev` will test with the disassembly feature. It makes more sense, saves on build time and reveals that `backend::arm64::tests::sp_movements_are_single_instruction` was in fact failing with the `disasm` feature.
Previously, it issued CMN, which doesn't add to the stack pointer.
The raw bytes didn't disassemble to the disassembly, but we missed this since CI didn't run `make zjit-test` with the disasm feature. Fixes: 1317377 ("ZJIT: A64: Have add/sub to SP be single-instruction")
Previously, my buggy optimization would turn `asm.sub(imm, reg)` into `subs out, reg, imm` since it runs through the addition path which relies on the commutative property. Don't do that because subtraction does not commute. Good thing no one seems to use this form. Also, delete the 2 regs match arm for Add because it's already covered by the fallback arm -- both split_load_operand() and split_shifted_immediate() are no-op when the input is a register. Fixes: 1317377 ("ZJIT: A64: Have add/sub to SP be single-instruction")
The stack canary gets killed in test_yjit.rb:224 for some reason. Needs investigation. Example CI failure: https://github.com/ruby/ruby/actions/runs/16307837724/job/46057558066
ZJIT: run zjit-test-all on CI with seed ZJIT is still unstable and can crash intermittently running with Ruby tests. Adding a seed to avoid flakiness while we work on stability.
This file contains hidden or 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
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
See Commits and Changes for more details.
Created by
pull[bot] (v2.0.0-alpha.3)
Can you help keep this open source service alive? 💖 Please sponsor : )