author | Kyle Lippincott <spectral@google.com> |
Mon, 24 Jun 2019 16:01:01 -0700 | |
changeset 42588 | f6540aba8e3e |
parent 41183 | c01fac6749e5 |
child 43150 | 7ff40418c6bf |
permissions | -rw-r--r-- |
38230
bf901559e647
fuzz: expand variables by make
Yuya Nishihara <yuya@tcha.org>
parents:
38175
diff
changeset
|
1 |
CC = clang |
bf901559e647
fuzz: expand variables by make
Yuya Nishihara <yuya@tcha.org>
parents:
38175
diff
changeset
|
2 |
CXX = clang++ |
bf901559e647
fuzz: expand variables by make
Yuya Nishihara <yuya@tcha.org>
parents:
38175
diff
changeset
|
3 |
|
38246
46dcb9f14900
fuzz: new fuzzer for the mpatch code
Augie Fackler <augie@google.com>
parents:
38234
diff
changeset
|
4 |
all: bdiff mpatch xdiff |
38231
4dd3b6c68f96
fuzz: fix the default make target
Yuya Nishihara <yuya@tcha.org>
parents:
38230
diff
changeset
|
5 |
|
38173
fa0ddd5e8fff
fuzz: extract some common utilities and use modern C++ idioms
Augie Fackler <augie@google.com>
parents:
36765
diff
changeset
|
6 |
fuzzutil.o: fuzzutil.cc fuzzutil.h |
41012
1e51dc85ce12
fuzz: remove probably-wrong -fsanitize from fuzzutil.o rule
Augie Fackler <augie@google.com>
parents:
41001
diff
changeset
|
7 |
$(CXX) $(CXXFLAGS) -g -O1 \ |
38173
fa0ddd5e8fff
fuzz: extract some common utilities and use modern C++ idioms
Augie Fackler <augie@google.com>
parents:
36765
diff
changeset
|
8 |
-std=c++17 \ |
fa0ddd5e8fff
fuzz: extract some common utilities and use modern C++ idioms
Augie Fackler <augie@google.com>
parents:
36765
diff
changeset
|
9 |
-I../../mercurial -c -o fuzzutil.o fuzzutil.cc |
fa0ddd5e8fff
fuzz: extract some common utilities and use modern C++ idioms
Augie Fackler <augie@google.com>
parents:
36765
diff
changeset
|
10 |
|
38174
36d55f90e2a3
fuzzutil: make it possible to use absl when C++17 isn't supported
Augie Fackler <augie@google.com>
parents:
38173
diff
changeset
|
11 |
fuzzutil-oss-fuzz.o: fuzzutil.cc fuzzutil.h |
38230
bf901559e647
fuzz: expand variables by make
Yuya Nishihara <yuya@tcha.org>
parents:
38175
diff
changeset
|
12 |
$(CXX) $(CXXFLAGS) -std=c++17 \ |
38174
36d55f90e2a3
fuzzutil: make it possible to use absl when C++17 isn't supported
Augie Fackler <augie@google.com>
parents:
38173
diff
changeset
|
13 |
-I../../mercurial -c -o fuzzutil-oss-fuzz.o fuzzutil.cc |
36d55f90e2a3
fuzzutil: make it possible to use absl when C++17 isn't supported
Augie Fackler <augie@google.com>
parents:
38173
diff
changeset
|
14 |
|
41013
ef103c96ed33
fuzz: extract Python initialization to utility package
Augie Fackler <augie@google.com>
parents:
41012
diff
changeset
|
15 |
pyutil.o: pyutil.cc pyutil.h |
ef103c96ed33
fuzz: extract Python initialization to utility package
Augie Fackler <augie@google.com>
parents:
41012
diff
changeset
|
16 |
$(CXX) $(CXXFLAGS) -g -O1 \ |
ef103c96ed33
fuzz: extract Python initialization to utility package
Augie Fackler <augie@google.com>
parents:
41012
diff
changeset
|
17 |
`$$OUT/sanpy/bin/python-config --cflags` \ |
ef103c96ed33
fuzz: extract Python initialization to utility package
Augie Fackler <augie@google.com>
parents:
41012
diff
changeset
|
18 |
-I../../mercurial -c -o pyutil.o pyutil.cc |
ef103c96ed33
fuzz: extract Python initialization to utility package
Augie Fackler <augie@google.com>
parents:
41012
diff
changeset
|
19 |
|
35670
2b9e2415f5b5
contrib: add some basic scaffolding for some fuzz test targets
Augie Fackler <augie@google.com>
parents:
diff
changeset
|
20 |
bdiff.o: ../../mercurial/bdiff.c |
38230
bf901559e647
fuzz: expand variables by make
Yuya Nishihara <yuya@tcha.org>
parents:
38175
diff
changeset
|
21 |
$(CC) $(CFLAGS) -fsanitize=fuzzer-no-link,address -c -o bdiff.o \ |
35670
2b9e2415f5b5
contrib: add some basic scaffolding for some fuzz test targets
Augie Fackler <augie@google.com>
parents:
diff
changeset
|
22 |
../../mercurial/bdiff.c |
2b9e2415f5b5
contrib: add some basic scaffolding for some fuzz test targets
Augie Fackler <augie@google.com>
parents:
diff
changeset
|
23 |
|
38173
fa0ddd5e8fff
fuzz: extract some common utilities and use modern C++ idioms
Augie Fackler <augie@google.com>
parents:
36765
diff
changeset
|
24 |
bdiff: bdiff.cc bdiff.o fuzzutil.o |
38230
bf901559e647
fuzz: expand variables by make
Yuya Nishihara <yuya@tcha.org>
parents:
38175
diff
changeset
|
25 |
$(CXX) $(CXXFLAGS) -DHG_FUZZER_INCLUDE_MAIN=1 -g -O1 -fsanitize=fuzzer-no-link,address \ |
38173
fa0ddd5e8fff
fuzz: extract some common utilities and use modern C++ idioms
Augie Fackler <augie@google.com>
parents:
36765
diff
changeset
|
26 |
-std=c++17 \ |
fa0ddd5e8fff
fuzz: extract some common utilities and use modern C++ idioms
Augie Fackler <augie@google.com>
parents:
36765
diff
changeset
|
27 |
-I../../mercurial bdiff.cc bdiff.o fuzzutil.o -o bdiff |
35670
2b9e2415f5b5
contrib: add some basic scaffolding for some fuzz test targets
Augie Fackler <augie@google.com>
parents:
diff
changeset
|
28 |
|
2b9e2415f5b5
contrib: add some basic scaffolding for some fuzz test targets
Augie Fackler <augie@google.com>
parents:
diff
changeset
|
29 |
bdiff-oss-fuzz.o: ../../mercurial/bdiff.c |
38230
bf901559e647
fuzz: expand variables by make
Yuya Nishihara <yuya@tcha.org>
parents:
38175
diff
changeset
|
30 |
$(CC) $(CFLAGS) -c -o bdiff-oss-fuzz.o ../../mercurial/bdiff.c |
35670
2b9e2415f5b5
contrib: add some basic scaffolding for some fuzz test targets
Augie Fackler <augie@google.com>
parents:
diff
changeset
|
31 |
|
38174
36d55f90e2a3
fuzzutil: make it possible to use absl when C++17 isn't supported
Augie Fackler <augie@google.com>
parents:
38173
diff
changeset
|
32 |
bdiff_fuzzer: bdiff.cc bdiff-oss-fuzz.o fuzzutil-oss-fuzz.o |
38230
bf901559e647
fuzz: expand variables by make
Yuya Nishihara <yuya@tcha.org>
parents:
38175
diff
changeset
|
33 |
$(CXX) $(CXXFLAGS) -std=c++17 -I../../mercurial bdiff.cc \ |
38174
36d55f90e2a3
fuzzutil: make it possible to use absl when C++17 isn't supported
Augie Fackler <augie@google.com>
parents:
38173
diff
changeset
|
34 |
bdiff-oss-fuzz.o fuzzutil-oss-fuzz.o -lFuzzingEngine -o \ |
36d55f90e2a3
fuzzutil: make it possible to use absl when C++17 isn't supported
Augie Fackler <augie@google.com>
parents:
38173
diff
changeset
|
35 |
$$OUT/bdiff_fuzzer |
35670
2b9e2415f5b5
contrib: add some basic scaffolding for some fuzz test targets
Augie Fackler <augie@google.com>
parents:
diff
changeset
|
36 |
|
38246
46dcb9f14900
fuzz: new fuzzer for the mpatch code
Augie Fackler <augie@google.com>
parents:
38234
diff
changeset
|
37 |
mpatch.o: ../../mercurial/mpatch.c |
46dcb9f14900
fuzz: new fuzzer for the mpatch code
Augie Fackler <augie@google.com>
parents:
38234
diff
changeset
|
38 |
$(CC) -g -O1 -fsanitize=fuzzer-no-link,address -c -o mpatch.o \ |
46dcb9f14900
fuzz: new fuzzer for the mpatch code
Augie Fackler <augie@google.com>
parents:
38234
diff
changeset
|
39 |
../../mercurial/mpatch.c |
46dcb9f14900
fuzz: new fuzzer for the mpatch code
Augie Fackler <augie@google.com>
parents:
38234
diff
changeset
|
40 |
|
46dcb9f14900
fuzz: new fuzzer for the mpatch code
Augie Fackler <augie@google.com>
parents:
38234
diff
changeset
|
41 |
mpatch: CXXFLAGS += -std=c++17 |
46dcb9f14900
fuzz: new fuzzer for the mpatch code
Augie Fackler <augie@google.com>
parents:
38234
diff
changeset
|
42 |
mpatch: mpatch.cc mpatch.o fuzzutil.o |
46dcb9f14900
fuzz: new fuzzer for the mpatch code
Augie Fackler <augie@google.com>
parents:
38234
diff
changeset
|
43 |
$(CXX) $(CXXFLAGS) -DHG_FUZZER_INCLUDE_MAIN=1 -g -O1 -fsanitize=fuzzer-no-link,address \ |
46dcb9f14900
fuzz: new fuzzer for the mpatch code
Augie Fackler <augie@google.com>
parents:
38234
diff
changeset
|
44 |
-I../../mercurial mpatch.cc mpatch.o fuzzutil.o -o mpatch |
46dcb9f14900
fuzz: new fuzzer for the mpatch code
Augie Fackler <augie@google.com>
parents:
38234
diff
changeset
|
45 |
|
46dcb9f14900
fuzz: new fuzzer for the mpatch code
Augie Fackler <augie@google.com>
parents:
38234
diff
changeset
|
46 |
mpatch-oss-fuzz.o: ../../mercurial/mpatch.c |
46dcb9f14900
fuzz: new fuzzer for the mpatch code
Augie Fackler <augie@google.com>
parents:
38234
diff
changeset
|
47 |
$(CC) $(CFLAGS) -c -o mpatch-oss-fuzz.o ../../mercurial/mpatch.c |
46dcb9f14900
fuzz: new fuzzer for the mpatch code
Augie Fackler <augie@google.com>
parents:
38234
diff
changeset
|
48 |
|
46dcb9f14900
fuzz: new fuzzer for the mpatch code
Augie Fackler <augie@google.com>
parents:
38234
diff
changeset
|
49 |
mpatch_fuzzer: mpatch.cc mpatch-oss-fuzz.o fuzzutil-oss-fuzz.o |
46dcb9f14900
fuzz: new fuzzer for the mpatch code
Augie Fackler <augie@google.com>
parents:
38234
diff
changeset
|
50 |
$(CXX) $(CXXFLAGS) -std=c++17 -I../../mercurial mpatch.cc \ |
46dcb9f14900
fuzz: new fuzzer for the mpatch code
Augie Fackler <augie@google.com>
parents:
38234
diff
changeset
|
51 |
mpatch-oss-fuzz.o fuzzutil-oss-fuzz.o -lFuzzingEngine -o \ |
46dcb9f14900
fuzz: new fuzzer for the mpatch code
Augie Fackler <augie@google.com>
parents:
38234
diff
changeset
|
52 |
$$OUT/mpatch_fuzzer |
46dcb9f14900
fuzz: new fuzzer for the mpatch code
Augie Fackler <augie@google.com>
parents:
38234
diff
changeset
|
53 |
|
46dcb9f14900
fuzz: new fuzzer for the mpatch code
Augie Fackler <augie@google.com>
parents:
38234
diff
changeset
|
54 |
mpatch_corpus.zip: |
46dcb9f14900
fuzz: new fuzzer for the mpatch code
Augie Fackler <augie@google.com>
parents:
38234
diff
changeset
|
55 |
python mpatch_corpus.py $$OUT/mpatch_fuzzer_seed_corpus.zip |
46dcb9f14900
fuzz: new fuzzer for the mpatch code
Augie Fackler <augie@google.com>
parents:
38234
diff
changeset
|
56 |
|
36679
624cbd1477a6
fuzz: add a fuzzer for xdiff
Augie Fackler <augie@google.com>
parents:
35670
diff
changeset
|
57 |
x%.o: ../../mercurial/thirdparty/xdiff/x%.c ../../mercurial/thirdparty/xdiff/*.h |
38230
bf901559e647
fuzz: expand variables by make
Yuya Nishihara <yuya@tcha.org>
parents:
38175
diff
changeset
|
58 |
$(CC) -g -O1 -fsanitize=fuzzer-no-link,address -c \ |
36679
624cbd1477a6
fuzz: add a fuzzer for xdiff
Augie Fackler <augie@google.com>
parents:
35670
diff
changeset
|
59 |
-o $@ \ |
624cbd1477a6
fuzz: add a fuzzer for xdiff
Augie Fackler <augie@google.com>
parents:
35670
diff
changeset
|
60 |
$< |
624cbd1477a6
fuzz: add a fuzzer for xdiff
Augie Fackler <augie@google.com>
parents:
35670
diff
changeset
|
61 |
|
38233
74f89b7a4268
fuzz: compile xdiff.cc with -std=c++17
Yuya Nishihara <yuya@tcha.org>
parents:
38231
diff
changeset
|
62 |
xdiff: CXXFLAGS += -std=c++17 |
38173
fa0ddd5e8fff
fuzz: extract some common utilities and use modern C++ idioms
Augie Fackler <augie@google.com>
parents:
36765
diff
changeset
|
63 |
xdiff: xdiff.cc xdiffi.o xprepare.o xutils.o fuzzutil.o |
38230
bf901559e647
fuzz: expand variables by make
Yuya Nishihara <yuya@tcha.org>
parents:
38175
diff
changeset
|
64 |
$(CXX) $(CXXFLAGS) -DHG_FUZZER_INCLUDE_MAIN=1 -g -O1 -fsanitize=fuzzer-no-link,address \ |
36679
624cbd1477a6
fuzz: add a fuzzer for xdiff
Augie Fackler <augie@google.com>
parents:
35670
diff
changeset
|
65 |
-I../../mercurial xdiff.cc \ |
38173
fa0ddd5e8fff
fuzz: extract some common utilities and use modern C++ idioms
Augie Fackler <augie@google.com>
parents:
36765
diff
changeset
|
66 |
xdiffi.o xprepare.o xutils.o fuzzutil.o -o xdiff |
35670
2b9e2415f5b5
contrib: add some basic scaffolding for some fuzz test targets
Augie Fackler <augie@google.com>
parents:
diff
changeset
|
67 |
|
36679
624cbd1477a6
fuzz: add a fuzzer for xdiff
Augie Fackler <augie@google.com>
parents:
35670
diff
changeset
|
68 |
fuzz-x%.o: ../../mercurial/thirdparty/xdiff/x%.c ../../mercurial/thirdparty/xdiff/*.h |
38230
bf901559e647
fuzz: expand variables by make
Yuya Nishihara <yuya@tcha.org>
parents:
38175
diff
changeset
|
69 |
$(CC) $(CFLAGS) -c \ |
36679
624cbd1477a6
fuzz: add a fuzzer for xdiff
Augie Fackler <augie@google.com>
parents:
35670
diff
changeset
|
70 |
-o $@ \ |
624cbd1477a6
fuzz: add a fuzzer for xdiff
Augie Fackler <augie@google.com>
parents:
35670
diff
changeset
|
71 |
$< |
624cbd1477a6
fuzz: add a fuzzer for xdiff
Augie Fackler <augie@google.com>
parents:
35670
diff
changeset
|
72 |
|
38174
36d55f90e2a3
fuzzutil: make it possible to use absl when C++17 isn't supported
Augie Fackler <augie@google.com>
parents:
38173
diff
changeset
|
73 |
xdiff_fuzzer: xdiff.cc fuzz-xdiffi.o fuzz-xprepare.o fuzz-xutils.o fuzzutil-oss-fuzz.o |
38230
bf901559e647
fuzz: expand variables by make
Yuya Nishihara <yuya@tcha.org>
parents:
38175
diff
changeset
|
74 |
$(CXX) $(CXXFLAGS) -std=c++17 -I../../mercurial xdiff.cc \ |
38174
36d55f90e2a3
fuzzutil: make it possible to use absl when C++17 isn't supported
Augie Fackler <augie@google.com>
parents:
38173
diff
changeset
|
75 |
fuzz-xdiffi.o fuzz-xprepare.o fuzz-xutils.o fuzzutil-oss-fuzz.o \ |
36679
624cbd1477a6
fuzz: add a fuzzer for xdiff
Augie Fackler <augie@google.com>
parents:
35670
diff
changeset
|
76 |
-lFuzzingEngine -o $$OUT/xdiff_fuzzer |
624cbd1477a6
fuzz: add a fuzzer for xdiff
Augie Fackler <augie@google.com>
parents:
35670
diff
changeset
|
77 |
|
41183
c01fac6749e5
fuzz: stop building Python in the Makefile
Augie Fackler <augie@google.com>
parents:
41024
diff
changeset
|
78 |
manifest.o: ../../mercurial/cext/manifest.c |
40053
8c692a6b5ad1
fuzz: new fuzzer for cext/manifest.c
Augie Fackler <augie@google.com>
parents:
38246
diff
changeset
|
79 |
$(CC) $(CFLAGS) `$$OUT/sanpy/bin/python-config --cflags` \ |
8c692a6b5ad1
fuzz: new fuzzer for cext/manifest.c
Augie Fackler <augie@google.com>
parents:
38246
diff
changeset
|
80 |
-I../../mercurial \ |
8c692a6b5ad1
fuzz: new fuzzer for cext/manifest.c
Augie Fackler <augie@google.com>
parents:
38246
diff
changeset
|
81 |
-c -o manifest.o ../../mercurial/cext/manifest.c |
8c692a6b5ad1
fuzz: new fuzzer for cext/manifest.c
Augie Fackler <augie@google.com>
parents:
38246
diff
changeset
|
82 |
|
41183
c01fac6749e5
fuzz: stop building Python in the Makefile
Augie Fackler <augie@google.com>
parents:
41024
diff
changeset
|
83 |
charencode.o: ../../mercurial/cext/charencode.c |
40053
8c692a6b5ad1
fuzz: new fuzzer for cext/manifest.c
Augie Fackler <augie@google.com>
parents:
38246
diff
changeset
|
84 |
$(CC) $(CFLAGS) `$$OUT/sanpy/bin/python-config --cflags` \ |
8c692a6b5ad1
fuzz: new fuzzer for cext/manifest.c
Augie Fackler <augie@google.com>
parents:
38246
diff
changeset
|
85 |
-I../../mercurial \ |
8c692a6b5ad1
fuzz: new fuzzer for cext/manifest.c
Augie Fackler <augie@google.com>
parents:
38246
diff
changeset
|
86 |
-c -o charencode.o ../../mercurial/cext/charencode.c |
8c692a6b5ad1
fuzz: new fuzzer for cext/manifest.c
Augie Fackler <augie@google.com>
parents:
38246
diff
changeset
|
87 |
|
41183
c01fac6749e5
fuzz: stop building Python in the Makefile
Augie Fackler <augie@google.com>
parents:
41024
diff
changeset
|
88 |
parsers.o: ../../mercurial/cext/parsers.c |
40053
8c692a6b5ad1
fuzz: new fuzzer for cext/manifest.c
Augie Fackler <augie@google.com>
parents:
38246
diff
changeset
|
89 |
$(CC) $(CFLAGS) `$$OUT/sanpy/bin/python-config --cflags` \ |
8c692a6b5ad1
fuzz: new fuzzer for cext/manifest.c
Augie Fackler <augie@google.com>
parents:
38246
diff
changeset
|
90 |
-I../../mercurial \ |
8c692a6b5ad1
fuzz: new fuzzer for cext/manifest.c
Augie Fackler <augie@google.com>
parents:
38246
diff
changeset
|
91 |
-c -o parsers.o ../../mercurial/cext/parsers.c |
8c692a6b5ad1
fuzz: new fuzzer for cext/manifest.c
Augie Fackler <augie@google.com>
parents:
38246
diff
changeset
|
92 |
|
41183
c01fac6749e5
fuzz: stop building Python in the Makefile
Augie Fackler <augie@google.com>
parents:
41024
diff
changeset
|
93 |
dirs.o: ../../mercurial/cext/dirs.c |
40053
8c692a6b5ad1
fuzz: new fuzzer for cext/manifest.c
Augie Fackler <augie@google.com>
parents:
38246
diff
changeset
|
94 |
$(CC) $(CFLAGS) `$$OUT/sanpy/bin/python-config --cflags` \ |
8c692a6b5ad1
fuzz: new fuzzer for cext/manifest.c
Augie Fackler <augie@google.com>
parents:
38246
diff
changeset
|
95 |
-I../../mercurial \ |
8c692a6b5ad1
fuzz: new fuzzer for cext/manifest.c
Augie Fackler <augie@google.com>
parents:
38246
diff
changeset
|
96 |
-c -o dirs.o ../../mercurial/cext/dirs.c |
8c692a6b5ad1
fuzz: new fuzzer for cext/manifest.c
Augie Fackler <augie@google.com>
parents:
38246
diff
changeset
|
97 |
|
41183
c01fac6749e5
fuzz: stop building Python in the Makefile
Augie Fackler <augie@google.com>
parents:
41024
diff
changeset
|
98 |
pathencode.o: ../../mercurial/cext/pathencode.c |
40053
8c692a6b5ad1
fuzz: new fuzzer for cext/manifest.c
Augie Fackler <augie@google.com>
parents:
38246
diff
changeset
|
99 |
$(CC) $(CFLAGS) `$$OUT/sanpy/bin/python-config --cflags` \ |
8c692a6b5ad1
fuzz: new fuzzer for cext/manifest.c
Augie Fackler <augie@google.com>
parents:
38246
diff
changeset
|
100 |
-I../../mercurial \ |
8c692a6b5ad1
fuzz: new fuzzer for cext/manifest.c
Augie Fackler <augie@google.com>
parents:
38246
diff
changeset
|
101 |
-c -o pathencode.o ../../mercurial/cext/pathencode.c |
8c692a6b5ad1
fuzz: new fuzzer for cext/manifest.c
Augie Fackler <augie@google.com>
parents:
38246
diff
changeset
|
102 |
|
41183
c01fac6749e5
fuzz: stop building Python in the Makefile
Augie Fackler <augie@google.com>
parents:
41024
diff
changeset
|
103 |
revlog.o: ../../mercurial/cext/revlog.c |
40053
8c692a6b5ad1
fuzz: new fuzzer for cext/manifest.c
Augie Fackler <augie@google.com>
parents:
38246
diff
changeset
|
104 |
$(CC) $(CFLAGS) `$$OUT/sanpy/bin/python-config --cflags` \ |
8c692a6b5ad1
fuzz: new fuzzer for cext/manifest.c
Augie Fackler <augie@google.com>
parents:
38246
diff
changeset
|
105 |
-I../../mercurial \ |
8c692a6b5ad1
fuzz: new fuzzer for cext/manifest.c
Augie Fackler <augie@google.com>
parents:
38246
diff
changeset
|
106 |
-c -o revlog.o ../../mercurial/cext/revlog.c |
8c692a6b5ad1
fuzz: new fuzzer for cext/manifest.c
Augie Fackler <augie@google.com>
parents:
38246
diff
changeset
|
107 |
|
41183
c01fac6749e5
fuzz: stop building Python in the Makefile
Augie Fackler <augie@google.com>
parents:
41024
diff
changeset
|
108 |
manifest_fuzzer: manifest.cc manifest.o charencode.o parsers.o dirs.o pathencode.o revlog.o pyutil.o |
40053
8c692a6b5ad1
fuzz: new fuzzer for cext/manifest.c
Augie Fackler <augie@google.com>
parents:
38246
diff
changeset
|
109 |
$(CXX) $(CXXFLAGS) `$$OUT/sanpy/bin/python-config --cflags` \ |
8c692a6b5ad1
fuzz: new fuzzer for cext/manifest.c
Augie Fackler <augie@google.com>
parents:
38246
diff
changeset
|
110 |
-Wno-register -Wno-macro-redefined \ |
8c692a6b5ad1
fuzz: new fuzzer for cext/manifest.c
Augie Fackler <augie@google.com>
parents:
38246
diff
changeset
|
111 |
-I../../mercurial manifest.cc \ |
41013
ef103c96ed33
fuzz: extract Python initialization to utility package
Augie Fackler <augie@google.com>
parents:
41012
diff
changeset
|
112 |
manifest.o charencode.o parsers.o dirs.o pathencode.o revlog.o pyutil.o \ |
40053
8c692a6b5ad1
fuzz: new fuzzer for cext/manifest.c
Augie Fackler <augie@google.com>
parents:
38246
diff
changeset
|
113 |
-lFuzzingEngine `$$OUT/sanpy/bin/python-config --ldflags` \ |
8c692a6b5ad1
fuzz: new fuzzer for cext/manifest.c
Augie Fackler <augie@google.com>
parents:
38246
diff
changeset
|
114 |
-o $$OUT/manifest_fuzzer |
8c692a6b5ad1
fuzz: new fuzzer for cext/manifest.c
Augie Fackler <augie@google.com>
parents:
38246
diff
changeset
|
115 |
|
8c692a6b5ad1
fuzz: new fuzzer for cext/manifest.c
Augie Fackler <augie@google.com>
parents:
38246
diff
changeset
|
116 |
manifest_corpus.zip: |
8c692a6b5ad1
fuzz: new fuzzer for cext/manifest.c
Augie Fackler <augie@google.com>
parents:
38246
diff
changeset
|
117 |
python manifest_corpus.py $$OUT/manifest_fuzzer_seed_corpus.zip |
8c692a6b5ad1
fuzz: new fuzzer for cext/manifest.c
Augie Fackler <augie@google.com>
parents:
38246
diff
changeset
|
118 |
|
41183
c01fac6749e5
fuzz: stop building Python in the Makefile
Augie Fackler <augie@google.com>
parents:
41024
diff
changeset
|
119 |
revlog_fuzzer: revlog.cc manifest.o charencode.o parsers.o dirs.o pathencode.o revlog.o pyutil.o |
41014
c06f0ef9a5ba
fuzz: new fuzzer for revlog's parse_index2 method
Augie Fackler <augie@google.com>
parents:
41013
diff
changeset
|
120 |
$(CXX) $(CXXFLAGS) `$$OUT/sanpy/bin/python-config --cflags` \ |
c06f0ef9a5ba
fuzz: new fuzzer for revlog's parse_index2 method
Augie Fackler <augie@google.com>
parents:
41013
diff
changeset
|
121 |
-Wno-register -Wno-macro-redefined \ |
c06f0ef9a5ba
fuzz: new fuzzer for revlog's parse_index2 method
Augie Fackler <augie@google.com>
parents:
41013
diff
changeset
|
122 |
-I../../mercurial revlog.cc \ |
c06f0ef9a5ba
fuzz: new fuzzer for revlog's parse_index2 method
Augie Fackler <augie@google.com>
parents:
41013
diff
changeset
|
123 |
manifest.o charencode.o parsers.o dirs.o pathencode.o revlog.o pyutil.o \ |
c06f0ef9a5ba
fuzz: new fuzzer for revlog's parse_index2 method
Augie Fackler <augie@google.com>
parents:
41013
diff
changeset
|
124 |
-lFuzzingEngine `$$OUT/sanpy/bin/python-config --ldflags` \ |
c06f0ef9a5ba
fuzz: new fuzzer for revlog's parse_index2 method
Augie Fackler <augie@google.com>
parents:
41013
diff
changeset
|
125 |
-o $$OUT/revlog_fuzzer |
c06f0ef9a5ba
fuzz: new fuzzer for revlog's parse_index2 method
Augie Fackler <augie@google.com>
parents:
41013
diff
changeset
|
126 |
|
c06f0ef9a5ba
fuzz: new fuzzer for revlog's parse_index2 method
Augie Fackler <augie@google.com>
parents:
41013
diff
changeset
|
127 |
revlog_corpus.zip: |
c06f0ef9a5ba
fuzz: new fuzzer for revlog's parse_index2 method
Augie Fackler <augie@google.com>
parents:
41013
diff
changeset
|
128 |
python revlog_corpus.py $$OUT/revlog_fuzzer_seed_corpus.zip |
c06f0ef9a5ba
fuzz: new fuzzer for revlog's parse_index2 method
Augie Fackler <augie@google.com>
parents:
41013
diff
changeset
|
129 |
|
41183
c01fac6749e5
fuzz: stop building Python in the Makefile
Augie Fackler <augie@google.com>
parents:
41024
diff
changeset
|
130 |
dirstate_fuzzer: dirstate.cc manifest.o charencode.o parsers.o dirs.o pathencode.o revlog.o pyutil.o |
41015
b444407f635b
fuzz: new fuzzer for dirstate parser
Augie Fackler <augie@google.com>
parents:
41014
diff
changeset
|
131 |
$(CXX) $(CXXFLAGS) `$$OUT/sanpy/bin/python-config --cflags` \ |
b444407f635b
fuzz: new fuzzer for dirstate parser
Augie Fackler <augie@google.com>
parents:
41014
diff
changeset
|
132 |
-Wno-register -Wno-macro-redefined \ |
b444407f635b
fuzz: new fuzzer for dirstate parser
Augie Fackler <augie@google.com>
parents:
41014
diff
changeset
|
133 |
-I../../mercurial dirstate.cc \ |
b444407f635b
fuzz: new fuzzer for dirstate parser
Augie Fackler <augie@google.com>
parents:
41014
diff
changeset
|
134 |
manifest.o charencode.o parsers.o dirs.o pathencode.o revlog.o pyutil.o \ |
b444407f635b
fuzz: new fuzzer for dirstate parser
Augie Fackler <augie@google.com>
parents:
41014
diff
changeset
|
135 |
-lFuzzingEngine `$$OUT/sanpy/bin/python-config --ldflags` \ |
b444407f635b
fuzz: new fuzzer for dirstate parser
Augie Fackler <augie@google.com>
parents:
41014
diff
changeset
|
136 |
-o $$OUT/dirstate_fuzzer |
b444407f635b
fuzz: new fuzzer for dirstate parser
Augie Fackler <augie@google.com>
parents:
41014
diff
changeset
|
137 |
|
b444407f635b
fuzz: new fuzzer for dirstate parser
Augie Fackler <augie@google.com>
parents:
41014
diff
changeset
|
138 |
dirstate_corpus.zip: |
b444407f635b
fuzz: new fuzzer for dirstate parser
Augie Fackler <augie@google.com>
parents:
41014
diff
changeset
|
139 |
python dirstate_corpus.py $$OUT/dirstate_fuzzer_seed_corpus.zip |
b444407f635b
fuzz: new fuzzer for dirstate parser
Augie Fackler <augie@google.com>
parents:
41014
diff
changeset
|
140 |
|
41183
c01fac6749e5
fuzz: stop building Python in the Makefile
Augie Fackler <augie@google.com>
parents:
41024
diff
changeset
|
141 |
fm1readmarkers_fuzzer: fm1readmarkers.cc manifest.o charencode.o parsers.o dirs.o pathencode.o revlog.o pyutil.o |
41024
6a951f535fee
fuzz: new fuzzer for parsers.fm1readmarkers
Augie Fackler <augie@google.com>
parents:
41015
diff
changeset
|
142 |
$(CXX) $(CXXFLAGS) `$$OUT/sanpy/bin/python-config --cflags` \ |
6a951f535fee
fuzz: new fuzzer for parsers.fm1readmarkers
Augie Fackler <augie@google.com>
parents:
41015
diff
changeset
|
143 |
-Wno-register -Wno-macro-redefined \ |
6a951f535fee
fuzz: new fuzzer for parsers.fm1readmarkers
Augie Fackler <augie@google.com>
parents:
41015
diff
changeset
|
144 |
-I../../mercurial fm1readmarkers.cc \ |
6a951f535fee
fuzz: new fuzzer for parsers.fm1readmarkers
Augie Fackler <augie@google.com>
parents:
41015
diff
changeset
|
145 |
manifest.o charencode.o parsers.o dirs.o pathencode.o revlog.o pyutil.o \ |
6a951f535fee
fuzz: new fuzzer for parsers.fm1readmarkers
Augie Fackler <augie@google.com>
parents:
41015
diff
changeset
|
146 |
-lFuzzingEngine `$$OUT/sanpy/bin/python-config --ldflags` \ |
6a951f535fee
fuzz: new fuzzer for parsers.fm1readmarkers
Augie Fackler <augie@google.com>
parents:
41015
diff
changeset
|
147 |
-o $$OUT/fm1readmarkers_fuzzer |
6a951f535fee
fuzz: new fuzzer for parsers.fm1readmarkers
Augie Fackler <augie@google.com>
parents:
41015
diff
changeset
|
148 |
|
6a951f535fee
fuzz: new fuzzer for parsers.fm1readmarkers
Augie Fackler <augie@google.com>
parents:
41015
diff
changeset
|
149 |
fm1readmarkers_corpus.zip: |
6a951f535fee
fuzz: new fuzzer for parsers.fm1readmarkers
Augie Fackler <augie@google.com>
parents:
41015
diff
changeset
|
150 |
python fm1readmarkers_corpus.py $$OUT/fm1readmarkers_fuzzer_seed_corpus.zip |
6a951f535fee
fuzz: new fuzzer for parsers.fm1readmarkers
Augie Fackler <augie@google.com>
parents:
41015
diff
changeset
|
151 |
|
38175 | 152 |
clean: |
38234
9db30f438ddd
fuzz: fix "make clean" to pass even if no binaries built yet
Yuya Nishihara <yuya@tcha.org>
parents:
38233
diff
changeset
|
153 |
$(RM) *.o *_fuzzer \ |
38175 | 154 |
bdiff \ |
38246
46dcb9f14900
fuzz: new fuzzer for the mpatch code
Augie Fackler <augie@google.com>
parents:
38234
diff
changeset
|
155 |
mpatch \ |
38175 | 156 |
xdiff |
157 |
||
41024
6a951f535fee
fuzz: new fuzzer for parsers.fm1readmarkers
Augie Fackler <augie@google.com>
parents:
41015
diff
changeset
|
158 |
oss-fuzz: bdiff_fuzzer mpatch_fuzzer mpatch_corpus.zip xdiff_fuzzer manifest_fuzzer manifest_corpus.zip revlog_fuzzer revlog_corpus.zip dirstate_fuzzer dirstate_corpus.zip fm1readmarkers_fuzzer fm1readmarkers_corpus.zip |
35670
2b9e2415f5b5
contrib: add some basic scaffolding for some fuzz test targets
Augie Fackler <augie@google.com>
parents:
diff
changeset
|
159 |
|
41183
c01fac6749e5
fuzz: stop building Python in the Makefile
Augie Fackler <augie@google.com>
parents:
41024
diff
changeset
|
160 |
.PHONY: all clean oss-fuzz |