Monero: fix corpus zip file creation anew; enable honggfuzz&afl (#4200)

Co-authored-by: binaryFate <binaryfate@users.noreply.github.com>
This commit is contained in:
binaryFate 2020-07-27 17:42:35 +02:00 committed by GitHub
parent 2c34387f35
commit da87fd8944
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 19 additions and 7 deletions

View File

@ -26,7 +26,8 @@ mkdir -p build
cd build
export CXXFLAGS="$CXXFLAGS -fPIC"
cmake -D OSSFUZZ=ON -D STATIC=ON -D BUILD_TESTS=ON -D USE_LTO=OFF -D ARCH="default" ..
make -C tests/fuzz \
TESTS="\
base58_fuzz_tests \
block_fuzz_tests \
transaction_fuzz_tests \
@ -36,11 +37,20 @@ make -C tests/fuzz \
http-client_fuzz_tests \
levin_fuzz_tests \
bulletproof_fuzz_tests \
signature_fuzz_tests \
transaction_fuzz_tests \
cold-outputs_fuzz_tests \
cold-transaction_fuzz_tests \
tx-extra_fuzz_tests
tx-extra_fuzz_tests \
"
# only libfuzzer can run the slow to start ones
if test "x$FUZZING_ENGINE" == 'xlibfuzzer'
then
TESTS="$TESTS \
signature_fuzz_tests \
cold-outputs_fuzz_tests \
cold-transaction_fuzz_tests \
"
fi
make -C tests/fuzz $TESTS
cd /src/monero/monero/build/tests/fuzz
for fuzzer in *_fuzz_tests
@ -48,7 +58,7 @@ do
cp "$fuzzer" "$OUT"
base=$(echo $fuzzer | sed -e s/_fuzz_tests//)
cd "/src/monero/monero/tests/data/fuzz/$base"
rm -f "${OUT}/${base}_seed_corpus.zip"
rm -f "${OUT}/${fuzzer}_seed_corpus.zip"
for f in *
do
h=$(sha1sum "$f" | awk '{print $1}')

View File

@ -9,5 +9,7 @@ sanitizers:
- address
fuzzing_engines:
- libfuzzer
- afl
- honggfuzz
architectures:
- x86_64