mkdir -p /tmp/fuzz/inputs
mkdir -p /tmp/fuzz/outputs
mkdir -p /tmp/archive
pushd /tmp/archive
wget https://download.visucore.com/bitcoin/bitcoin_fuzzy_in.tar.xz
tar xvJf bitcoin_fuzzy_in.tar.xz
mv bitcoin_fuzzy_in/* /tmp/fuzz/inputs/
popd
mkdir build && cd build
./configure --disable-ccache --disable-shared --enable-tests \
--enable-fuzz CC=afl-clang-fast CXX=afl-clang-fast++
make
afl-fuzz -i /tmp/fuzz/inputs -o tmp/fuzz/outputs \
-m512 -- src/test/fuzz/address_deserialize
Escape with CTRL+C
rm -rf *
./configure --disable-ccache --enable-fuzz \
-with-sanitizers=fuzzer,address CC=clang CXX=clang++
pushd src
make test/fuzz_address_deserialize
popd
./src/test/fuzz/address_deserialize /tmp/fuzz/inputs
Escape with CTRL+C
mkdir -p ../buildcmake && cd ../buildcmake
cmake -GNinja .. -DCCACHE=OFF -DENABLE_SANITIZERS="fuzzer;address"
ninja fuzz-address_deserialize
./src/test/fuzz/address_deserialize /tmp/fuzz/inputs
Escape with CTRL+C
ninja bitcoin-fuzzers
Check all the fuzzers are built.