Skip to content

test(fuzz): add per-ISA codec variant fuzzer - #628

Open
hellobertrand wants to merge 2 commits into
mainfrom
test/fuzz-simd-variants
Open

hellobertrand wants to merge 2 commits into
mainfrom
test/fuzz-simd-variants

Conversation

@hellobertrand

@hellobertrand hellobertrand commented Nov 13, 2026 •

Copy link
Copy Markdown
Owner

Other fuzz targets build the dispatcher _default-only, leaving AVX2/AVX512 codepaths unexercised. Builds each ISA variant directly and fuzzes cross-variant decode/encode consistency at runtime.

Summary by CodeRabbit

  • Tests
    • Added fuzz testing that checks codec behavior across the default implementation and supported x86 variants, including compression, decoding, and output consistency.

Other fuzz targets build the dispatcher `_default`-only, leaving AVX2/AVX512 codepaths unexercised. Builds each ISA variant directly and fuzzes cross-variant decode/encode consistency at runtime.

Signed-off-by: Bertrand Lebonnois <5901952+hellobertrand@users.noreply.github.com>
@hellobertrand hellobertrand added the fuzzing OSS-Fuzz / ClusterFuzzLite label Nov 13, 2026
@coderabbitai

coderabbitai Bot commented Nov 13, 2026 •

Copy link
Copy Markdown
Contributor

Explain Change →

Important

Review skipped

Review was skipped as selected files did not have any reviewable changes.

Run configuration

  • Source mode: Auto
  • Repository: Unavailable
  • Branch: Unavailable
  • File: No configuration file from this repository applied
  • Commit: Unavailable
  • Layers: defaults
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: 871765d5-4b43-496f-8ef8-16efd07b1c28
Commits

Reviewing files that changed from the base of the PR and between 8735d67 and 15fe00d.

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • Trigger review

No actionable comments were generated in the recent review.

Walkthrough

The pull request adds a fuzzer that tests default and supported x86 codec variants. It updates the build script to compile and link variant objects when building on x86_64.

Changes: Codec Variant Fuzzer

Layer / File(s) Summary
Build and register codec variants
.clusterfuzzlite/build.sh, tests/fuzz/fuzz_variants.c
The build script shares common compiler flags and builds AVX2 and AVX-512 objects on x86_64. The fuzzer initializes a variant table with the default implementation and registers x86 variants when the required CPU features are available.
Exercise variant decoding and round trips
tests/fuzz/fuzz_variants.c
The fuzzer uses input controls to select codec options and variants. It checks untrusted blocks with fast and, except for RAW blocks, strict decoders. For nonempty input, it checks encoding, compares non-default encoder output with default output, and verifies decoding results.

Estimated code review effort: 3 (Moderate) | ~20 minutes

Change: Other

Merge Risk: Minimal · previous review 8735d

This change adds a fuzzer that exercises the per-ISA codec variants, and it only affects the fuzzing build. It does not touch production behavior, so merge risk is minimal.

Pre-merge checks: Passed 4

Check name Status Explanation
Description Check Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check Passed The title "test(fuzz): add per-ISA codec variant fuzzer" matches the main change. The PR adds tests/fuzz/fuzz_variants.c, a fuzzer that exercises the default and x86 AVX2 and AVX-512 codec variants di…
Linked Issues check Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check Passed Check skipped because no linked issues were found for this pull request.
Full details: Title check

Explanation

The title "test(fuzz): add per-ISA codec variant fuzzer" matches the main change. The PR adds tests/fuzz/fuzz_variants.c, a fuzzer that exercises the default and x86 AVX2 and AVX-512 codec variants directly. The build.sh changes add the matching variants fuzzer build. The title names the fuzzer and the per-ISA scope, which are the primary changes. It is concise and uses a conventional commit prefix.

Finishing Touches

Generate unit tests (beta)

  • Commit to this branch
  • Create a new PR
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

Share

Recent review info

Run configuration

  • Source mode: Auto
  • Repository: Unavailable
  • Branch: Unavailable
  • File: No configuration file from this repository applied
  • Commit: Unavailable
  • Layers: defaults
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: 852db2c2-52e7-4ada-ae16-86c1915eec03
Commits

Reviewing files that changed from the base of the PR and between 1cfad79 and 8735d67.

Files selected for processing: 2

  • .clusterfuzzlite/build.sh
  • tests/fuzz/fuzz_variants.c

Included review availability: This review used your included allowance. Your plan provides up to 4 included reviews per hour; 3 remain after this review.

@codecov

codecov Bot commented Nov 13, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.

📢 Thoughts on this report? Let us know!

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

fuzzing OSS-Fuzz / ClusterFuzzLite

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant