fix(gc): refuse the knob combination that emits a rootless binary (#7326) - #7332
Merged
Conversation
|
Caution Review failedThe pull request is closed. ℹ️ Recent review info⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Pro Plus Run ID: 📒 Files selected for processing (2)
📝 WalkthroughWalkthroughThe codegen now rejects ChangesRootless backend validation
Estimated code review effort: 2 (Simple) | ~10 minutes Possibly related PRs
Suggested reviewers: ✨ Finishing Touches📝 Generate docstrings
🧪 Generate unit tests (beta)
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. Comment |
This was referenced Aug 3, 2026
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 join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Fixes #7326.
PERRY_SHADOW_STACK=0+PERRY_STATEPOINTS=1produced a binary with no precise frame roots at all — no__perry_gcmapsection, same size as a plain shadow-off build, and it ran and printed the correct answer. Nothing distinguished it from a correct build until a collection moved something live.The cause is structural, not a missing check
The statepoint backends are an alternative lowering of the shadow stack's root-set analysis, not an independent mechanism.
reserve_shadow_slot()is the single entry point that, undernative_stack_roots_enabled(), allocates a stack-map slot instead — and the caller returns empty maps outright when the shadow stack is off. Switching one off switches the other off with it.The consequence for the adoption plan
Because they share this analysis, "delete the shadow stack and keep statepoints" is not currently expressible. Any plan treating them as two interchangeable mechanisms — including the one in
docs/engine-plan.md— needs that premise corrected before the swap can happen. That is a decoupling job, not a flag flip.Verified
cargo fmtclean.Summary by CodeRabbit
Bug Fixes
Documentation