changeset 1370:dd5d7b7141b9 fuzz

create fuzzer .options files
author Matt Johnston <matt@ucc.asn.au>
date Tue, 23 May 2017 22:43:52 +0800
parents ddfcadca3c4c
children bc9e2e148f58
files Makefile.in
diffstat 1 files changed, 7 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/Makefile.in	Tue May 23 22:43:34 2017 +0800
+++ b/Makefile.in	Tue May 23 22:43:52 2017 +0800
@@ -247,6 +247,8 @@
 # list of fuzz targets
 FUZZ_TARGETS=fuzzer-preauth fuzzer-pubkey
 
+FUZZER_OPTIONS = $(addsuffix .options, $(FUZZ_TARGETS))
+
 list-fuzz-targets:
 	@echo $(FUZZ_TARGETS)
 
@@ -260,7 +262,7 @@
 # build all the fuzzers. This will require fail to link unless built with
 # make fuzzers LIBS=-lFuzzer.a 
 # or similar - the library provides main().
-fuzz-targets: $(FUZZ_TARGETS)
+fuzz-targets: $(FUZZ_TARGETS) $(FUZZER_OPTIONS)
 
 fuzzer-preauth: fuzzer-preauth.o $(HEADERS) $(LIBTOM_DEPS) Makefile $(svrfuzzobjs)
 	$(CXX) $(CXXFLAGS) [email protected] $(LDFLAGS) $(svrfuzzobjs) -o $@$(EXEEXT) $(LIBTOM_LIBS) $(LIBS) $(FUZZLIB) @CRYPTLIB@
@@ -268,6 +270,10 @@
 fuzzer-pubkey: fuzzer-pubkey.o $(HEADERS) $(LIBTOM_DEPS) Makefile $(svrfuzzobjs)
 	$(CXX) $(CXXFLAGS) [email protected] $(LDFLAGS) $(svrfuzzobjs) -o $@$(EXEEXT) $(LIBTOM_LIBS) $(LIBS) $(FUZZLIB) @CRYPTLIB@
 
+fuzzer-%.options: Makefile
+	echo "[libfuzzer]"               > $@
+	echo "max_len = 50000"          >> $@
+
 # run this to update hardcoded hostkeys for for fuzzing. 
 # hostkeys.c is checked in to hg.
 fuzz-hostkeys: