Add AFL make target (runs for 10 minutes).

This commit is contained in:
Michael R Sweet 2021-11-29 20:59:30 -05:00
parent fa8e54cca2
commit 7ab550254a
No known key found for this signature in database
GPG Key ID: 999559A027815955

View File

@ -178,6 +178,13 @@ doc:
rm -f pdfio.xml rm -f pdfio.xml
# Fuzz-test the library <>
.PHONY: afl
afl:
$(MAKE) -$(MAKEFLAGS) CC="afl-clang" COMMONFLAGS="-g -fsanitize=address" clean all
afl-fuzz -x afl-pdf.dict -i afl-input -o afl-output -V 600 -e pdf -t 5000 ./testpdfio @@
# Analyze code with the Clang static analyzer <https://clang-analyzer.llvm.org> # Analyze code with the Clang static analyzer <https://clang-analyzer.llvm.org>
clang: clang:
clang $(CPPFLAGS) --analyze $(OBJS:.o=.c) 2>clang.log clang $(CPPFLAGS) --analyze $(OBJS:.o=.c) 2>clang.log