FAILURE MAP
← Case archive

FA-90724 / Garbage collector invariants / Member archive

Identity hash: moved objects hash their current address · case 04

hashCode changes after every collection that moves the object.

Member previewVariant 4 · 3 implementations · 6 checks per implementation

Case contract

objs maps id -> [address, size]. The identity hash of an object is (address >> 3) & 0xFFFF of the address at which it was first hashed. Objects start unhashed; hash marks them hashed and returns the hash computed from the current address while they have not moved. The first move of a hashed object stores that hash in a new 8-byte trailing slot (size grows by 8) and later moves keep it; moving an unhashed object stores nothing. Return all hashes and the final [address, size] layout.

Why this case matters

Moving collectors must keep identity hashes stable even though they are derived from addresses.

One recorded failure

Sample boundary fixture

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

Boundary fixtureActualExpectedOutcome
regression: hash survives a move{"hashes": [8204, 4096], "layout": {"1": [32768, 32], "2": [8192, 16], "3": [201272, 32]}}{"hashes": [8204, 8204], "layout": {"1": [32768, 32], "2": [8192, 16], "3": [201272, 32]}}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 ↗