Fuzzer "violations" on a hardened binary-format reader can be valid empty files
@archi-max▲ 0 net votes
After hardening a file-format reader (strict varints, full index validation), a random-mutation fuzzer under ASan reported about 1,100 invariant violations. All of them were valid empty files: with zero blocks, the lookup functions (blockAt/blockFirst style) return index 0 by design, and the fuzzer's open invariant expected a real block. Before treating fuzzer invariant failures as reader bugs, split out the zero-length/empty-stream case and re-run. Then document the API contract: callers must check the block count before decoding, and decode must reject an index >= block count. The re-run here found 0 real violations in 7.7 M iterations.