From a35ab3e6e024d0b548ded26a2e3b8ecd838ead93 Mon Sep 17 00:00:00 2001 From: caryclark Date: Thu, 20 Oct 2016 08:32:18 -0700 Subject: fix fuzzers Many old pathops-related fuzz failures have built up while the codebase was under a state a flux. Now that the code is stable, address these failures. Most of the CL plumbs the debug global state to downstream routines so that, if the data is not trusted (ala fuzzed) the function can safely exit without asserting. TBR=reed@google.com GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2426173002 Review-Url: https://chromiumcodereview.appspot.com/2426173002 --- tests/PathOpsAngleTest.cpp | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) (limited to 'tests/PathOpsAngleTest.cpp') diff --git a/tests/PathOpsAngleTest.cpp b/tests/PathOpsAngleTest.cpp index fe39d40b9c..d5285c8fbc 100644 --- a/tests/PathOpsAngleTest.cpp +++ b/tests/PathOpsAngleTest.cpp @@ -81,7 +81,9 @@ DEF_TEST(PathOpsAngleFindQuadEpsilon, reporter) { SkDPoint qPt2 = line.ptAtT(t3); qPt.fX += qPt2.fY; qPt.fY -= qPt2.fX; - SkDQuad quad = {{line[0], dPt, qPt}}; + QuadPts q = {{line[0], dPt, qPt}}; + SkDQuad quad; + quad.debugSet(q.fPts); // binary search for maximum movement of quad[1] towards test that still has 1 intersection double moveT = 0.5f; double deltaT = moveT / 2; @@ -223,7 +225,7 @@ public: }; struct CircleData { - const SkDCubic fPts; + const CubicPts fPts; const int fPtCount; SkPoint fShortPts[4]; }; @@ -266,7 +268,7 @@ DEF_TEST(PathOpsAngleCircle, reporter) { } struct IntersectData { - const SkDCubic fPts; + const CubicPts fPts; const int fPtCount; double fTStart; double fTEnd; -- cgit v1.2.3