Enable the afl-clang-fast++
features deferred forkserver (__AFL_INIT
) and persistent mode (__AFL_LOOP(1000)
).
Before this patch:
0$ afl-fuzz -i input -o output -m512 -- src/test/test_bitcoin_fuzzy
1[*] Validating target binary...
2[!] WARNING: The target binary is pretty slow! See /usr/local/share/doc/afl/perf_tips.txt.
3[+] Here are some useful stats:
4
5 Test case count : 1 favored, 0 variable, 1 total
6 Bitmap range : 1072 to 1072 bits (average: 1072.00 bits)
7 Exec timing : 20.4k to 20.4k us (average: 20.4k us)
8…
9exec speed : 57.58/sec (slow!)
10exec speed : 48.35/sec (slow!)
11exec speed : 53.78/sec (slow!)
After this patch:
0$ afl-fuzz -i input -o output -m512 -- src/test/test_bitcoin_fuzzy
1[*] Validating target binary...
2[+] Persistent mode binary detected.
3[+] Deferred forkserver binary detected.
4[+] Here are some useful stats:
5
6 Test case count : 1 favored, 0 variable, 1 total
7 Bitmap range : 24 to 24 bits (average: 24.00 bits)
8 Exec timing : 114 to 114 us (average: 114 us)
9…
10exec speed : 15.9k/sec
11exec speed : 13.1k/sec
12exec speed : 15.1k/sec
For more fuzzing discussions, see #10364.