changeset 43816:d37658efbec2

fuzz: remove legacy setup for running fuzzers outside oss-fuzz We don't need this anymore. Differential Revision: https://phab.mercurial-scm.org/D7567
author Augie Fackler <augie@google.com>
date Fri, 06 Dec 2019 15:21:45 -0500
parents 19da643dc10c
children d9f85f61f0ed
files contrib/fuzz/Makefile contrib/fuzz/bdiff.cc contrib/fuzz/mpatch.cc contrib/fuzz/xdiff.cc
diffstat 4 files changed, 0 insertions(+), 54 deletions(-) [+]
line wrap: on
line diff
--- a/contrib/fuzz/Makefile	Fri Dec 06 15:08:37 2019 -0500
+++ b/contrib/fuzz/Makefile	Fri Dec 06 15:21:45 2019 -0500
@@ -23,15 +23,6 @@
 	  `$(PYTHON_CONFIG) --cflags` \
 	  -I../../mercurial -c -o pyutil.o pyutil.cc
 
-bdiff.o: ../../mercurial/bdiff.c
-	$(CC) $(CFLAGS) -fsanitize=fuzzer-no-link,address -c -o bdiff.o \
-	  ../../mercurial/bdiff.c
-
-bdiff: bdiff.cc bdiff.o 
-	$(CXX) $(CXXFLAGS) -DHG_FUZZER_INCLUDE_MAIN=1 -g -O1 -fsanitize=fuzzer-no-link,address \
-	  -std=c++17 \
-	  -I../../mercurial bdiff.cc bdiff.o -o bdiff
-
 bdiff-oss-fuzz.o: ../../mercurial/bdiff.c
 	$(CC) $(CFLAGS) -c -o bdiff-oss-fuzz.o ../../mercurial/bdiff.c
 
@@ -44,11 +35,6 @@
 	$(CC) -g -O1 -fsanitize=fuzzer-no-link,address -c -o mpatch.o \
 	  ../../mercurial/mpatch.c
 
-mpatch: CXXFLAGS += -std=c++17
-mpatch: mpatch.cc mpatch.o
-	$(CXX) $(CXXFLAGS) -DHG_FUZZER_INCLUDE_MAIN=1 -g -O1 -fsanitize=fuzzer-no-link,address \
-	  -I../../mercurial mpatch.cc mpatch.o -o mpatch
-
 mpatch-oss-fuzz.o: ../../mercurial/mpatch.c
 	$(CC) $(CFLAGS) -c -o mpatch-oss-fuzz.o ../../mercurial/mpatch.c
 
@@ -60,17 +46,6 @@
 mpatch_corpus.zip:
 	python mpatch_corpus.py $$OUT/mpatch_fuzzer_seed_corpus.zip
 
-x%.o: ../../mercurial/thirdparty/xdiff/x%.c ../../mercurial/thirdparty/xdiff/*.h
-	$(CC) -g -O1 -fsanitize=fuzzer-no-link,address -c \
-	  -o $@ \
-	  $<
-
-xdiff: CXXFLAGS += -std=c++17
-xdiff: xdiff.cc xdiffi.o xprepare.o xutils.o 
-	$(CXX) $(CXXFLAGS) -DHG_FUZZER_INCLUDE_MAIN=1 -g -O1 -fsanitize=fuzzer-no-link,address \
-	  -I../../mercurial xdiff.cc \
-	  xdiffi.o xprepare.o xutils.o -o xdiff
-
 fuzz-x%.o: ../../mercurial/thirdparty/xdiff/x%.c ../../mercurial/thirdparty/xdiff/*.h
 	$(CC) $(CFLAGS) -c \
 	  -o $@ \
--- a/contrib/fuzz/bdiff.cc	Fri Dec 06 15:08:37 2019 -0500
+++ b/contrib/fuzz/bdiff.cc	Fri Dec 06 15:21:45 2019 -0500
@@ -36,12 +36,4 @@
 	return 0; // Non-zero return values are reserved for future use.
 }
 
-#ifdef HG_FUZZER_INCLUDE_MAIN
-int main(int argc, char **argv)
-{
-	const char data[] = "asdf";
-	return LLVMFuzzerTestOneInput((const uint8_t *)data, 4);
-}
-#endif
-
 } // extern "C"
--- a/contrib/fuzz/mpatch.cc	Fri Dec 06 15:08:37 2019 -0500
+++ b/contrib/fuzz/mpatch.cc	Fri Dec 06 15:21:45 2019 -0500
@@ -111,17 +111,4 @@
 	return 0;
 }
 
-#ifdef HG_FUZZER_INCLUDE_MAIN
-int main(int argc, char **argv)
-{
-	// One text, one patch.
-	const char data[] = "\x02\x00\0x1\x00\x0d"
-	                    // base text
-	                    "a"
-	                    // binary delta that will append a single b
-	                    "\x00\x00\x00\x01\x00\x00\x00\x01\x00\x00\x00\x01b";
-	return LLVMFuzzerTestOneInput((const uint8_t *)data, 19);
-}
-#endif
-
 } // extern "C"
--- a/contrib/fuzz/xdiff.cc	Fri Dec 06 15:08:37 2019 -0500
+++ b/contrib/fuzz/xdiff.cc	Fri Dec 06 15:21:45 2019 -0500
@@ -55,12 +55,4 @@
 	return 0; // Non-zero return values are reserved for future use.
 }
 
-#ifdef HG_FUZZER_INCLUDE_MAIN
-int main(int argc, char **argv)
-{
-	const char data[] = "asdf";
-	return LLVMFuzzerTestOneInput((const uint8_t *)data, 4);
-}
-#endif
-
 } // extern "C"