You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
@@ -104,7 +104,7 @@ Once you got a crash, replay it easily in a debug environment
104
104
105
105
```sh
106
106
# builds the target in debug mode and replays automatically the crash in rust-lldb
107
-
cargo hfuzz run-debug example fuzzing_workspace/*.fuzz
107
+
cargo hfuzz run-debug example hfuzz_workspace/*/*.fuzz
108
108
```
109
109
110
110
You can also build and run your project without compile-time software instrumentation (LLVM's SanCov passes)
@@ -120,7 +120,7 @@ Clean
120
120
121
121
```sh
122
122
# a wrapper on "cargo clean" which cleans the fuzzing_target directory
123
-
cargo hfuzz clean
123
+
cargo hfuzz clean
124
124
```
125
125
126
126
Version
@@ -183,15 +183,16 @@ Honggfuzz input files (also called "corpus"), defaults to `$HFUZZ_WORKSPACE/{TAR
183
183
Sometimes, it is necessary to make some specific adaptation to your code to yield a better fuzzing efficiency.
184
184
185
185
For instance:
186
-
- Make you software behavior as much as possible deterministic on the fuzzing input
187
-
-[PRNG](https://en.wikipedia.org/wiki/Pseudorandom_number_generator)s must be seeded with a constant or the fuzzer input
188
-
- Behavior shouldn't change based on the computer's clock.
189
-
- Avoid potential undeterministic behavior from racing threads.
190
-
- ...
191
-
- Never ever call `std::process::exit()`.
192
-
- Disable logging and other unnecessary functionnalities.
193
-
- Try to avoid modifying global state when possible.
194
-
- Do not set up your own panic hook when run with `cfg(fuzzing)`
186
+
187
+
* Make you software behavior as much as possible deterministic on the fuzzing input
188
+
*[PRNG](https://en.wikipedia.org/wiki/Pseudorandom_number_generator)s must be seeded with a constant or the fuzzer input
189
+
* Behavior shouldn't change based on the computer's clock.
190
+
* Avoid potential undeterministic behavior from racing threads.
191
+
* ...
192
+
* Never ever call `std::process::exit()`.
193
+
* Disable logging and other unnecessary functionnalities.
194
+
* Try to avoid modifying global state when possible.
195
+
* Do not set up your own panic hook when run with `cfg(fuzzing)`
195
196
196
197
197
198
When building with `cargo hfuzz`, the argument `--cfg fuzzing` is passed to `rustc` to allow you to condition the compilation of thoses adaptations thanks to the `cfg` macro like so:
@@ -208,14 +209,15 @@ Also, when building in debug mode, the `fuzzing_debug` argument is added in addi
208
209
For more information about conditional compilation, please see the [reference](https://doc.rust-lang.org/reference/attributes.html#conditional-compilation).
There is other projects providing Rust fuzzing support at [github.com/rust-fuzz](https://github.com/rust-fuzz).
218
-
218
+
219
+
There is other projects providing Rust fuzzing support at [github.com/rust-fuzz](https://github.com/rust-fuzz).
220
+
219
221
You'll find support for [AFL](https://github.com/rust-fuzz/afl.rs) and LLVM's [LibFuzzer](https://github.com/rust-fuzz/cargo-fuzz) and there is also a [trophy case](https://github.com/rust-fuzz/trophy-case) ;-) .
0 commit comments