Show More
@@ -75,45 +75,37 b' xdiff_fuzzer: xdiff.cc fuzz-xdiffi.o fuz' | |||||
75 | fuzz-xdiffi.o fuzz-xprepare.o fuzz-xutils.o fuzzutil-oss-fuzz.o \ |
|
75 | fuzz-xdiffi.o fuzz-xprepare.o fuzz-xutils.o fuzzutil-oss-fuzz.o \ | |
76 | -lFuzzingEngine -o $$OUT/xdiff_fuzzer |
|
76 | -lFuzzingEngine -o $$OUT/xdiff_fuzzer | |
77 |
|
77 | |||
78 | # TODO use the $OUT env var instead of hardcoding /out |
|
78 | manifest.o: ../../mercurial/cext/manifest.c | |
79 | /out/sanpy/bin/python: |
|
|||
80 | cd /Python-2.7.15/ ; ASAN_OPTIONS=detect_leaks=0 ./configure --without-pymalloc --prefix=$$OUT/sanpy CFLAGS="$(CFLAGS)" LINKCC="$($CXX)" LDFLAGS="$(CXXFLAGS)" |
|
|||
81 | cd /Python-2.7.15/ ; grep -v HAVE_GETC_UNLOCKED < pyconfig.h > tmp && mv tmp pyconfig.h |
|
|||
82 | cd /Python-2.7.15/ ; ASAN_OPTIONS=detect_leaks=0 make && make install |
|
|||
83 |
|
||||
84 | sanpy: /out/sanpy/bin/python |
|
|||
85 |
|
||||
86 | manifest.o: sanpy ../../mercurial/cext/manifest.c |
|
|||
87 | $(CC) $(CFLAGS) `$$OUT/sanpy/bin/python-config --cflags` \ |
|
79 | $(CC) $(CFLAGS) `$$OUT/sanpy/bin/python-config --cflags` \ | |
88 | -I../../mercurial \ |
|
80 | -I../../mercurial \ | |
89 | -c -o manifest.o ../../mercurial/cext/manifest.c |
|
81 | -c -o manifest.o ../../mercurial/cext/manifest.c | |
90 |
|
82 | |||
91 |
charencode.o: |
|
83 | charencode.o: ../../mercurial/cext/charencode.c | |
92 | $(CC) $(CFLAGS) `$$OUT/sanpy/bin/python-config --cflags` \ |
|
84 | $(CC) $(CFLAGS) `$$OUT/sanpy/bin/python-config --cflags` \ | |
93 | -I../../mercurial \ |
|
85 | -I../../mercurial \ | |
94 | -c -o charencode.o ../../mercurial/cext/charencode.c |
|
86 | -c -o charencode.o ../../mercurial/cext/charencode.c | |
95 |
|
87 | |||
96 |
parsers.o: |
|
88 | parsers.o: ../../mercurial/cext/parsers.c | |
97 | $(CC) $(CFLAGS) `$$OUT/sanpy/bin/python-config --cflags` \ |
|
89 | $(CC) $(CFLAGS) `$$OUT/sanpy/bin/python-config --cflags` \ | |
98 | -I../../mercurial \ |
|
90 | -I../../mercurial \ | |
99 | -c -o parsers.o ../../mercurial/cext/parsers.c |
|
91 | -c -o parsers.o ../../mercurial/cext/parsers.c | |
100 |
|
92 | |||
101 |
dirs.o: |
|
93 | dirs.o: ../../mercurial/cext/dirs.c | |
102 | $(CC) $(CFLAGS) `$$OUT/sanpy/bin/python-config --cflags` \ |
|
94 | $(CC) $(CFLAGS) `$$OUT/sanpy/bin/python-config --cflags` \ | |
103 | -I../../mercurial \ |
|
95 | -I../../mercurial \ | |
104 | -c -o dirs.o ../../mercurial/cext/dirs.c |
|
96 | -c -o dirs.o ../../mercurial/cext/dirs.c | |
105 |
|
97 | |||
106 |
pathencode.o: |
|
98 | pathencode.o: ../../mercurial/cext/pathencode.c | |
107 | $(CC) $(CFLAGS) `$$OUT/sanpy/bin/python-config --cflags` \ |
|
99 | $(CC) $(CFLAGS) `$$OUT/sanpy/bin/python-config --cflags` \ | |
108 | -I../../mercurial \ |
|
100 | -I../../mercurial \ | |
109 | -c -o pathencode.o ../../mercurial/cext/pathencode.c |
|
101 | -c -o pathencode.o ../../mercurial/cext/pathencode.c | |
110 |
|
102 | |||
111 |
revlog.o: |
|
103 | revlog.o: ../../mercurial/cext/revlog.c | |
112 | $(CC) $(CFLAGS) `$$OUT/sanpy/bin/python-config --cflags` \ |
|
104 | $(CC) $(CFLAGS) `$$OUT/sanpy/bin/python-config --cflags` \ | |
113 | -I../../mercurial \ |
|
105 | -I../../mercurial \ | |
114 | -c -o revlog.o ../../mercurial/cext/revlog.c |
|
106 | -c -o revlog.o ../../mercurial/cext/revlog.c | |
115 |
|
107 | |||
116 |
manifest_fuzzer: |
|
108 | manifest_fuzzer: manifest.cc manifest.o charencode.o parsers.o dirs.o pathencode.o revlog.o pyutil.o | |
117 | $(CXX) $(CXXFLAGS) `$$OUT/sanpy/bin/python-config --cflags` \ |
|
109 | $(CXX) $(CXXFLAGS) `$$OUT/sanpy/bin/python-config --cflags` \ | |
118 | -Wno-register -Wno-macro-redefined \ |
|
110 | -Wno-register -Wno-macro-redefined \ | |
119 | -I../../mercurial manifest.cc \ |
|
111 | -I../../mercurial manifest.cc \ | |
@@ -124,7 +116,7 b' manifest_fuzzer: sanpy manifest.cc manif' | |||||
124 | manifest_corpus.zip: |
|
116 | manifest_corpus.zip: | |
125 | python manifest_corpus.py $$OUT/manifest_fuzzer_seed_corpus.zip |
|
117 | python manifest_corpus.py $$OUT/manifest_fuzzer_seed_corpus.zip | |
126 |
|
118 | |||
127 |
revlog_fuzzer: |
|
119 | revlog_fuzzer: revlog.cc manifest.o charencode.o parsers.o dirs.o pathencode.o revlog.o pyutil.o | |
128 | $(CXX) $(CXXFLAGS) `$$OUT/sanpy/bin/python-config --cflags` \ |
|
120 | $(CXX) $(CXXFLAGS) `$$OUT/sanpy/bin/python-config --cflags` \ | |
129 | -Wno-register -Wno-macro-redefined \ |
|
121 | -Wno-register -Wno-macro-redefined \ | |
130 | -I../../mercurial revlog.cc \ |
|
122 | -I../../mercurial revlog.cc \ | |
@@ -135,7 +127,7 b' revlog_fuzzer: sanpy revlog.cc manifest.' | |||||
135 | revlog_corpus.zip: |
|
127 | revlog_corpus.zip: | |
136 | python revlog_corpus.py $$OUT/revlog_fuzzer_seed_corpus.zip |
|
128 | python revlog_corpus.py $$OUT/revlog_fuzzer_seed_corpus.zip | |
137 |
|
129 | |||
138 |
dirstate_fuzzer: |
|
130 | dirstate_fuzzer: dirstate.cc manifest.o charencode.o parsers.o dirs.o pathencode.o revlog.o pyutil.o | |
139 | $(CXX) $(CXXFLAGS) `$$OUT/sanpy/bin/python-config --cflags` \ |
|
131 | $(CXX) $(CXXFLAGS) `$$OUT/sanpy/bin/python-config --cflags` \ | |
140 | -Wno-register -Wno-macro-redefined \ |
|
132 | -Wno-register -Wno-macro-redefined \ | |
141 | -I../../mercurial dirstate.cc \ |
|
133 | -I../../mercurial dirstate.cc \ | |
@@ -146,7 +138,7 b' dirstate_fuzzer: sanpy dirstate.cc manif' | |||||
146 | dirstate_corpus.zip: |
|
138 | dirstate_corpus.zip: | |
147 | python dirstate_corpus.py $$OUT/dirstate_fuzzer_seed_corpus.zip |
|
139 | python dirstate_corpus.py $$OUT/dirstate_fuzzer_seed_corpus.zip | |
148 |
|
140 | |||
149 |
fm1readmarkers_fuzzer: |
|
141 | fm1readmarkers_fuzzer: fm1readmarkers.cc manifest.o charencode.o parsers.o dirs.o pathencode.o revlog.o pyutil.o | |
150 | $(CXX) $(CXXFLAGS) `$$OUT/sanpy/bin/python-config --cflags` \ |
|
142 | $(CXX) $(CXXFLAGS) `$$OUT/sanpy/bin/python-config --cflags` \ | |
151 | -Wno-register -Wno-macro-redefined \ |
|
143 | -Wno-register -Wno-macro-redefined \ | |
152 | -I../../mercurial fm1readmarkers.cc \ |
|
144 | -I../../mercurial fm1readmarkers.cc \ | |
@@ -165,4 +157,4 b' clean:' | |||||
165 |
|
157 | |||
166 | 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 |
|
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 | |
167 |
|
159 | |||
168 |
.PHONY: all clean oss-fuzz |
|
160 | .PHONY: all clean oss-fuzz |
General Comments 0
You need to be logged in to leave comments.
Login now