##// END OF EJS Templates
fuzz: fix xdiff build...
Jun Wu -
r36783:04d64163 default
parent child Browse files
Show More
@@ -18,19 +18,19 b' x%.o: ../../mercurial/thirdparty/xdiff/x'
18 -o $@ \
18 -o $@ \
19 $<
19 $<
20
20
21 xdiff: xdiff.cc xdiffi.o xemit.o xmerge.o xprepare.o xutils.o
21 xdiff: xdiff.cc xdiffi.o xprepare.o xutils.o
22 clang -DHG_FUZZER_INCLUDE_MAIN=1 -g -O1 -fsanitize=fuzzer-no-link,address \
22 clang -DHG_FUZZER_INCLUDE_MAIN=1 -g -O1 -fsanitize=fuzzer-no-link,address \
23 -I../../mercurial xdiff.cc \
23 -I../../mercurial xdiff.cc \
24 xdiffi.o xemit.o xmerge.o xprepare.o xutils.o -o xdiff
24 xdiffi.o xprepare.o xutils.o -o xdiff
25
25
26 fuzz-x%.o: ../../mercurial/thirdparty/xdiff/x%.c ../../mercurial/thirdparty/xdiff/*.h
26 fuzz-x%.o: ../../mercurial/thirdparty/xdiff/x%.c ../../mercurial/thirdparty/xdiff/*.h
27 $$CC $$CFLAGS -c \
27 $$CC $$CFLAGS -c \
28 -o $@ \
28 -o $@ \
29 $<
29 $<
30
30
31 xdiff_fuzzer: xdiff.cc fuzz-xdiffi.o fuzz-xemit.o fuzz-xmerge.o fuzz-xprepare.o fuzz-xutils.o
31 xdiff_fuzzer: xdiff.cc fuzz-xdiffi.o fuzz-xprepare.o fuzz-xutils.o
32 $$CXX $$CXXFLAGS -std=c++11 -I../../mercurial xdiff.cc \
32 $$CXX $$CXXFLAGS -std=c++11 -I../../mercurial xdiff.cc \
33 fuzz-xdiffi.o fuzz-xemit.o fuzz-xmerge.o fuzz-xprepare.o fuzz-xutils.o \
33 fuzz-xdiffi.o fuzz-xprepare.o fuzz-xutils.o \
34 -lFuzzingEngine -o $$OUT/xdiff_fuzzer
34 -lFuzzingEngine -o $$OUT/xdiff_fuzzer
35
35
36 all: bdiff xdiff
36 all: bdiff xdiff
@@ -37,20 +37,13 b' int LLVMFuzzerTestOneInput(const uint8_t'
37 b.size = Size - split;
37 b.size = Size - split;
38 xpparam_t xpp = {
38 xpparam_t xpp = {
39 XDF_INDENT_HEURISTIC, /* flags */
39 XDF_INDENT_HEURISTIC, /* flags */
40 NULL, /* anchors */
41 0, /* anchors_nr */
42 };
40 };
43 xdemitconf_t xecfg = {
41 xdemitconf_t xecfg = {
44 0, /* ctxlen */
45 0, /* interhunkctxlen */
46 XDL_EMIT_BDIFFHUNK, /* flags */
42 XDL_EMIT_BDIFFHUNK, /* flags */
47 NULL, /* find_func */
48 NULL, /* find_func_priv */
49 hunk_consumer, /* hunk_consume_func */
43 hunk_consumer, /* hunk_consume_func */
50 };
44 };
51 xdemitcb_t ecb = {
45 xdemitcb_t ecb = {
52 NULL, /* priv */
46 NULL, /* priv */
53 NULL, /* outf */
54 };
47 };
55 xdl_diff(&a, &b, &xpp, &xecfg, &ecb);
48 xdl_diff(&a, &b, &xpp, &xecfg, &ecb);
56 return 0; // Non-zero return values are reserved for future use.
49 return 0; // Non-zero return values are reserved for future use.
General Comments 0
You need to be logged in to leave comments. Login now