Skip to content

Commit fab633d

Browse files
author
MarcoFalke
committed
doc: Update fuzzing docs for afl-clang-lto
1 parent ee0dc02 commit fab633d

File tree

1 file changed

+9
-10
lines changed

1 file changed

+9
-10
lines changed

doc/fuzzing.md

Lines changed: 9 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -108,33 +108,32 @@ Full configure that was tested on macOS Catalina with `brew` installed `llvm`:
108108
109109
Read the [libFuzzer documentation](https://llvm.org/docs/LibFuzzer.html) for more information. This [libFuzzer tutorial](https://github.com/google/fuzzing/blob/master/tutorial/libFuzzerTutorial.md) might also be of interest.
110110
111-
# Fuzzing Bitcoin Core using american fuzzy lop (`afl-fuzz`)
111+
# Fuzzing Bitcoin Core using afl++
112112
113113
## Quickstart guide
114114
115-
To quickly get started fuzzing Bitcoin Core using [`afl-fuzz`](https://github.com/google/afl):
115+
To quickly get started fuzzing Bitcoin Core using [afl++](https://github.com/AFLplusplus/AFLplusplus):
116116
117117
```sh
118118
$ git clone https://github.com/bitcoin/bitcoin
119119
$ cd bitcoin/
120-
$ git clone https://github.com/google/afl
121-
$ make -C afl/
122-
$ make -C afl/llvm_mode/
120+
$ git clone https://github.com/AFLplusplus/AFLplusplus
121+
$ make -C AFLplusplus/ source-only
123122
$ ./autogen.sh
124-
# It is possible to compile with afl-gcc and afl-g++ instead of afl-clang. However, running afl-fuzz
125-
# may require more memory via the -m flag.
126-
$ CC=$(pwd)/afl/afl-clang-fast CXX=$(pwd)/afl/afl-clang-fast++ ./configure --enable-fuzz
123+
# If afl-clang-lto is not available, see
124+
# https://github.com/AFLplusplus/AFLplusplus#a-selecting-the-best-afl-compiler-for-instrumenting-the-target
125+
$ CC=$(pwd)/AFLplusplus/afl-clang-lto CXX=$(pwd)/AFLplusplus/afl-clang-lto++ ./configure --enable-fuzz
127126
$ make
128127
# For macOS you may need to ignore x86 compilation checks when running "make". If so,
129128
# try compiling using: AFL_NO_X86=1 make
130129
$ mkdir -p inputs/ outputs/
131130
$ echo A > inputs/thin-air-input
132-
$ FUZZ=bech32 afl/afl-fuzz -i inputs/ -o outputs/ -- src/test/fuzz/fuzz
131+
$ FUZZ=bech32 AFLplusplus/afl-fuzz -i inputs/ -o outputs/ -- src/test/fuzz/fuzz
133132
# You may have to change a few kernel parameters to test optimally - afl-fuzz
134133
# will print an error and suggestion if so.
135134
```
136135
137-
Read the [`afl-fuzz` documentation](https://github.com/google/afl) for more information.
136+
Read the [afl++ documentation](https://github.com/AFLplusplus/AFLplusplus) for more information.
138137
139138
# Fuzzing Bitcoin Core using Honggfuzz
140139

0 commit comments

Comments
 (0)