-
-
Notifications
You must be signed in to change notification settings - Fork 161
fix(compile): put PERRY_SEGVIEW in the cache identity, and clear the segment-view cursor at loop exit #9910
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -866,6 +866,19 @@ fn eligibility(args: &CompileArgs, project_root: &Path) -> Result<(), String> { | |
| if std::env::var("PERRY_SEGVIEW_DIAG").is_ok() { | ||
| return Err("segview-diag".to_string()); | ||
| } | ||
| // #9843: `PERRY_SEGVIEW` is NOT a diagnostic — it changes the emitted | ||
| // code. It is not part of the build-cache fingerprint or any object-cache | ||
| // key, so without this a cached build can hand back a binary compiled with | ||
| // the OTHER setting: compile a file with the tier on, compile it again | ||
| // with the tier off, and the second can be served from the first. The | ||
| // A/B rig's whole shape is "one compiler binary, two compiles of one | ||
| // source differing only in this variable", which is exactly the collision. | ||
| // Excluded rather than keyed because the tier is experimental and default | ||
| // OFF; a cache key is the right fix when it ships on, and then a stale | ||
| // entry cannot silently become the measurement. | ||
| if std::env::var("PERRY_SEGVIEW").is_ok() { | ||
| return Err("segview-lowering".to_string()); | ||
| } | ||
|
Comment on lines
+879
to
+881
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 🎯 Functional Correctness | 🟠 Major | ⚡ Quick win Register the cache-ineligible codegen variable in the audit.
Teach the audit that 🤖 Prompt for AI Agents |
||
| if args.verify_native_regions || args.emit_attest || args.emit_sandbox { | ||
| return Err("sidecar-or-verify".to_string()); | ||
| } | ||
|
|
||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🩺 Stability & Availability | 🟠 Major | 🏗️ Heavy lift
Clear the cursor on exception paths.
The statement at Line 1241 runs only after normal completion of the rewritten
For. If the loop body throws and an enclosingTrycatches the error, control skips this statement. The cursor local then remains a GC root while the catch or finally block can collect.Put the rewritten loop and cursor clear in a
Trywith the clear infinally. Add a regression test with a throwing loop body and an enclosing catch.As per coding guidelines, “A GC-managed value's root store must dominate every subsequent site that can collect.”
🤖 Prompt for AI Agents
Source: Coding guidelines