-
Notifications
You must be signed in to change notification settings - Fork 698
Update cargo-fuzz setup; split fuzz_value_sanitize
so it runs
#6372
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: develop
Are you sure you want to change the base?
Update cargo-fuzz setup; split fuzz_value_sanitize
so it runs
#6372
Conversation
- Fix compiler errors in `clarity/fuzz/` and refresh dependencies. - Move `fuzz_value_sanitize` into its own fuzz target so `cargo-fuzz` runs it. Notes: - Now builds and runs on `+nightly`. - I have not fully reviewed semantic validity; kept the diff minimal. - Prelude for stacks-network#6355 (Expand input coverage with fuzzing). How to: - List: `cargo +nightly fuzz list` - Build: `cargo +nightly fuzz build [target]` - Run: `cargo +nightly fuzz run fuzz_value_sanitize`
/cc @BowTiedRadone |
ad92993
to
f8db633
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I’ve added a bunch of comments about the workflows.
I’d also like to raise a broader structural idea: instead of keeping the fuzz
folder nested inside the clarity
crate, would it make sense to move it under the contrib/
folder?
We could, for example, introduce a dedicated fuzzing/
folder inside contrib/
, which could later house multiple fuzzers as we expand coverage. The current clarity/fuzz
would simply become one of them:
contrib/
fuzzing/
clarity-fuzzer/ (current clarity/fuzz)
other1-fuzzer/
other2-fuzzer/
...
This would avoid nested crates inside clarity
, make the structure more consistent, and give us room to organize future fuzzers without cluttering core crates.
If we agree this structure is beneficial, we could address it in this PR. The effort should be minimal, and since we’re already restoring the old fuzzer, could be the right time to make this change.
Right now it makes more sense to keep the That way it matches how we handle example-based and property-based tests, and keeps fuzzing a first-class part of the folder/crate rather than something tucked away in Also, with this structure, Moving it under I think it’s a good idea to tackle reorganizing later, once we add more fuzzers, so we can keep #6355 moving. |
f8db633
to
96c7ae8
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM!
Just adding a heads-up so we can make a common decision regarding cache management.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This looks good to me, I just had a question about re-using the generator implementations across the two targets.
Co-authored-by: wileyj <[email protected]>
This makes
clarity/fuzz/
build and actually run on nightly. It also movesfuzz_value_sanitize
into its own target socargo-fuzz
detects and runs it. Diff kept minimal.Notes:
How to:
cargo +nightly fuzz list
cargo +nightly fuzz build
cargo +nightly fuzz build fuzz_sanitize
cargo +nightly fuzz build fuzz_value_sanitize
cargo +nightly fuzz run fuzz_sanitize
cargo +nightly fuzz run fuzz_value_sanitize