@@ -8,7 +8,7 @@ To quickly get started fuzzing Bitcoin Core using [libFuzzer](https://llvm.org/d
8
8
$ git clone https://github.com/bitcoin/bitcoin
9
9
$ cd bitcoin/
10
10
$ ./autogen.sh
11
- $ CC=clang CXX=clang++ ./configure --enable-fuzz --with-sanitizers=address,fuzzer,undefined
11
+ $ CC=clang CXX=clang++ ./configure --enable-fuzz --with-sanitizers=address,fuzzer,undefined --enable-c++17
12
12
# macOS users: If you have problem with this step then make sure to read "macOS hints for
13
13
# libFuzzer" on https://github.com/bitcoin/bitcoin/blob/master/doc/fuzzing.md#macos-hints-for-libfuzzer
14
14
$ make
@@ -103,7 +103,7 @@ You may also need to take care of giving the correct path for `clang` and
103
103
Full configure that was tested on macOS Catalina with ` brew` installed ` llvm` :
104
104
105
105
` ` ` sh
106
- ./configure --enable-fuzz --with-sanitizers=fuzzer,address,undefined CC=/usr/local/opt/llvm/bin/clang CXX=/usr/local/opt/llvm/bin/clang++ --disable-asm
106
+ ./configure --enable-fuzz --with-sanitizers=fuzzer,address,undefined CC=/usr/local/opt/llvm/bin/clang CXX=/usr/local/opt/llvm/bin/clang++ --disable-asm --enable-c++17
107
107
` ` `
108
108
109
109
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.
@@ -121,7 +121,7 @@ $ git clone https://github.com/google/afl
121
121
$ make -C afl/
122
122
$ make -C afl/llvm_mode/
123
123
$ ./autogen.sh
124
- $ CC=$( pwd) /afl/afl-clang-fast CXX=$( pwd) /afl/afl-clang-fast++ ./configure --enable-fuzz
124
+ $ CC=$( pwd) /afl/afl-clang-fast CXX=$( pwd) /afl/afl-clang-fast++ ./configure --enable-fuzz --enable-c++17
125
125
$ make
126
126
# For macOS you may need to ignore x86 compilation checks when running "make". If so,
127
127
# try compiling using: AFL_NO_X86=1 make
@@ -148,7 +148,7 @@ $ git clone https://github.com/google/honggfuzz
148
148
$ cd honggfuzz/
149
149
$ make
150
150
$ cd ..
151
- $ CC=$( pwd) /honggfuzz/hfuzz_cc/hfuzz-clang CXX=$( pwd) /honggfuzz/hfuzz_cc/hfuzz-clang++ ./configure --enable-fuzz --with-sanitizers=address,undefined
151
+ $ CC=$( pwd) /honggfuzz/hfuzz_cc/hfuzz-clang CXX=$( pwd) /honggfuzz/hfuzz_cc/hfuzz-clang++ ./configure --enable-fuzz --with-sanitizers=address,undefined --enable-c++17
152
152
$ make
153
153
$ mkdir -p inputs/
154
154
$ honggfuzz/honggfuzz -i inputs/ -- src/test/fuzz/process_message
0 commit comments