Skip to content

Commit d6aba6f

Browse files
bors[bot]eddyp
andauthored
Merge #39
39: README.md: Fix run-debug example instructions & some formatting fixes r=PaulGrandperrin a=eddyp Co-authored-by: Eddy Petrișor <eddy.petrisor@gmail.com>
2 parents 652d8d9 + 18a174c commit d6aba6f

File tree

1 file changed

+19
-17
lines changed

1 file changed

+19
-17
lines changed

README.md

Lines changed: 19 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ Honggfuzz is a security oriented fuzzer with powerful analysis options. Supports
2727
* __Rust__: stable, beta, nightly
2828
* __OS__: GNU/Linux, macOS, FreeBSD, NetBSD, Android, WSL (Windows Subsystem for Linux)
2929
* __Arch__: x86_64, x86, arm64-v8a, armeabi-v7a, armeabi
30-
* __Sanitizer__: none, address, thread, leak
30+
* __Sanitizer__: none, address, thread, leak
3131

3232
## Dependencies
3333

@@ -42,7 +42,7 @@ Honggfuzz is a security oriented fuzzer with powerful analysis options. Supports
4242
For example on Debian and its derivatives:
4343

4444
```sh
45-
sudo apt install build-essential binutils-dev libunwind-dev libblocksruntime-dev
45+
sudo apt install build-essential binutils-dev libunwind-dev libblocksruntime-dev liblzma-dev
4646
```
4747

4848
## How to use this crate
@@ -67,7 +67,7 @@ Create a target to fuzz
6767
#[macro_use] extern crate honggfuzz;
6868

6969
fn main() {
70-
// Here you can parse `std::env::args and
70+
// Here you can parse `std::env::args and
7171
// setup / initialize your project
7272

7373
// You have full control over the loop but
@@ -104,7 +104,7 @@ Once you got a crash, replay it easily in a debug environment
104104

105105
```sh
106106
# 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
108108
```
109109

110110
You can also build and run your project without compile-time software instrumentation (LLVM's SanCov passes)
@@ -120,7 +120,7 @@ Clean
120120

121121
```sh
122122
# a wrapper on "cargo clean" which cleans the fuzzing_target directory
123-
cargo hfuzz clean
123+
cargo hfuzz clean
124124
```
125125

126126
Version
@@ -183,15 +183,16 @@ Honggfuzz input files (also called "corpus"), defaults to `$HFUZZ_WORKSPACE/{TAR
183183
Sometimes, it is necessary to make some specific adaptation to your code to yield a better fuzzing efficiency.
184184

185185
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)`
195196

196197

197198
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
208209
For more information about conditional compilation, please see the [reference](https://doc.rust-lang.org/reference/attributes.html#conditional-compilation).
209210

210211
## Relevant documentation about honggfuzz
212+
211213
* [USAGE](https://github.com/google/honggfuzz/blob/master/docs/USAGE.md)
212214
* [FeedbackDrivenFuzzing](https://github.com/google/honggfuzz/blob/master/docs/FeedbackDrivenFuzzing.md)
213215
* [PersistentFuzzing](https://github.com/google/honggfuzz/blob/master/docs/PersistentFuzzing.md)
214216

215217
## About Rust fuzzing
216-
217-
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+
219221
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) ;-) .
220222

221223
This crate was inspired by those projects!

0 commit comments

Comments
 (0)