Skip to content

[pull] master from ruby:master - #1258

Merged
pull[bot] merged 17 commits into
turkdevops:masterfrom
ruby:master
Jul 29, 2026
Merged

[pull] master from ruby:master#1258
pull[bot] merged 17 commits into
turkdevops:masterfrom
ruby:master

Conversation

@pull

@pull pull Bot commented Jul 29, 2026

Copy link
Copy Markdown

See Commits and Changes for more details.


Created by pull[bot] (v2.0.0-alpha.4)

Can you help keep this open source service alive? 💖 Please sponsor : )

byroot and others added 17 commits July 29, 2026 07:48
Document the affected Clang and Autoconf versions.
We added state to `SetLocal` but didn't change `for_each_operand_impl`.
It's just an integer right shift.
st_table_size() is the number of entries, but ractor_memsize() adds the result to sizeof(rb_ractor_t) as a byte count, so a Ractor was reported as costing one byte per open port. Use st_memsize(), as ractor_selector_memsize() in this file already does for its own ports table.
Proc#refined memoizes {copied_iseq, cref} per source iseq in a
process-global map so the copy can be reused from any Ractor.  The
cref's refinements table is already frozen and marked shareable for
that reason, but the copied iseq and the memo array holding it are
left unshareable, so the shared payload is not actually a shareable
object graph.

Complete that intent: mark the copied iseq subtree shareable (it is
self-contained -- nested block iseqs are copied too) and mark the
frozen memo array shareable.  A copy's local_iseq/parent_iseq point at
already-shareable iseqs (other copies in the subtree, or the shareable
enclosing iseq), so the shareable check needs no special casing.
We only need the target blocks, not the argument vectors.
No need for hashing in LIR RPO.
Previously map_ptr<T>() took *const T, so a reference like &IseqPtr
silently coerced to *const IseqPtr and mapped the address of the
reference itself instead of the pointer value, which is how the bug
fixed by the previous commit slipped in.

Constrain the parameter with an ActualPtr trait implemented only for
*const T and *mut T, so passing a reference no longer compiles.

Co-authored-by: Max Bernstein <tekknolagi@gmail.com>
Co-authored-by: Alan Wu <XrXr@users.noreply.github.com>
The invokeblock fast path (InvokeBlockIseqDirect) passes captured self
plus each block argument in C argument registers, but
block_call_inlinable_iseq never bounded the argument count. Yielding 6+
arguments to a matching-arity block made gen_invoke_block_iseq_direct
emit a CCall with more operands than C_ARG_OPNDS, which aborts the
process in the backend:

  assertion failed: data.opnds.len() <= C_ARG_OPNDS.len()
  at zjit/src/backend/x86_64/mod.rs:302

Reject such blocks in block_call_inlinable_iseq so both the guarded and
the inlined-caller yield paths fall back to VM dispatch.
Co-authored-by: Kevin Menard <kevin@nirvdrum.com>
@pull pull Bot locked and limited conversation to collaborators Jul 29, 2026
@pull pull Bot added the ⤵️ pull label Jul 29, 2026
@pull
pull Bot merged commit 20449aa into turkdevops:master Jul 29, 2026
1 of 3 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.

7 participants