Skip to content

fix(ci): pin the root-dominance corpus to the shadow-stack lowering - #7415

Merged
proggeramlug merged 2 commits into
mainfrom
fix/gc-root-dominance-corpus
Aug 5, 2026
Merged

fix(ci): pin the root-dominance corpus to the shadow-stack lowering#7415
proggeramlug merged 2 commits into
mainfrom
fix/gc-root-dominance-corpus

Conversation

@proggeramlug

@proggeramlug proggeramlug commented Aug 5, 2026

Copy link
Copy Markdown
Contributor

GC Root Dominance has been unable to return a verdict since #7370 made statepoints the default. Last green a3b35664c, first red 148f97bc2 = #7370.

It is gate breakage, not a dominance violation

error: 0 root store(s) in the corpus, need at least 1500. The subject of this
check never ran — a clean verdict here means the IR was not the IR you think it is
=== checked 2378 functions / 144 modules (144 .ll files, 0 root stores)

The checker's entire vocabulary is call void @js_shadow_slot_bind(...). Under the stack-map lowering, the final IR pass resolves those indices to native allocas and removes the callsFunctionCodegen::stack_map_slot_count says so directly. So the corpus compiled fine and contained zero of the thing being counted.

The --min-binds floor did exactly its job: it caught that the gate's own subject never ran, rather than reporting a clean violations: 0. CLAUDE.md's fourth hazard, working as designed.

The fix, and why pinning is sound

Both corpus scripts now set PERRY_RS4GC=0. #7340 split the root-set analysis from its lowering; this gate is about the analysis, which both backends share. The shadow stack also remains the production lowering wherever the runtime cannot walk frames. PERRY_RS4GC is already in the object-cache key, so no stale-object risk.

Measured — same binary, same source, only the knob differing:

arm=default   js_shadow_slot_bind calls = 0     ← reproduces the CI signature exactly
arm=rs4gc0    js_shadow_slot_bind calls = 9

This exact breakage was already fixed once

#7370 handled it for the unit tests — helpers.rs records that eight tests broke when the default flipped and were given NativeRootsPin::shadow(). The corpus shell scripts were the same breakage in a different idiom, and were missed.

Summary by CodeRabbit

  • Documentation
    • Documented the configuration used by the GC Root Dominance corpus scripts.
    • Recorded the rationale, measured bind counts, and corresponding unit-test adjustment.

Ralph Küpper added 2 commits August 5, 2026 07:25
The GC Root Dominance gate has been unable to return a verdict since
#7370 made statepoints the default.

The checker's entire vocabulary is `call void @js_shadow_slot_bind(...)`.
Under the stack-map lowering the final IR pass resolves those indices to
native allocas and REMOVES the calls (FunctionCodegen::stack_map_slot_count),
so the corpus compiled 144 modules containing zero root stores. The gate
reported violations: 0 and then refused to pass, because its --min-binds
floor caught that its own subject never ran. That is CLAUDE.md's fourth
hazard working exactly as designed.

Pinning PERRY_RS4GC=0 is sound rather than a dodge: #7340 split the
root-set analysis from its lowering, this gate is about the analysis, and
both backends share it. The shadow stack is also still the production
lowering wherever the runtime cannot walk frames.

Measured, same binary and source, only the knob differing:

  arm=default   js_shadow_slot_bind calls = 0
  arm=rs4gc0    js_shadow_slot_bind calls = 9

#7370 already fixed this for the unit tests -- helpers.rs records that
eight broke when the default flipped and were given NativeRootsPin::shadow().
The corpus shell scripts were the same breakage in another idiom, missed.
@coderabbitai

coderabbitai Bot commented Aug 5, 2026

Copy link
Copy Markdown

Review Change Stack

Caution

Review failed

The pull request is closed.

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro Plus

Run ID: 5c88a45b-22cd-4f20-879f-ce5c87dc0530

📥 Commits

Reviewing files that changed from the base of the PR and between 3ceffe6 and 39de4d1.

📒 Files selected for processing (1)
  • changelog.d/7415-dominance-corpus.md

📝 Walkthrough

Walkthrough

The changelog records the GC Root Dominance corpus configuration. It documents pinning PERRY_RS4GC=0 because default statepoint lowering removes js_shadow_slot_bind calls and causes the --min-binds gate to reject the corpus.

Changes

GC Root Dominance corpus

Layer / File(s) Summary
Document corpus validation configuration
changelog.d/7415-dominance-corpus.md
Documents the default-statepoint gate failure, measured bind counts, and pinning PERRY_RS4GC=0 in the corpus scripts.

Estimated code review effort: 1 (Trivial) | ~2 minutes

Possibly related PRs

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch fix/gc-root-dominance-corpus

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@proggeramlug
proggeramlug merged commit 9f63aa1 into main Aug 5, 2026
8 of 11 checks passed
@proggeramlug
proggeramlug deleted the fix/gc-root-dominance-corpus branch August 5, 2026 05:26
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant