Skip to content

Commit

Permalink
improve section about fuzzing
Browse files Browse the repository at this point in the history
  • Loading branch information
KillingSpark committed Dec 14, 2024
1 parent f526a23 commit a6f3541
Showing 1 changed file with 3 additions and 6 deletions.
9 changes: 3 additions & 6 deletions Readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -65,19 +65,16 @@ Tests take two forms.

## Fuzzing

Fuzzing has been done with cargo fuzz. Each time it crashes the decoder I fixed the issue and added the offending input as a test. It's checked into the repo in the fuzz/artifacts/fuzz_target_1 directory. Those get tested in the fuzz_regressions.rs test.
At the time of writing the fuzzer was able to run for over 12 hours on the random input without finding new crashes. Obviously this doesn't mean there are no bugs but the common ones are probably fixed.

Fuzzing has been done on

1. Random input with no initial corpus
2. The \*.zst in /fuzz_decodecorpus

### You wanna help fuzz?
### You want to help fuzz?

Use `cargo +nightly fuzz run decode` to run the fuzzer. It is seeded with files created with decodecorpus.
Use `cargo +nightly fuzz run decode` or some other fuzz target to run the fuzzer. It is seeded with files created with decodecorpus.

If (when) the fuzzer finds a crash it will be saved to the artifacts dir by the fuzzer. Run `cargo test artifacts` to run the artifacts tests.
If the fuzzer finds a crash it will be saved to the artifacts dir by the fuzzer. Run `cargo test artifacts` to run the artifacts tests.
This will tell you where the decoder panics exactly. If you are able to fix the issue please feel free to do a pull request. If not please still submit the offending input and I will see how to fix it myself.

# How can you use it?
Expand Down

0 comments on commit a6f3541

Please sign in to comment.