Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add section on installing afl.rs from source #44

Merged
merged 1 commit into from
Jul 21, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading