Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 11 additions & 0 deletions .github/workflows/gc-native-roots.yml
Original file line number Diff line number Diff line change
Expand Up @@ -279,6 +279,17 @@ jobs:
export RUSTFLAGS="-C force-frame-pointers=yes -C force-unwind-tables=yes"
cargo build --profile perry-dev -p perry -p perry-runtime-static -p perry-stdlib-static

# #8075 is a loader shape, not another standalone-executable probe: the
# runtime and stdlib are process-wide providers, generated frames live in
# a later-loaded app-only dylib, and full GC runs from a clean host
# boundary. The gate owns the exact two-module JSON/Buffer fixture and
# requires 32,768 valid responses, >=10 full collections, retained and
# temporary Buffer classifications, concurrent producers serialized on
# one Perry executor, reclaimed temporary bytes, and a flat live slope.
- name: Provider dylib host-boundary full GC
if: ${{ !cancelled() && runner.os != 'Windows' }}
run: scripts/gc_provider_dylib_gate.sh

# The two aarch64 walkers, over a frame this repository wrote, on the host
# that has to walk it.
#
Expand Down
23 changes: 23 additions & 0 deletions changelog.d/8081-provider-gc-rooting.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
### Fixed

- Preserve native GC roots when Perry runs behind separately loaded runtime and
stdlib providers and generated application code lives in an app-only dynamic
library (#8075). The runtime previously indexed only the process executable's
compact stack map, then cached that incomplete view permanently. Provider
hosts could therefore complete a full collection at a clean host boundary
and corrupt values used by the next imported-handler invocation.

- Rebuild the stack-map index at module initialization and discover compact GC
maps in every loaded Mach-O or ELF image. Generation-ordered publication
prevents an older concurrent loader snapshot from replacing a newer index,
while root scanning never performs loader I/O. Linux fails closed rather
than publishing an incomplete index when a loaded ELF image cannot be read,
and section addresses are checked against the loader's mapped segments
before use.

- Add a provider-host integration gate for Linux and macOS. It builds separate
runtime and stdlib providers plus an app-only two-module dylib, validates
32,768 JSON/Buffer responses from serial and concurrently queued callers,
forces at least ten full collections, covers retained and temporary Buffers,
requires reclaimed bytes with a flat latter-half live set, verifies the app
map survives macOS dead stripping, and isolates provider build artifacts.
Loading
Loading