@@ -12,7 +12,7 @@ $ CC=clang CXX=clang++ ./configure --enable-fuzz --with-sanitizers=address,fuzze
1212# macOS users: If you have problem with this step then make sure to read "macOS hints for
1313# libFuzzer" on https://github.com/bitcoin/bitcoin/blob/master/doc/fuzzing.md#macos-hints-for-libfuzzer
1414$ make
15- $ src/test/fuzz/process_message
15+ $ FUZZ=process_message src/test/fuzz/fuzz
1616# abort fuzzing using ctrl-c
1717```
1818
@@ -26,7 +26,7 @@ If you specify a corpus directory then any new coverage increasing inputs will b
2626
2727``` sh
2828$ mkdir -p process_message-seeded-from-thin-air/
29- $ src/test/fuzz/process_message process_message-seeded-from-thin-air/
29+ $ FUZZ=process_message src/test/fuzz/fuzz process_message-seeded-from-thin-air/
3030INFO: Seed: 840522292
3131INFO: Loaded 1 modules (424174 inline 8-bit counters): 424174 [0x55e121ef9ab8, 0x55e121f613a6),
3232INFO: Loaded 1 PC tables (424174 PCs): 424174 [0x55e121f613a8,0x55e1225da288),
@@ -70,7 +70,7 @@ To fuzz `process_message` using the [`bitcoin-core/qa-assets`](https://github.co
7070
7171```sh
7272$ git clone https://github.com/bitcoin-core/qa-assets
73- $ src/test/fuzz/process_message qa-assets/fuzz_seed_corpus/process_message/
73+ $ FUZZ=process_message src/test/fuzz/fuzz qa-assets/fuzz_seed_corpus/process_message/
7474INFO: Seed: 1346407872
7575INFO: Loaded 1 modules (424174 inline 8-bit counters): 424174 [0x55d8a9004ab8, 0x55d8a906c3a6),
7676INFO: Loaded 1 PC tables (424174 PCs): 424174 [0x55d8a906c3a8,0x55d8a96e5288),
@@ -129,7 +129,7 @@ $ make
129129# try compiling using: AFL_NO_X86=1 make
130130$ mkdir -p inputs/ outputs/
131131$ echo A > inputs/thin-air-input
132- $ afl/afl-fuzz -i inputs/ -o outputs/ -- src/test/fuzz/bech32
132+ $ FUZZ=bech32 afl/afl-fuzz -i inputs/ -o outputs/ -- src/test/fuzz/fuzz
133133# You may have to change a few kernel parameters to test optimally - afl-fuzz
134134# will print an error and suggestion if so.
135135` ` `
@@ -153,7 +153,7 @@ $ cd ..
153153$ CC=$( pwd) /honggfuzz/hfuzz_cc/hfuzz-clang CXX=$( pwd) /honggfuzz/hfuzz_cc/hfuzz-clang++ ./configure --enable-fuzz --with-sanitizers=address,undefined
154154$ make
155155$ mkdir -p inputs/
156- $ honggfuzz/honggfuzz -i inputs/ -- src/test/fuzz/process_message
156+ $ FUZZ=process_message honggfuzz/honggfuzz -i inputs/ -- src/test/fuzz/fuzz
157157` ` `
158158
159159Read the [Honggfuzz documentation](https://github.com/google/honggfuzz/blob/master/docs/USAGE.md) for more information.
0 commit comments