Skip to content

Comments

[pull] master from ruby:master#96

Merged
pull[bot] merged 16 commits intoturkdevops:masterfrom
ruby:master
Jul 16, 2025
Merged

[pull] master from ruby:master#96
pull[bot] merged 16 commits intoturkdevops:masterfrom
ruby:master

Conversation

@pull
Copy link

@pull pull bot commented Jul 16, 2025

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 : )

mame and others added 16 commits July 16, 2025 15:48
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.
@pull pull bot locked and limited conversation to collaborators Jul 16, 2025
@pull pull bot added the ⤵️ pull label Jul 16, 2025
@pull pull bot merged commit 643ca81 into turkdevops:master Jul 16, 2025
1 of 2 checks passed
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants