Skip to content

Commit a6a5a64

Browse files
committed
clippy, cfg fuzzing, docs
1 parent e3d369e commit a6a5a64

File tree

3 files changed

+21
-0
lines changed

3 files changed

+21
-0
lines changed

README.md

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -51,3 +51,22 @@ environment variable `AFL_NO_CFG_FUZZING` to `1` when building.
5151
[american-fuzzy-lop]: http://lcamtuf.coredump.cx/afl/
5252
[AFLplusplus]: https://aflplus.plus/
5353
[rust]: https://www.rust-lang.org
54+
55+
## IJON
56+
57+
If you want to use IJON - helping fuzzer coverage through code annotation - then
58+
have a look at the [maze example](afl/examples/maze.rs) how to use it.
59+
60+
You can find the AFL++ IJON documentation at [https://github.com/AFLplusplus/AFLplusplus/blob/stable/docs/IJON.md](https://github.com/AFLplusplus/AFLplusplus/blob/stable/docs/IJON.md)
61+
62+
Note that the IJON macros have been rustyfied to lowercase - hence `IJON_MAX(x)` is `ijon_max(x)` in Rust.
63+
64+
You will need to the following parts of cargo AFL:
65+
66+
```
67+
use afl::ijon_hashint;
68+
use afl::ijon_hashstr;
69+
use std::ffi::CString;
70+
```
71+
72+
plus any macros that you use, e.g. `afl::ijon_max`.

afl/examples/maze.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -197,6 +197,7 @@ fn main() {
197197
panic!("Exited the maze!");
198198
}
199199

200+
#[cfg(fuzzing)]
200201
ijon_set!(ijon_hashint(pos.0 as u32, pos.1 as u32));
201202
}
202203
});

cargo-afl/tests/integration.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -62,6 +62,7 @@ fn integration_cfg() {
6262
#[test]
6363
fn integration_maze() {
6464
if !common::plugins_available().unwrap_or_default() {
65+
#[allow(clippy::explicit_write)]
6566
writeln!(
6667
std::io::stderr(),
6768
"Skipping `integration_maze` test as plugins are unavailable"

0 commit comments

Comments
 (0)