Skip to content

Commit 4e3db54

Browse files
author
Ralph Küpper
committed
docs(changelog): fragment for #8000 (GC-strategy define-header pin)
1 parent 02a3c3d commit 4e3db54

1 file changed

Lines changed: 30 additions & 0 deletions

File tree

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
### Codegen: pin the GC strategy onto the define line, in both root lowerings (#7982 follow-up)
2+
3+
#7998 made `LlFunction::define_header` the single renderer of the `define … {`
4+
line, after the in-process native path's private copy silently lost
5+
`gc "statepoint-example"` — a natively-constructed module then got no RS4GC
6+
pass and therefore **no precise roots at all**, while verifying, linking and
7+
running correctly on any program that does not collect.
8+
9+
The test that shipped with it does not actually pin that property, and the two
10+
attempts to fix it failed the same way the original bug did. Recorded because
11+
it is this change's own bug class occurring inside its own test:
12+
13+
1. The `to_ir` == `define_header` agreement test **cannot** see a dropped
14+
strategy: with one shared renderer both sides change identically. Sabotage
15+
passed.
16+
2. A dedicated strategy test that branched on `native_stack_roots_enabled()`
17+
never ran its ON arm under `cargo test` — no module has called
18+
`set_native_roots_for_target`, so the predicate is false in the test
19+
process. Sabotage passed again.
20+
3. Only pinning **both** lowerings with `NativeRootsPin::{native,shadow}`, and
21+
asserting `stack_map_slot_count` in each arm first so neither can pass
22+
vacuously, goes red on the sabotage.
23+
24+
Native-roots must take the stack-map path AND name the strategy; shadow-stack
25+
must not take it AND must not name the strategy. The tests live in
26+
`function.rs`, which compiles WITHOUT the `llvm-inprocess` feature, so they run
27+
in per-PR `cargo-test` rather than only in the feature job.
28+
29+
Sabotage-verified with the fix committed first, then restored and REBUILT: 935
30+
`perry-codegen` lib tests green under `--features llvm-inprocess`.

0 commit comments

Comments
 (0)