aboutsummaryrefslogtreecommitdiff
path: root/fuzz/Makefile.am
diff options
context:
space:
mode:
authorToni Uhlig <matzeton@googlemail.com>2020-06-29 19:02:44 +0200
committerToni Uhlig <matzeton@googlemail.com>2020-06-29 19:07:59 +0200
commit4a6c525db845fc8f6564ce18963b91d153a5a354 (patch)
tree78b1d73db04724404f198397a2fe6d8a475a1212 /fuzz/Makefile.am
parent93a4a4387af951a4680061bf4e1effa87fa65406 (diff)
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 <matzeton@googlemail.com>
Diffstat (limited to 'fuzz/Makefile.am')
-rw-r--r--fuzz/Makefile.am14
1 files changed, 9 insertions, 5 deletions
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)