diff options
author | Jack Lloyd <[email protected]> | 2016-10-31 00:43:36 -0400 |
---|---|---|
committer | Jack Lloyd <[email protected]> | 2016-10-31 00:44:01 -0400 |
commit | 909490d3a2a8d96732c6428f0cf6e80b10afd560 (patch) | |
tree | 21628dd1cdd1e4d567203411022a68cef1a9faec /src/extra_tests | |
parent | 2608be4689132de0994abec11e83f31afd525ec3 (diff) |
More fixes for the fuzzer setup
[ci skip]
Diffstat (limited to 'src/extra_tests')
-rw-r--r-- | src/extra_tests/fuzzers/GNUmakefile | 14 | ||||
-rwxr-xr-x | src/extra_tests/fuzzers/setup.sh | 14 |
2 files changed, 14 insertions, 14 deletions
diff --git a/src/extra_tests/fuzzers/GNUmakefile b/src/extra_tests/fuzzers/GNUmakefile index 75b302bee..a086f8f1a 100644 --- a/src/extra_tests/fuzzers/GNUmakefile +++ b/src/extra_tests/fuzzers/GNUmakefile @@ -1,17 +1,15 @@ FUZZERS=$(patsubst jigs/%.cpp,%,$(wildcard jigs/*.cpp)) -BOTAN_DIR=botan - AFL_SAN_FLAGS=-fsanitize=address,undefined -fno-sanitize-recover=undefined CLANG_SAN_FLAGS=-fsanitize=address,undefined -fno-sanitize-recover=undefined -fsanitize-coverage=edge,indirect-calls,8bit-counters SHARED_FLAGS=-O3 -g -std=c++11 -pthread -LIBFUZZER_FLAGS=-DUSE_LLVM_FUZZER -I$(BOTAN_DIR)/llvm/build/include $(SHARED_FLAGS) $(CLANG_SAN_FLAGS) -AFL_FLAGS=-I$(BOTAN_DIR)/afl/build/include $(SHARED_FLAGS) +LIBFUZZER_FLAGS=-DUSE_LLVM_FUZZER -Illvm-build/build/include $(SHARED_FLAGS) $(CLANG_SAN_FLAGS) +AFL_FLAGS=-Iafl-build/build/include $(SHARED_FLAGS) -LIBFUZZER_LIBS=$(BOTAN_DIR)/llvm/libbotan-1.11.a libFuzzer.a -AFL_LIBS=$(BOTAN_DIR)/afl/libbotan-1.11.a +LIBFUZZER_LIBS=llvm-build/libbotan-1.11.a libFuzzer.a +AFL_LIBS=afl-build/libbotan-1.11.a #AFL_CXX=AFL_USE_ASAN=1 afl-g++ -m32 AFL_CXX=afl-clang-fast++ @@ -61,9 +59,5 @@ libFuzzer.a: libFuzzer cd libFuzzer && clang -c -g -O2 -std=c++11 *.cpp ar cr libFuzzer.a libFuzzer/*.o -setup: - svn co http://llvm.org/svn/llvm-project/llvm/trunk/lib/Fuzzer libFuzzer - update: - cd botan && git pull svn co http://llvm.org/svn/llvm-project/llvm/trunk/lib/Fuzzer libFuzzer diff --git a/src/extra_tests/fuzzers/setup.sh b/src/extra_tests/fuzzers/setup.sh index deda2ba25..a810d947b 100755 --- a/src/extra_tests/fuzzers/setup.sh +++ b/src/extra_tests/fuzzers/setup.sh @@ -6,11 +6,17 @@ mkdir corpus CFG_FLAGS="--with-debug-info --unsafe-fuzzer-mode --minimized-build --enable-modules=tls,chacha20poly1305,ocb,ccm,system_rng,auto_rng" +if [ ! -d libFuzzer ]; then + svn co http://llvm.org/svn/llvm-project/llvm/trunk/lib/Fuzzer libFuzzer +fi + +exit + # Just need the static lib, not CLI or tests -../../../configure.py $CFG_FLAGS --with-build-dir=afl --cc=clang --cc-bin='afl-clang-fast++' -make -f afl/Makefile afl/libbotan-1.11.a -j2 +../../../configure.py $CFG_FLAGS --with-build-dir=afl-build --cc=clang --cc-bin='afl-clang-fast++' +make -f afl-build/Makefile afl-build/libbotan-1.11.a -j8 CLANG_COV_FLAGS="-fsanitize=address,undefined -fsanitize-coverage=edge,indirect-calls,8bit-counters -fno-sanitize-recover=undefined" -../../../configure.py $CFG_FLAGS --with-build-dir=llvm --cc=clang "--cc-abi-flags=$CLANG_COV_FLAGS" -make -f llvm/Makefile llvm/libbotan-1.11.a -j2 +../../../configure.py $CFG_FLAGS --with-build-dir=llvm-build --cc=clang "--cc-abi-flags=$CLANG_COV_FLAGS" +make -f llvm-build/Makefile llvm-build/libbotan-1.11.a -j8 |