Skip to content

GC: this holds a stale from-space pointer after a moving collection inside a method body #8495

Description

@proggeramlug

cargo test -p perry --test gc_property_key_operand_rooting_6935 fails 2 of 3 on main, under the forced-evacuation env the suite exists to exercise (PERRY_GC_FORCE_EVACUATE=1, PERRY_GC_VERIFY_EVACUATION=1):

proxy_target_set_survives_forced_evacuation ......... FAILED
property_key_stored_values_survive_forced_evacuation  FAILED
property_key_receivers_survive_forced_evacuation ....  ok

The compiled binaries exit 1 with values that came back missing across a collection:

FAIL proxy-forward-set.tag got=undefined want=30
TypeError: Cannot convert undefined or null to object

FAIL dyn-index-set payload missing
FAIL dyn-index-set-toprimitive payload missing
FAIL class-static-computed.tag got=undefined want=6

That is the unrooted-value-across-collection signature this suite was written for (#6935).

Bisected to f14a9e262 — "perf(compile): reduce generated bundle bloat" (#8418).

git bisect run over 526e0b502..74e806502 with a build-and-run script, 4 steps, converged cleanly on that commit. Reproduces locally on macOS (no Linux needed).

Reproduce:

cargo build --profile perry-dev -p perry -p perry-runtime-static -p perry-stdlib-static
PERRY_RUNTIME_DIR=$PWD/target/perry-dev \
  cargo test --profile perry-dev -p perry --test gc_property_key_operand_rooting_6935

Ruled out:

The likeliest remaining suspects inside #8418 are the ~304-line run_pipeline.rs restructuring and the collect_modules / json_module split, rather than the opt-in PERRY_LL_PREOPT_OPTNONE_INSTRS path (default 0 = disabled).

Why this is release-gating and why it appeared only now: cargo-test stops at its first failing suite, and the long-standing bun_ffi_stage1 abort (#8479, fixed in #8488) was ahead of it — so this has been masked. With that abort fixed, this is now the visible cargo-test failure, and cargo-test is required by full-suite-gate.

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