FAILURE MAP
← Case archive

FA-90539 / Garbage collector invariants / Member archive

Reference processing: finalizers run every cycle · case 04

An unreachable object with a finalizer is resurrected forever and never freed.

Member previewVariant 4 · 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": [43], "freed": [46], "phantom": ["p2"], "weak": ["w1"]}, {"finalize": [43], "freed": [], "phantom": [], "weak": []}][{"finalize": [43], "freed": [46], "phantom": ["p2"], "weak": ["w1"]}, {"finalize": [], "freed": [43, 44, 45], "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 ↗