FAILURE MAP
← Case archive

FA-90548 / Garbage collector invariants / Member archive

Reference processing: phantoms enqueued while referent is still finalizer-reachable · case 03

Cleanup actions run for objects that a pending finalizer can still reach.

Member previewVariant 3 · 3 implementations · 6 checks per implementation

Case contract

Each cycle: trace strong reachability from roots (weak and phantom references are not traced); weak references whose referent is not strongly reachable are cleared; pending finalizable objects that are not strongly reachable are queued for finalization once and resurrected together with everything they reach for this cycle; phantom references are enqueued only when their referent is not reachable even through the resurrected set; everything else is freed. Return per cycle the cleared weak refs, finalized objects, enqueued phantoms and freed objects.

Why this case matters

Reference-processing order decides whether code can observe resurrected or half-dead objects.

One recorded failure

Sample boundary fixture

This sample comes from the broken implementation of a controlled reproducer.

Boundary fixtureActualExpectedOutcome
regression: finalizable object over two cycles[{"finalize": [33], "freed": [36], "phantom": ["p1", "p2"], "weak": ["w1"]}, {"finalize": [], "freed": [33, 34, 35], "phantom": [], "weak": []}][{"finalize": [33], "freed": [36], "phantom": ["p2"], "weak": ["w1"]}, {"finalize": [], "freed": [33, 34, 35], "phantom": ["p1"], "weak": []}]Failed

MEMBER ARCHIVE

The complete case is available to members.

This record includes three runnable implementations, regression fixtures, execution results, and source hashes.

Member access is invitation-based. Sign in with your invited account to inspect the sources.

Sign in to the archive ↗