Update the docs to default to afl-clang-lto. The afl-gcc (and other afl legacy fuzz engines) are still supported, though discouraged.
doc: Update fuzzing docs for afl-clang-lto #21398
pull MarcoFalke wants to merge 1 commits into bitcoin:master from MarcoFalke:2103-docFuzzAflPlusPlus changing 1 files +9 −10-
MarcoFalke commented at 5:55 PM on March 9, 2021: member
-
doc: Update fuzzing docs for afl-clang-lto fab633d2db
- MarcoFalke force-pushed on Mar 9, 2021
- DrahtBot added the label Docs on Mar 9, 2021
-
practicalswift commented at 10:44 PM on March 9, 2021: contributor
Concept ACK
Will verify instructions.
-
jarolrod commented at 10:53 PM on March 9, 2021: member
Concept ACK on moving from the stagnating afl to afl++
-
MarcoFalke commented at 8:09 AM on March 10, 2021: member
To compile afl-clang-lto, on Ubuntu you need clang-11 (or higher):
sudo apt install build-essential python3-dev automake flex bison libglib2.0-dev libpixman-1-dev python3-setuptools clang lld llvm llvm-dev -
MarcoFalke commented at 10:06 AM on March 13, 2021: member
The switch to afl++ is also being done by other major projects. E.g. https://github.com/google/oss-fuzz/pull/5046
- fanquake approved
-
fanquake commented at 8:48 AM on March 15, 2021: member
ACK fab633d2dbfed1efcc3a02061685d56327ae51fd - seems to work for me. Compiled and ran some fuzzers using Clang 11 on Bionic. Set
llvm-configso thatclang-11would be used overclang(10).make[1]: Entering directory '/home/ubuntu/bitcoin/AFLplusplus' [+] llvm_mode detected llvm 10+, enabling neverZero implementation and c++14 [+] llvm_mode detected llvm 11+, enabling afl-lto LTO implementation [+] shmat seems to be working. [*] Checking for working 'llvm-config'... [*] Checking for working '/usr/lib/llvm-11/bin/clang'... [*] Checking for matching versions of '/usr/lib/llvm-11/bin/clang' and 'llvm-config-11' [*] We have llvm-config version 11.0.0 with a clang version 11.0.0, good. -
MarcoFalke commented at 9:20 AM on March 15, 2021: member
@practicalswift Anything left to do here?
-
jarolrod commented at 5:26 PM on March 15, 2021: member
ACK fab633d2dbfed1efcc3a02061685d56327ae51fd, tested on Ubuntu Focal
Ran through the instructions. The afl++ error messages let you know if you are missing any packages. Was able to build
afl-clang-ltoand run through the examplethin-air-inputtest in the docs. Also tried building with llvm/clang-10 and ran through the same process withafl-clang-fast/fast++. - MarcoFalke merged this on Mar 15, 2021
- MarcoFalke closed this on Mar 15, 2021
- MarcoFalke deleted the branch on Mar 15, 2021
- sidhujag referenced this in commit da07265c8b on Mar 16, 2021
- DrahtBot locked this on Aug 16, 2022