diff options
author | John MacFarlane <jgm@berkeley.edu> | 2017-06-27 23:03:53 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2017-06-27 23:03:53 +0200 |
commit | 153116f7fd955bbcfee5fe80996a4619c7a343c3 (patch) | |
tree | 8bbe02cdfdd4720cce9c69f2f552775338f66038 /Makefile | |
parent | 00291fd1811eba348f649f74f4c727625f0be945 (diff) | |
parent | a2f1f76dc38a34d0e3d97f75d1fee527931b6e8a (diff) |
Merge pull request #209 from philipturnbull/libFuzzer
Add libFuzzer harness for oss-fuzz
Diffstat (limited to 'Makefile')
-rw-r--r-- | Makefile | 10 |
1 files changed, 9 insertions, 1 deletions
@@ -14,6 +14,7 @@ BENCHFILE=$(BENCHDIR)/benchinput.md ALLTESTS=alltests.md NUMRUNS?=10 CMARK=$(BUILDDIR)/src/cmark +CMARK_FUZZ=$(BUILDDIR)/src/cmark-fuzz PROG?=$(CMARK) VERSION?=$(SPECVERSION) RELEASE?=CommonMark-$(VERSION) @@ -77,10 +78,17 @@ afl: $(AFL_PATH)/afl-fuzz \ -i test/afl_test_cases \ -o test/afl_results \ - -x test/afl_dictionary \ + -x test/fuzzing_dictionary \ -t 100 \ $(CMARK) $(CMARK_OPTS) +libFuzzer: + @[ -n "$(LIB_FUZZER_PATH)" ] || { echo '$$LIB_FUZZER_PATH not set'; false; } + mkdir -p $(BUILDDIR) + cd $(BUILDDIR) && cmake -DCMAKE_BUILD_TYPE=Asan -DCMARK_LIB_FUZZER=ON -DCMAKE_LIB_FUZZER_PATH=$(LIB_FUZZER_PATH) .. + $(MAKE) -j2 -C $(BUILDDIR) cmark-fuzz + test/run-cmark-fuzz $(CMARK_FUZZ) + clang-check: all ${CLANG_CHECK} -p build -analyze src/*.c |