Skip to content

Commit 1e5ba1e

Browse files
author
Ralph Küpper
committed
changelog: add fragment for #7731 (generator-attach-pacing)
1 parent 1c94138 commit 1e5ba1e

1 file changed

Lines changed: 34 additions & 0 deletions

File tree

Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
Fixed `cargo test -p perry-runtime --lib` being red on `main` — all three
2+
`gc::tests::runtime_roots::generator_attach_prototype` tests
3+
(`attach_prototype_survives_an_alloc_point_copying_minor_inside_the_call`,
4+
`attach_closure_prototype_survives_an_alloc_point_copying_minor_inside_the_call`,
5+
`the_shipped_default_defers_the_trigger_out_of_the_callees_window`) were
6+
failing, which blocks every open PR via the per-PR `--lib --bins` gate.
7+
8+
Bisected to #7723's `per_test_global!` conversion of the six
9+
generator-intrinsic-tower `AtomicI64` statics
10+
(`GENERATOR_FUNCTION_INTRINSIC_PTR` and siblings). That conversion is
11+
correct — it gives each test a guaranteed first-touch "tower not yet built"
12+
state instead of leaking cross-test priming through the process-global
13+
statics — but it exposed a pre-existing bug in this test file's own setup
14+
helper: `warm_generator_intrinsics()` called
15+
`js_generator_attach_prototype(TAG_UNDEFINED, 0)` to pre-build the tower
16+
before the timed call under test, and that call returns at its very first
17+
line for any non-pointer `obj`, so it never reached
18+
`generator_prototype_ptr` / `ensure_generator_intrinsics()` — it was always a
19+
no-op. Pre-#7723 this went unnoticed because some earlier test in the same
20+
binary had almost always already built the process-global tower, so the real
21+
call under test found it cached regardless.
22+
23+
With the towers per-test, the real call now pays the tower's own
24+
dozens-of-allocations build inside `build_generator_tower`'s `GcSuppressScope`
25+
(#7251's no-move window for that build), which swallows the test's injected
26+
arena trigger for the rest of the call — no copying minor ever runs, and by
27+
the time the window closes the following allocations no longer need a new
28+
arena block, so the trigger is never serviced.
29+
30+
Fixed `warm_generator_intrinsics()` to call
31+
`crate::object::ensure_generator_intrinsics()` directly (the same builder
32+
`gc::tests::lazy_intrinsic_towers` uses), so it does what its name and doc
33+
comment always claimed. The tests' own liveness/deferral assertions are
34+
unchanged.

0 commit comments

Comments
 (0)