Skip to content

WIP: fuzzer - #316

Open
my4ng wants to merge 1 commit into
fitzgen:mainfrom
my4ng:fuzz
Open

WIP: fuzzer#316
my4ng wants to merge 1 commit into
fitzgen:mainfrom
my4ng:fuzz

Conversation

@my4ng

@my4ng my4ng commented Feb 26, 2026

Copy link
Copy Markdown
Contributor

This adds fuzzing using cargo-fuzz with the libfuzzer backend (setup).

// run fuzzer
cargo +nightly fuzz run fuzz_bump

// generate coverage.profdata (after run)
cargo +nightly fuzz cov fuzz_bump

To generate the coverage HTML report from the coverage.profdata is a bit more complicated (see).

There are still quite a few things to iron out:

  • increase coverage (currently ~45% of function coverage)
  • alloc_ methods are parameterised by a generic type T, which must be known at compile time. Current solution is generate a set of size/alignment pairs with macros, but this is of course hard-coded and potentially limiting. It also increases the compile time of the fuzzer significantly even with a small set.
  • GitHub workflow CI

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant