diff options
author | Cary Clark <caryclark@skia.org> | 2018-04-02 12:40:49 -0400 |
---|---|---|
committer | Skia Commit-Bot <skia-commit-bot@chromium.org> | 2018-04-03 17:38:00 +0000 |
commit | 8d8a5d9543951ef8c25eff0ea6220daae823e236 (patch) | |
tree | c13c2ba625f194e543a346e9c369caab4d9fcb25 /src/pathops | |
parent | 27d42198d3cdd44918854539e7111d551eb9f995 (diff) |
fix pathop fuzzes
throw an error instead of asserting for one
for the other, only assert if the values are trusted. That's not ideal,
but I don't see an easy way to insert a fail safety hatch in this code
and if the assert is ignored, no further assert is triggered.
verified that extended tests run without problem on debug and release
R=kjlubick@google.com
Bug: skia:
Change-Id: I5544b6cbef97479854dbecb05baae6b2c41cabc9
Reviewed-on: https://skia-review.googlesource.com/117725
Commit-Queue: Cary Clark <caryclark@skia.org>
Reviewed-by: Kevin Lubick <kjlubick@google.com>
Diffstat (limited to 'src/pathops')
-rw-r--r-- | src/pathops/SkOpCoincidence.cpp | 2 | ||||
-rw-r--r-- | src/pathops/SkOpSpan.h | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/src/pathops/SkOpCoincidence.cpp b/src/pathops/SkOpCoincidence.cpp index 73ab3ab8dd..ab848c8c9f 100644 --- a/src/pathops/SkOpCoincidence.cpp +++ b/src/pathops/SkOpCoincidence.cpp @@ -850,7 +850,7 @@ bool SkOpCoincidence::addMissing(bool* added DEBUG_COIN_DECLARE_PARAMS()) { } } else if (outerOpp == innerOpp) { const SkOpPtT* ooe = outer->oppPtTEnd(); - SkASSERT(!ooe->deleted()); + FAIL_IF(ooe->deleted()); const SkOpPtT* ioe = inner->oppPtTEnd(); if (ioe->deleted()) { return true; diff --git a/src/pathops/SkOpSpan.h b/src/pathops/SkOpSpan.h index af1481e920..bedeabd6b1 100644 --- a/src/pathops/SkOpSpan.h +++ b/src/pathops/SkOpSpan.h @@ -127,7 +127,7 @@ public: *eOut = between(s1->fT, end2->fT, e1->fT) ? end2 : between(s2->fT, end1->fT, e2->fT) ? end1 : nullptr; if (*sOut == *eOut) { - SkASSERT(start1->fT >= end2->fT || start2->fT >= end1->fT); + SkOPOBJASSERT(s1, start1->fT >= end2->fT || start2->fT >= end1->fT); return false; } SkASSERT(!*sOut || *sOut != *eOut); |