Skip to content

Commit

Permalink
Add section on installing afl.rs from source
Browse files Browse the repository at this point in the history
  • Loading branch information
smoelius committed Jul 21, 2024
1 parent 8f04f40 commit 164f880
Show file tree
Hide file tree
Showing 3 changed files with 41 additions and 2 deletions.
1 change: 1 addition & 0 deletions src/SUMMARY.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,4 +12,5 @@
* [Fuzzing with afl.rs](./afl.md)
* [Setup](./afl/setup.md)
* [Tutorial](./afl/tutorial.md)
* [Installing from source](./afl/installing-from-source.md)
* [Trophy case](./trophy-case.md)
34 changes: 34 additions & 0 deletions src/afl/installing-from-source.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
# Installing from source

First, clone afl.rs:

```sh
git clone https://github.com/rust-fuzz/afl.rs
cd afl.rs
```

Next, checkout afl.rs's submodule ([AFL++]). Note that `--recursive` is not required.

```sh
git submodule update --init
```

Finally, install `cargo-afl`:

```sh
cargo install --path cargo-afl
```

## Troubleshooting

If `cargo-afl` is panicking, consider installing with `--debug` and running `cargo-afl` with `RUST_BACKTRACE=1`, e.g.:

```sh
cargo install --path cargo-afl --debug
...
RUST_BACKTRACE=1 cargo afl ...
```

Adding `--debug` to the `cargo install` command causes `cargo-afl` to produce more elaborate backtraces.

[AFL++]: https://github.com/AFLplusplus/AFLplusplus
8 changes: 6 additions & 2 deletions src/afl/setup.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@

### Tools

* C compiler (e.g. gcc or clang)
* make
- C compiler (e.g. gcc or clang)
- make

### Platform

Expand All @@ -15,8 +15,12 @@ afl.rs works on x86-64 Linux, x86-64 macOS, and ARM64 macOS.
cargo install cargo-afl
```

Alternatively, `cargo-afl` can be [installed from source].

## Upgrading

```sh
cargo install --force cargo-afl
```

[installed from source]: installing-from-source.md

0 comments on commit 164f880

Please sign in to comment.