Patchwork D2707: fuzz: fix xdiff build

login
register
mail settings
Submitter phabricator
Date March 7, 2018, 3:31 a.m.
Message ID <differential-rev-PHID-DREV-mqlgo2oxp5g642yejjmf-req@phab.mercurial-scm.org>
Download mbox | patch
Permalink /patch/29087/
State Superseded
Headers show

Comments

phabricator - March 7, 2018, 3:31 a.m.
quark created this revision.
Herald added a subscriber: mercurial-devel.
Herald added a reviewer: hg-reviewers.

REVISION SUMMARY
  Recent xdiff code cleanups removed some files and changed some structures.
  Update fuzz code.

REPOSITORY
  rHG Mercurial

REVISION DETAIL
  https://phab.mercurial-scm.org/D2707

AFFECTED FILES
  contrib/fuzz/Makefile
  contrib/fuzz/xdiff.cc

CHANGE DETAILS




To: quark, #hg-reviewers
Cc: mercurial-devel

Patch

diff --git a/contrib/fuzz/xdiff.cc b/contrib/fuzz/xdiff.cc
--- a/contrib/fuzz/xdiff.cc
+++ b/contrib/fuzz/xdiff.cc
@@ -37,20 +37,13 @@ 
 	b.size = Size - split;
 	xpparam_t xpp = {
 	    XDF_INDENT_HEURISTIC, /* flags */
-	    NULL,                 /* anchors */
-	    0,                    /* anchors_nr */
 	};
 	xdemitconf_t xecfg = {
-	    0,                  /* ctxlen */
-	    0,                  /* interhunkctxlen */
 	    XDL_EMIT_BDIFFHUNK, /* flags */
-	    NULL,               /* find_func */
-	    NULL,               /* find_func_priv */
 	    hunk_consumer,      /* hunk_consume_func */
 	};
 	xdemitcb_t ecb = {
 	    NULL, /* priv */
-	    NULL, /* outf */
 	};
 	xdl_diff(&a, &b, &xpp, &xecfg, &ecb);
 	return 0; // Non-zero return values are reserved for future use.
diff --git a/contrib/fuzz/Makefile b/contrib/fuzz/Makefile
--- a/contrib/fuzz/Makefile
+++ b/contrib/fuzz/Makefile
@@ -18,19 +18,19 @@ 
 	  -o $@ \
 	  $<
 
-xdiff: xdiff.cc xdiffi.o  xemit.o  xmerge.o  xprepare.o  xutils.o
+xdiff: xdiff.cc xdiffi.o xprepare.o  xutils.o
 	clang -DHG_FUZZER_INCLUDE_MAIN=1 -g -O1 -fsanitize=fuzzer-no-link,address \
 	  -I../../mercurial xdiff.cc \
-	  xdiffi.o xemit.o xmerge.o xprepare.o xutils.o -o xdiff
+	  xdiffi.o xprepare.o xutils.o -o xdiff
 
 fuzz-x%.o: ../../mercurial/thirdparty/xdiff/x%.c ../../mercurial/thirdparty/xdiff/*.h
 	$$CC $$CFLAGS -c \
 	  -o $@ \
 	  $<
 
-xdiff_fuzzer: xdiff.cc fuzz-xdiffi.o  fuzz-xemit.o  fuzz-xmerge.o  fuzz-xprepare.o  fuzz-xutils.o
+xdiff_fuzzer: xdiff.cc fuzz-xdiffi.o fuzz-xprepare.o  fuzz-xutils.o
 	$$CXX $$CXXFLAGS -std=c++11 -I../../mercurial xdiff.cc \
-	  fuzz-xdiffi.o fuzz-xemit.o fuzz-xmerge.o fuzz-xprepare.o fuzz-xutils.o \
+	  fuzz-xdiffi.o fuzz-xprepare.o fuzz-xutils.o \
 	  -lFuzzingEngine -o $$OUT/xdiff_fuzzer
 
 all: bdiff xdiff