Found by the smoke-fuzz CI lane (2026-07-19, libabc@9131017):
SORTfuzz differential vs u64sSort dies in <10k iterations.
This is the "merge RESULT is independently broken ... tracked as
a separate ticket" note in test/SORT.c (MEM-003 session) —
this IS that ticket. Four defects compose; the net effect is the
sort emits only the global minimum (rest is stale memory), or
NOROOMs. SORTu64 has no production callers yet, so no data
paths are affected — but it blocks the smoke-fuzz CI lane.
assert fail element mismatch at
SORTfuzz:24; minimal input 16×0x22+\n = two equal u64
→ output {0x2222…, 0}. Reproduced locally (session
2026-07-19, WORK-011 journal)._X(next): the tie-collection loop guard is
0 == _X(z)($head(lsm), &next) — z is strict less-than and
next was just popped off a min-heap, so head >= next
always, z(head,next) always false → the loop drains the
ENTIRE heap as one "tie group". Args are swapped: the guard
must be 0 == _X(z)(&next, $head(lsm)) (tie ⟺ head==next).SORTu64y: emits only eqs[0] of a tie
group (dedup semantics); a sort must emit every tied
element. Combined with defect 1, the whole merge emits one
element, then *into += $len(from) claims full length →
tail is stale memory.$mv(from64, into) = whole idle
slice) instead of the n elements pass N wrote → NOROOM (or
garbage merged) whenever n > 64 and into is bigger than
n. The disabled test/SORT.c sizes buffers exactly to dodge
this; the fuzz harness (LEN1=1024) cannot.in pad is silently truncated (pre-ABC-007
dropped status) or NOROOMs (post-ABC-007 check). Unbounded
equal runs are legal sort input; flush the group when the
pad fills and let the next round carry the rest (order is
stable among equals).SORTfuzz iterations clean under ASan.SORTtest (commented out in
test/CMakeLists.txt) with the three seed cases — red on
base, green after; drop the "result is broken" caveat.SORTfuzz 10k smoke green; full
ctest green.y gets the same key in two calls, so
note the contract at the flush site.$len(from)), no $mv of caller slices; final
dir==NO copy checks the Feed status.