Skip to content

Commit

Permalink
Fix code snippet attributes for baby fuzzer
Browse files Browse the repository at this point in the history
Specifically:
- Remove unnecessary `compile_fail` attribute
- Add `ignore` attribute to the snippets of the complete baby fuzzer. As
  explained in [AFLplusplus#1290], it is expected for the baby fuzzer to return a
  non-0 exit code, so this should not trigger a failure during `mdbook
  test`.
  • Loading branch information
kokkonisd committed May 24, 2023
1 parent 6bca078 commit a9874bc
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions docs/src/baby_fuzzer/baby_fuzzer.md
Original file line number Diff line number Diff line change
Expand Up @@ -143,7 +143,7 @@ Now we want to turn our simple fuzzer into a feedback-based one and increase the
We represent such map as a `static mut` variable.
As we don't rely on any instrumentation engine, we have to manually track the satisfied conditions by `signals_set` in our harness:

```rust,compile_fail
```rust
{{#rustdoc_include ../../listings/baby_fuzzer/listing-05/src/main.rs:signals}}
```

Expand Down Expand Up @@ -188,15 +188,15 @@ For instance, the `MutationalStage` executes the harness several times in a row,

As the last step, we create a MutationalStage that uses a mutator inspired by the havoc mutator of AFL.

```rust
```rust,ignore
{{#rustdoc_include ../../listings/baby_fuzzer/listing-06/src/main.rs:mutational_stage}}
```

`fuzz_loop` will request a testcase for each iteration to the fuzzer using the scheduler and then it will invoke the stage.

Again, we need to add the new `use` directives:

```rust
```rust,ignore
{{#rustdoc_include ../../listings/baby_fuzzer/listing-06/src/main.rs:use}}
```

Expand Down

0 comments on commit a9874bc

Please sign in to comment.