Repository navigation
test(checksums): cargo-fuzz target for SIMD vs scalar parity (rolling + MD4/MD5) - #4101
Merged
Merged
Conversation
Adds simd_checksum_parity to the top-level fuzz/ harness. The target hands arbitrary libFuzzer bytes to every runtime-selected SIMD checksum dispatcher (RollingChecksum::update, strong::md5_digest_batch, strong::md4_digest_batch) and asserts each result matches an independent scalar reference. The on-tree run_simd_self_test sweeps a fixed input set; this target uses coverage-guided fuzzing to reach shapes the sweep does not cover (odd remainders past SIMD lane boundaries, repeated byte patterns, adversarial MD4/MD5 block-boundary transitions). Refs #2103.
oferchen
added a commit
that referenced
this pull request
May 18, 2026
Adds simd_checksum_parity to the top-level fuzz/ harness. The target hands arbitrary libFuzzer bytes to every runtime-selected SIMD checksum dispatcher (RollingChecksum::update, strong::md5_digest_batch, strong::md4_digest_batch) and asserts each result matches an independent scalar reference. The on-tree run_simd_self_test sweeps a fixed input set; this target uses coverage-guided fuzzing to reach shapes the sweep does not cover (odd remainders past SIMD lane boundaries, repeated byte patterns, adversarial MD4/MD5 block-boundary transitions). Refs #2103.
oferchen
added a commit
that referenced
this pull request
May 18, 2026
Adds simd_checksum_parity to the top-level fuzz/ harness. The target hands arbitrary libFuzzer bytes to every runtime-selected SIMD checksum dispatcher (RollingChecksum::update, strong::md5_digest_batch, strong::md4_digest_batch) and asserts each result matches an independent scalar reference. The on-tree run_simd_self_test sweeps a fixed input set; this target uses coverage-guided fuzzing to reach shapes the sweep does not cover (odd remainders past SIMD lane boundaries, repeated byte patterns, adversarial MD4/MD5 block-boundary transitions). Refs #2103.
oferchen
added a commit
that referenced
this pull request
Aug 24, 2026
Adds simd_checksum_parity to the top-level fuzz/ harness. The target hands arbitrary libFuzzer bytes to every runtime-selected SIMD checksum dispatcher (RollingChecksum::update, strong::md5_digest_batch, strong::md4_digest_batch) and asserts each result matches an independent scalar reference. The on-tree run_simd_self_test sweeps a fixed input set; this target uses coverage-guided fuzzing to reach shapes the sweep does not cover (odd remainders past SIMD lane boundaries, repeated byte patterns, adversarial MD4/MD5 block-boundary transitions). Refs #2103.
oferchen
added a commit
that referenced
this pull request
Aug 24, 2026
Adds simd_checksum_parity to the top-level fuzz/ harness. The target hands arbitrary libFuzzer bytes to every runtime-selected SIMD checksum dispatcher (RollingChecksum::update, strong::md5_digest_batch, strong::md4_digest_batch) and asserts each result matches an independent scalar reference. The on-tree run_simd_self_test sweeps a fixed input set; this target uses coverage-guided fuzzing to reach shapes the sweep does not cover (odd remainders past SIMD lane boundaries, repeated byte patterns, adversarial MD4/MD5 block-boundary transitions). Refs #2103.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
simd_checksum_parityto the top-levelfuzz/cargo-fuzz harness.dispatcher and compared against an independent scalar reference:
RollingChecksum::update(AVX2/SSE2/NEON) vs the per-byteupdate_bytepath, which never engages the SIMD accumulator.
strong::md5_digest_batch(AVX-512/AVX2/SSE4.1/SSSE3/SSE2/NEON) vs theRustCrypto-backed
strong::Md5::digest.strong::md4_digest_batch(same backend matrix) vsstrong::Md4::digest.checksums::run_simd_self_testalready cross-checks the samedispatchers, but only over a fixed input sweep. This target uses
coverage-guided fuzzing to hunt for shapes the sweep does not cover (odd
remainders past SIMD lane boundaries, repeated byte patterns, adversarial
transitions across MD4/MD5 block boundaries).
and partial lane handling regardless of active backend (AVX-512 = 16, AVX2
= 8, SSE2/NEON = 4 lanes).
Refs #2103.
Test plan
cargo +nightly fuzz build --fuzz-dir fuzz(verifies the new targetcompiles against the existing libfuzzer-sys gate).
cargo +nightly fuzz run simd_checksum_parity -- -max_total_time=60smoke run on a tier-1 host; no panics expected.