FAILURE MAP
← Case archive

FA-90409 / Garbage collector invariants / Member archive

Trial deletion: children whitened without being scanned · case 04

Cycle members beyond the first child stay gray and survive, while children with outside references are whitened.

Member previewVariant 4 · 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
regression: three-object garbage cycle{"garbage": [41, 42], "rc": {"43": 0}}{"garbage": [41, 42, 43], "rc": {}}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 ↗