Show More
@@ -23,15 +23,6 b' pyutil.o: pyutil.cc pyutil.h' | |||||
23 | `$(PYTHON_CONFIG) --cflags` \ |
|
23 | `$(PYTHON_CONFIG) --cflags` \ | |
24 | -I../../mercurial -c -o pyutil.o pyutil.cc |
|
24 | -I../../mercurial -c -o pyutil.o pyutil.cc | |
25 |
|
25 | |||
26 | bdiff.o: ../../mercurial/bdiff.c |
|
|||
27 | $(CC) $(CFLAGS) -fsanitize=fuzzer-no-link,address -c -o bdiff.o \ |
|
|||
28 | ../../mercurial/bdiff.c |
|
|||
29 |
|
||||
30 | bdiff: bdiff.cc bdiff.o |
|
|||
31 | $(CXX) $(CXXFLAGS) -DHG_FUZZER_INCLUDE_MAIN=1 -g -O1 -fsanitize=fuzzer-no-link,address \ |
|
|||
32 | -std=c++17 \ |
|
|||
33 | -I../../mercurial bdiff.cc bdiff.o -o bdiff |
|
|||
34 |
|
||||
35 | bdiff-oss-fuzz.o: ../../mercurial/bdiff.c |
|
26 | bdiff-oss-fuzz.o: ../../mercurial/bdiff.c | |
36 | $(CC) $(CFLAGS) -c -o bdiff-oss-fuzz.o ../../mercurial/bdiff.c |
|
27 | $(CC) $(CFLAGS) -c -o bdiff-oss-fuzz.o ../../mercurial/bdiff.c | |
37 |
|
28 | |||
@@ -44,11 +35,6 b' mpatch.o: ../../mercurial/mpatch.c' | |||||
44 | $(CC) -g -O1 -fsanitize=fuzzer-no-link,address -c -o mpatch.o \ |
|
35 | $(CC) -g -O1 -fsanitize=fuzzer-no-link,address -c -o mpatch.o \ | |
45 | ../../mercurial/mpatch.c |
|
36 | ../../mercurial/mpatch.c | |
46 |
|
37 | |||
47 | mpatch: CXXFLAGS += -std=c++17 |
|
|||
48 | mpatch: mpatch.cc mpatch.o |
|
|||
49 | $(CXX) $(CXXFLAGS) -DHG_FUZZER_INCLUDE_MAIN=1 -g -O1 -fsanitize=fuzzer-no-link,address \ |
|
|||
50 | -I../../mercurial mpatch.cc mpatch.o -o mpatch |
|
|||
51 |
|
||||
52 | mpatch-oss-fuzz.o: ../../mercurial/mpatch.c |
|
38 | mpatch-oss-fuzz.o: ../../mercurial/mpatch.c | |
53 | $(CC) $(CFLAGS) -c -o mpatch-oss-fuzz.o ../../mercurial/mpatch.c |
|
39 | $(CC) $(CFLAGS) -c -o mpatch-oss-fuzz.o ../../mercurial/mpatch.c | |
54 |
|
40 | |||
@@ -60,17 +46,6 b' mpatch_fuzzer: mpatch.cc mpatch-oss-fuzz' | |||||
60 | mpatch_corpus.zip: |
|
46 | mpatch_corpus.zip: | |
61 | python mpatch_corpus.py $$OUT/mpatch_fuzzer_seed_corpus.zip |
|
47 | python mpatch_corpus.py $$OUT/mpatch_fuzzer_seed_corpus.zip | |
62 |
|
48 | |||
63 | x%.o: ../../mercurial/thirdparty/xdiff/x%.c ../../mercurial/thirdparty/xdiff/*.h |
|
|||
64 | $(CC) -g -O1 -fsanitize=fuzzer-no-link,address -c \ |
|
|||
65 | -o $@ \ |
|
|||
66 | $< |
|
|||
67 |
|
||||
68 | xdiff: CXXFLAGS += -std=c++17 |
|
|||
69 | xdiff: xdiff.cc xdiffi.o xprepare.o xutils.o |
|
|||
70 | $(CXX) $(CXXFLAGS) -DHG_FUZZER_INCLUDE_MAIN=1 -g -O1 -fsanitize=fuzzer-no-link,address \ |
|
|||
71 | -I../../mercurial xdiff.cc \ |
|
|||
72 | xdiffi.o xprepare.o xutils.o -o xdiff |
|
|||
73 |
|
||||
74 | fuzz-x%.o: ../../mercurial/thirdparty/xdiff/x%.c ../../mercurial/thirdparty/xdiff/*.h |
|
49 | fuzz-x%.o: ../../mercurial/thirdparty/xdiff/x%.c ../../mercurial/thirdparty/xdiff/*.h | |
75 | $(CC) $(CFLAGS) -c \ |
|
50 | $(CC) $(CFLAGS) -c \ | |
76 | -o $@ \ |
|
51 | -o $@ \ |
@@ -36,12 +36,4 b' int LLVMFuzzerTestOneInput(const uint8_t' | |||||
36 | return 0; // Non-zero return values are reserved for future use. |
|
36 | return 0; // Non-zero return values are reserved for future use. | |
37 | } |
|
37 | } | |
38 |
|
38 | |||
39 | #ifdef HG_FUZZER_INCLUDE_MAIN |
|
|||
40 | int main(int argc, char **argv) |
|
|||
41 | { |
|
|||
42 | const char data[] = "asdf"; |
|
|||
43 | return LLVMFuzzerTestOneInput((const uint8_t *)data, 4); |
|
|||
44 | } |
|
|||
45 | #endif |
|
|||
46 |
|
||||
47 | } // extern "C" |
|
39 | } // extern "C" |
@@ -111,17 +111,4 b' cleanup:' | |||||
111 | return 0; |
|
111 | return 0; | |
112 | } |
|
112 | } | |
113 |
|
113 | |||
114 | #ifdef HG_FUZZER_INCLUDE_MAIN |
|
|||
115 | int main(int argc, char **argv) |
|
|||
116 | { |
|
|||
117 | // One text, one patch. |
|
|||
118 | const char data[] = "\x02\x00\0x1\x00\x0d" |
|
|||
119 | // base text |
|
|||
120 | "a" |
|
|||
121 | // binary delta that will append a single b |
|
|||
122 | "\x00\x00\x00\x01\x00\x00\x00\x01\x00\x00\x00\x01b"; |
|
|||
123 | return LLVMFuzzerTestOneInput((const uint8_t *)data, 19); |
|
|||
124 | } |
|
|||
125 | #endif |
|
|||
126 |
|
||||
127 | } // extern "C" |
|
114 | } // extern "C" |
@@ -55,12 +55,4 b' int LLVMFuzzerTestOneInput(const uint8_t' | |||||
55 | return 0; // Non-zero return values are reserved for future use. |
|
55 | return 0; // Non-zero return values are reserved for future use. | |
56 | } |
|
56 | } | |
57 |
|
57 | |||
58 | #ifdef HG_FUZZER_INCLUDE_MAIN |
|
|||
59 | int main(int argc, char **argv) |
|
|||
60 | { |
|
|||
61 | const char data[] = "asdf"; |
|
|||
62 | return LLVMFuzzerTestOneInput((const uint8_t *)data, 4); |
|
|||
63 | } |
|
|||
64 | #endif |
|
|||
65 |
|
||||
66 | } // extern "C" |
|
58 | } // extern "C" |
General Comments 0
You need to be logged in to leave comments.
Login now