Skip to content

Statepoint native roots do not compile on x86-64: the compact-map rewriter refuses every module #7321

Description

@proggeramlug

PERRY_STATEPOINTS=1 cannot compile a single module on x86-64 Linux. The
compact-map rewriter refuses:

perry: this module emits an LLVM stack map that the compact-map rewriter could
not parse, so its GC roots would be invisible to the collector (the runtime
reads only the compact section). Refusing to emit a binary that would lose
roots silently.

Reproduced by gc-native-roots.yml itself: every run of that workflow since it
was pointed at ubuntu-latest has failed on the first probe
(01_nursery_churn), e.g. run 30823009708. The job has never been green there.

This is the fail-closed path working as designed — a refusal, not a rootless
binary — so there is no correctness exposure. What it means is scope: the
native-root mechanism is aarch64-only today
, and #7314's evidence
(test-drizzle-pg, 23,301 statepoints) was gathered on aarch64.

Likely cause, not verified here: crates/perry-codegen/src/gc_map.rs describes
its base registers in aarch64 terms throughout — DWARF_REG_FP_AARCH64 /
DWARF_REG_SP_AARCH64, and "LLVM also uses a callee-saved register (x19 on
aarch64) as a frame base pointer". The runtime decoder
(gc/roots/stack_maps.rs) maps its 2-bit base tag back onto the same two
aarch64 constants.

Blocks making statepoints the default root mechanism on any x86-64 target.

gc-native-roots.yml's statepoints-refuse-x86 job pins the refusal so it
stays a refusal, and fails the day x86-64 starts working — that is the prompt to
widen the aarch64 matrix and close this.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions