2016-09-02 15:56:53 +00:00
|
|
|
#!/bin/bash -eu
|
|
|
|
|
|
|
|
./configure
|
2016-12-07 14:47:37 +00:00
|
|
|
make -j$(nproc) clean
|
|
|
|
make -j$(nproc) all
|
2016-09-02 15:56:53 +00:00
|
|
|
|
2018-11-07 18:20:02 +00:00
|
|
|
# Do not make check as there are tests that fail when compiled with MSAN.
|
|
|
|
# make -j$(nproc) check
|
|
|
|
|
2016-09-02 15:56:53 +00:00
|
|
|
$CXX $CXXFLAGS -std=c++11 -I. \
|
2016-11-18 19:16:38 +00:00
|
|
|
$SRC/zlib_uncompress_fuzzer.cc -o $OUT/zlib_uncompress_fuzzer \
|
2016-12-07 19:41:08 +00:00
|
|
|
-lFuzzingEngine ./libz.a
|
2018-11-07 18:20:02 +00:00
|
|
|
|
|
|
|
zip $OUT/seed_corpus.zip *.*
|
|
|
|
|
|
|
|
for f in $(find $SRC -name '*_fuzzer.c'); do
|
|
|
|
b=$(basename -s .c $f)
|
|
|
|
$CC $CFLAGS -I. $f -c -o /tmp/$b.o
|
|
|
|
$CXX $CXXFLAGS -o $OUT/$b /tmp/$b.o -stdlib=libc++ -lFuzzingEngine ./libz.a
|
|
|
|
rm -f /tmp/$b.o
|
|
|
|
ln -s $OUT/seed_corpus.zip $OUT/${b}_seed_corpus.zip
|
|
|
|
done
|