Show More
@@ -18,19 +18,19 x%.o: ../../mercurial/thirdparty/xdiff/x | |||
|
18 | 18 | -o $@ \ |
|
19 | 19 | $< |
|
20 | 20 | |
|
21 |
xdiff: xdiff.cc xdiffi.o |
|
|
21 | xdiff: xdiff.cc xdiffi.o xprepare.o xutils.o | |
|
22 | 22 | clang -DHG_FUZZER_INCLUDE_MAIN=1 -g -O1 -fsanitize=fuzzer-no-link,address \ |
|
23 | 23 | -I../../mercurial xdiff.cc \ |
|
24 |
xdiffi.o |
|
|
24 | xdiffi.o xprepare.o xutils.o -o xdiff | |
|
25 | 25 | |
|
26 | 26 | fuzz-x%.o: ../../mercurial/thirdparty/xdiff/x%.c ../../mercurial/thirdparty/xdiff/*.h |
|
27 | 27 | $$CC $$CFLAGS -c \ |
|
28 | 28 | -o $@ \ |
|
29 | 29 | $< |
|
30 | 30 | |
|
31 |
xdiff_fuzzer: xdiff.cc fuzz-xdiffi.o |
|
|
31 | xdiff_fuzzer: xdiff.cc fuzz-xdiffi.o fuzz-xprepare.o fuzz-xutils.o | |
|
32 | 32 | $$CXX $$CXXFLAGS -std=c++11 -I../../mercurial xdiff.cc \ |
|
33 |
fuzz-xdiffi.o |
|
|
33 | fuzz-xdiffi.o fuzz-xprepare.o fuzz-xutils.o \ | |
|
34 | 34 | -lFuzzingEngine -o $$OUT/xdiff_fuzzer |
|
35 | 35 | |
|
36 | 36 | all: bdiff xdiff |
@@ -37,20 +37,13 int LLVMFuzzerTestOneInput(const uint8_t | |||
|
37 | 37 | b.size = Size - split; |
|
38 | 38 | xpparam_t xpp = { |
|
39 | 39 | XDF_INDENT_HEURISTIC, /* flags */ |
|
40 | NULL, /* anchors */ | |
|
41 | 0, /* anchors_nr */ | |
|
42 | 40 | }; |
|
43 | 41 | xdemitconf_t xecfg = { |
|
44 | 0, /* ctxlen */ | |
|
45 | 0, /* interhunkctxlen */ | |
|
46 | 42 | XDL_EMIT_BDIFFHUNK, /* flags */ |
|
47 | NULL, /* find_func */ | |
|
48 | NULL, /* find_func_priv */ | |
|
49 | 43 | hunk_consumer, /* hunk_consume_func */ |
|
50 | 44 | }; |
|
51 | 45 | xdemitcb_t ecb = { |
|
52 | 46 | NULL, /* priv */ |
|
53 | NULL, /* outf */ | |
|
54 | 47 | }; |
|
55 | 48 | xdl_diff(&a, &b, &xpp, &xecfg, &ecb); |
|
56 | 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