FAILURE MAP
← Case archive

FA-90398 / Garbage collector invariants / Member archive

Trial deletion: re-blackening does not restore counts · case 03

Live objects inspected by the collector come out with permanently lowered reference counts.

Member previewVariant 3 · 3 implementations · 7 checks per implementation

Case contract

Synchronous trial-deletion cycle collection. Reference counts are external references plus heap in-edges. For each candidate, mark gray: colour gray and, for every out-edge, decrement the child count and recurse. Then scan each candidate: a gray object with positive count is re-blackened together with everything it reaches, restoring one count per traversed edge; a gray object with zero count turns white and its children are scanned. White objects are garbage. Return the garbage and the counts of the surviving objects.

Why this case matters

Cycle collectors for reference-counted heaps depend on exact decrement/restore bookkeeping.

One recorded failure

Sample boundary fixture

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

Boundary fixtureActualExpectedOutcome
externally held cycle restores its counts{"garbage": [], "rc": {"31": 0, "32": 1}}{"garbage": [], "rc": {"31": 1, "32": 2}}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 ↗