[pull] master from ruby:master#1031
Merged
Merged
Conversation
The final assertion of test_metaclass was identical to the one on line 161. Correcting to metametaclass_method_b.
Port the daily snapshot tarball pipeline from ruby/actions into ruby/ruby so the tarball build and per-OS tests run on every push and pull request. The make-snapshot composite action gains a srcdir input so the same logic can either clone ruby/ruby (daily upload from ruby/actions) or operate on the working tree (this workflow). Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
tool/make-snapshot reads HEAD via tool/lib/vcs.rb#_get_revisions and, on detached checkouts (pull_request, merge_group), parses "(HEAD detached at <ref>)" into branch name "pull/N/merge" which then breaks `git clone -b` in the export step. It also calls #upstream during ChangeLog generation, which requires the branch to track a remote. Fetch origin/master, force a local master at HEAD, and link its upstream so both lookups land on a real branch. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
zizmor flags inline `${{ inputs.X }}` expansions inside run scripts as
template-injection errors. Reusable workflow inputs come from the
in-repo caller and are trusted, but routing them through env avoids the
class of mistake entirely and silences the audit without per-line
ignores.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Add a daily 18:30 UTC schedule trigger to match the existing ruby/actions snapshot cron, and limit the Slack failure notifications in the reusable workflows to schedule runs. PRs and merge_group runs are still gated by the workflow's CI status, but won't spam the Snapshot/SimplerAlerts channels or fail on missing webhook secrets in forks. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
The composite action previously read $archname from the caller's job env, leaving the dependency implicit. Declare archname as a required input and pass it via with: so the action is self-contained and the linkage is visible at the call site. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Cherry-picking tarball-test.yml to maintenance branches previously required editing six places (four archname literals, branch-label, and the Materialize step). Route everything through env.BRANCH on the tarball job and expose it via outputs so downstream reusable workflow calls reference needs.tarball.outputs.branch. Maintenance branches now flip one line. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Promote test-bundler-parallel from a macos-14 include entry into the base test_task list so macos-15 picks it up too, and limit macos-15-intel to a single check job via include. The Intel runner is slower and noisier; running only check keeps coverage without paying for the full test set there. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
`rb_load_entrypoint` is used only by `rb_box_load`; it checks that the argument has two-elements (implicitly assuming it is an array), extracts its contents, and then simply discards the argument.
The hand-written `coroutine_transfer` in `coroutine/ppc64le/Context.S`
lacks the ELFv2 ABI global entry prologue. When the function is reached
via the PLT (lazy resolution path), r2 (TOC pointer) is left pointing
at whatever the resolver had loaded — typically the dynamic linker's
own TOC — instead of libruby's TOC.
The wrong r2 propagates through the fiber switch into `fiber_entry`,
which jumps into `fiber_restore_thread` → `rb_current_ec_set`. The
first PLT thunk inside the new fiber (`__plt___tls_get_addr` for the
`ruby_current_ec` thread-local) computes its GOT entry as
`r2 + offset` and segfaults dereferencing the bogus address.
This manifests as a SIGSEGV on any code path that uses fibers —
including `Enumerator#next`, so even a one-liner crashes:
ruby -e 'a=[1,2,3]; e=a.to_enum; loop { p e.next }'
# [BUG] Segmentation fault at 0x000000081009ac38
Reproduced on FreeBSD 16-CURRENT/powerpc64le with Ruby 4.0.4. The same
asm exists unchanged in 3.3 and 3.4, so they are likely affected as
well. Linux ppc64le may not hit this if its rtld preserves the caller's
r2 across PLT resolution, but per the ELFv2 ABI spec §2.3.1.2 a global
function entered via the PLT is responsible for setting up its own r2
from r12 — relying on the resolver is non-conformant.
The fix adds the standard two-instruction global entry prologue plus a
`.localentry` directive of 8, matching what the compiler emits for
ordinary C functions (e.g. `rb_current_ec_set` carries `<other: 0x60>`,
i.e. STO_PPC64_LOCAL=3). The local entry point now lands at the
original first instruction (`addi 1,1,-160`), so `coroutine_initialize`
in `Context.h` continues to work unchanged — `start + 8` (which skips
fiber_entry's global prologue to reach its local entry) is still
correct because the offset between global and local entry is identical
across all functions in this module.
References:
- Power Architecture 64-Bit ELF V2 ABI Specification, §2.3.1.2
"Function Calling Sequence"
- STO_PPC64_LOCAL encoding: §3.3 "Symbol Values"
Check that these two methods opposite always.
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.4)
Can you help keep this open source service alive? 💖 Please sponsor : )