Add initial support for fuzzing
This commit is contained in:
1 parent
0be3900beb
commit
e51c988222
1 file changed
+19
@@ -107,6 +107,7 @@ clean:
|
|||||||
$(RM) *.exe *.s *~ *.o *.log a*.dat
|
$(RM) *.exe *.s *~ *.o *.log a*.dat
|
||||||
$(RM) *.gcda *.gcno *.gcov all.info test.tar *.synt clang_output_* *.c.c *.end.c *.first.c *.middle.c *.analyzer
|
$(RM) *.gcda *.gcno *.gcov all.info test.tar *.synt clang_output_* *.c.c *.end.c *.first.c *.middle.c *.analyzer
|
||||||
$(RMDIR) coverage coverage-dir mlib-report
|
$(RMDIR) coverage coverage-dir mlib-report
|
||||||
|
$(RMDIR) fuzzer-testsuite fuzzer-findings
|
||||||
|
|
||||||
distclean: clean
|
distclean: clean
|
||||||
$(RM) *.depend depend
|
$(RM) *.depend depend
|
||||||
@@ -246,6 +247,24 @@ analyze:
|
|||||||
$(MAKE) `ls test-*.c|$(SED) 's/\.c/\.analyzer/g'`
|
$(MAKE) `ls test-*.c|$(SED) 's/\.c/\.analyzer/g'`
|
||||||
|
|
||||||
|
|
||||||
|
#####################################################################################################
|
||||||
|
# Fuzzer (american fuzzy lop)
|
||||||
|
#####################################################################################################
|
||||||
|
|
||||||
|
FUZZ=
|
||||||
|
|
||||||
|
fuzz-generic:
|
||||||
|
$(MAKE) check-${FUZZ}.log CXX=afl-g++
|
||||||
|
mkdir -p fuzzer-testsuite
|
||||||
|
echo "0 1 2 3 4 5 6 7 8 9 10 11" > fuzzer-testsuite/t1
|
||||||
|
afl-fuzz -i fuzzer-testsuite/ -o fuzzer-findings ./check-${FUZZ}.exe -1
|
||||||
|
|
||||||
|
fuzz-array:
|
||||||
|
$(MAKE) fuzz-generic FUZZ=array
|
||||||
|
|
||||||
|
fuzz-list:
|
||||||
|
$(MAKE) fuzz-generic FUZZ=list
|
||||||
|
|
||||||
#####################################################################################################
|
#####################################################################################################
|
||||||
# Test with the maximum representative number of compiler and flags.
|
# Test with the maximum representative number of compiler and flags.
|
||||||
#####################################################################################################
|
#####################################################################################################
|
||||||
|
|||||||
Reference in new issue
Block a user