Add ASan for honggfuzz & speed-up AFL++ - #185
Merged
Merged
Conversation
Fix some clippy lints on the way. Add semver-checks to CI.
And enable verbose output for cargo afl config (compiling AFL++).
This allows to restrict harnesses to only certain fuzzers by editing their Cargo.toml: ```toml [package.metadata.ziggy] compat = ["afl"] ```
There was a problem hiding this comment.
Pull request overview
Enables optimized ASan fuzzing, restores persistent honggfuzz execution, and adds per-harness fuzzer compatibility metadata.
Changes:
- Adds honggfuzz ASan support and persistent fuzzing.
- Enables optimized AFL++ ASan builds and conditionally disables CMPLOG.
- Adds compatibility metadata handling, tests, and CI updates.
Reviewed changes
Copilot reviewed 13 out of 14 changed files in this pull request and generated 2 comments.
Show a summary per file
| File | Description |
|---|---|
.github/workflows/ci.yml |
Adds semver checks and pins nightly. |
Cargo.lock |
Refreshes dependency resolutions. |
Cargo.toml |
Adds Tokio feature compatibility. |
examples/asan/src/main.rs |
Preserves the ASan-triggering read. |
src/bin/cargo-ziggy/build.rs |
Enables honggfuzz ASan and optimized AFL++. |
src/bin/cargo-ziggy/coverage.rs |
Simplifies formatting expressions. |
src/bin/cargo-ziggy/fuzz.rs |
Gates CMPLOG and configures honggfuzz ASan. |
src/bin/cargo-ziggy/main.rs |
Adds fuzzer compatibility metadata handling. |
src/bin/cargo-ziggy/minimize.rs |
Simplifies formatting expressions. |
src/bin/cargo-ziggy/plot.rs |
Removes an unnecessary borrow. |
src/bin/cargo-ziggy/run.rs |
Removes forced ASan opt-level zero. |
src/bin/cargo-ziggy/triage.rs |
Simplifies directory checks. |
src/lib.rs |
Restores persistent honggfuzz looping. |
tests/asan_fuzz.rs |
Expands AFL++ and honggfuzz ASan tests. |
Suppressed comments (2)
src/bin/cargo-ziggy/main.rs:588
- This overwrites an explicit
--enginechoice: when both fuzzers are compatible, requesting AFL-only or honggfuzz-only is changed toAll; when only one is compatible, an explicitly incompatible choice is silently switched. Intersect the requested engine with compatibility and reject an empty intersection.
minimize.engine = match (with_afl, with_honggfuzz) {
(true, true) => FuzzingEngines::All,
(true, false) => FuzzingEngines::AFLPlusPlus,
(false, true) => FuzzingEngines::Honggfuzz,
_ => bail!("harness is not compatible with any fuzzer"),
src/bin/cargo-ziggy/main.rs:581
- These assignments discard explicit
--no-afl/--no-honggfuzzoptions whenever the corresponding engine is listed as compatible. Preserve user exclusions and only add exclusions required by metadata.
fuzz.no_afl = !with_afl;
fuzz.no_honggfuzz = !with_honggfuzz;
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
Comment on lines
+538
to
+540
| let compat: Vec<_> = meta | ||
| .workspace_default_packages() | ||
| .first()? |
Collaborator
Author
There was a problem hiding this comment.
e09a97a makes package selection more robust
Comment on lines
+576
to
+577
| build.no_afl = !with_afl; | ||
| build.no_honggfuzz = !with_honggfuzz; |
Collaborator
|
please see my comment plus the two from copilot. dunno about the workspace one, but the compact I agree. |
This reverts commit 1f69eb5.
Collaborator
|
Lgtm, thanks |
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.
Enable
--asanfor honggfuzz and remove theopt-level=0restriction for afl++ (fixes #130).Restore persistent fuzzing with honggfuzz and read metadata from Cargo.toml allowing to restrict a harness to certain fuzzers only:
when no metadata exists, it is assumed to compile for both afl++ and honggfuzz.