From 4a6c525db845fc8f6564ce18963b91d153a5a354 Mon Sep 17 00:00:00 2001 From: Toni Uhlig Date: Mon, 29 Jun 2020 19:02:44 +0200 Subject: Improved fuzz_ndpi_reader which supports now SMP/MT w/o race-coniditions. ./tests/do.sh can supports SMP/MT via environment variables. Removed -fno-sanitize=shift as well, was fixed by 317d3ffd. Signed-off-by: Toni Uhlig --- fuzz/Makefile.am | 14 +++++++++----- 1 file changed, 9 insertions(+), 5 deletions(-) (limited to 'fuzz/Makefile.am') diff --git a/fuzz/Makefile.am b/fuzz/Makefile.am index 0b7304cf5..bdefa337b 100644 --- a/fuzz/Makefile.am +++ b/fuzz/Makefile.am @@ -1,4 +1,4 @@ -bin_PROGRAMS = fuzz_process_packet fuzz_ndpi_reader +bin_PROGRAMS = fuzz_process_packet fuzz_ndpi_reader fuzz_ndpi_reader_with_main fuzz_process_packet_SOURCES = fuzz_process_packet.c fuzz_process_packet_CFLAGS = @@ -6,8 +6,6 @@ fuzz_process_packet_LDFLAGS = ../src/lib/libndpi.a $(ADDITIONAL_LIBS) if HAS_FUZZLDFLAGS fuzz_process_packet_CFLAGS += $(LIB_FUZZING_ENGINE) fuzz_process_packet_LDFLAGS += $(LIB_FUZZING_ENGINE) -#else -# fuzz_process_packet_SOURCES += onefile.c endif # force usage of CXX for linker fuzz_process_packet_LINK=$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \ @@ -20,14 +18,20 @@ fuzz_ndpi_reader_LDFLAGS = ../example/libndpiReader.a ../src/lib/libndpi.a $(PCA if HAS_FUZZLDFLAGS fuzz_ndpi_reader_CFLAGS += $(LIB_FUZZING_ENGINE) fuzz_ndpi_reader_LDFLAGS += $(LIB_FUZZING_ENGINE) -#else -# fuzz_ndpi_reader_SOURCES += onefile.c endif # force usage of CXX for linker fuzz_ndpi_reader_LINK=$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \ $(LIBTOOLFLAGS) --mode=link $(CXX) $(AM_CXXFLAGS) $(CXXFLAGS) \ $(fuzz_ndpi_reader_LDFLAGS) $(LDFLAGS) -o $@ +fuzz_ndpi_reader_with_main_SOURCES = fuzz_ndpi_reader.c +fuzz_ndpi_reader_with_main_CFLAGS = -I../example/ -DBUILD_MAIN +fuzz_ndpi_reader_with_main_LDFLAGS = ../example/libndpiReader.a ../src/lib/libndpi.a $(PCAP_LIB) $(ADDITIONAL_LIBS) +# force usage of CXX for linker +fuzz_ndpi_reader_with_main_LINK=$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \ + $(LIBTOOLFLAGS) --mode=link $(CXX) $(AM_CXXFLAGS) $(CXXFLAGS) \ + $(fuzz_ndpi_reader_with_main_LDFLAGS) $(LDFLAGS) -o $@ + # required for Google oss-fuzz # see https://github.com/google/oss-fuzz/tree/master/projects/ndpi testpcaps := $(wildcard ../tests/pcap/*.pcap) -- cgit v1.2.3