|
160 | 160 | //!
|
161 | 161 | //! Honggfuzz input files (also called "corpus"), defaults to `$HFUZZ_WORKSPACE/{TARGET}/input`.
|
162 | 162 | //!
|
163 |
| -//! ## Conditionnal compilation |
| 163 | +//! ## Conditional compilation |
164 | 164 | //!
|
165 | 165 | //! Sometimes, it is necessary to make some specific adaptation to your code to yield a better fuzzing efficiency.
|
166 | 166 | //!
|
|
171 | 171 | //! - Avoid potential undeterministic behavior from racing threads.
|
172 | 172 | //! - ...
|
173 | 173 | //! - Never ever call `std::process::exit()`.
|
174 |
| -//! - Disable logging and other unnecessary functionnalities. |
| 174 | +//! - Disable logging and other unnecessary functionalities. |
175 | 175 | //! - Try to avoid modifying global state when possible.
|
176 | 176 | //!
|
177 | 177 | //!
|
178 |
| -//! 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: |
| 178 | +//! When building with `cargo hfuzz`, the argument `--cfg fuzzing` is passed to `rustc` to allow you to condition the compilation of those adaptations thanks to the `cfg` macro like so: |
179 | 179 | //!
|
180 | 180 | //! ```rust
|
181 | 181 | //! # use rand::{self, Rng, SeedableRng};
|
@@ -247,7 +247,7 @@ pub fn fuzz<F>(closure: F) where F: FnOnce(&[u8]) {
|
247 | 247 |
|
248 | 248 | // Registers a panic hook that aborts the process before unwinding.
|
249 | 249 | // It is useful to abort before unwinding so that the fuzzer will then be
|
250 |
| -// able to analyse the process stack frames to tell different bugs appart. |
| 250 | +// able to analyse the process stack frames to tell different bugs apart. |
251 | 251 | #[cfg(all(fuzzing, not(fuzzing_debug)))]
|
252 | 252 | lazy_static::lazy_static! {
|
253 | 253 | static ref PANIC_HOOK: () = {
|
@@ -277,7 +277,7 @@ pub fn fuzz<F>(closure: F) where F: FnOnce(&[u8]) {
|
277 | 277 |
|
278 | 278 | // We still catch unwinding panics just in case the fuzzed code modifies
|
279 | 279 | // the panic hook.
|
280 |
| - // If so, the fuzzer will be unable to tell different bugs appart and you will |
| 280 | + // If so, the fuzzer will be unable to tell different bugs apart and you will |
281 | 281 | // only be able to find one bug at a time before fixing it to then find a new one.
|
282 | 282 | // The closure is assumed to be unwind-safe, which might be unsafe. For more info, check the
|
283 | 283 | // [`std::panic::UnwindSafe`] trait.
|
|
0 commit comments