Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(429)

Side by Side Diff: tests/PathOpsOpTest.cpp

Issue 2426393004: fix more chrome asan fuzzer failures (Closed)
Patch Set: add fail check Created 4 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « src/pathops/SkOpCoincidence.cpp ('k') | tests/PathOpsSimplifyFailTest.cpp » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 /* 1 /*
2 * Copyright 2012 Google Inc. 2 * Copyright 2012 Google Inc.
3 * 3 *
4 * Use of this source code is governed by a BSD-style license that can be 4 * Use of this source code is governed by a BSD-style license that can be
5 * found in the LICENSE file. 5 * found in the LICENSE file.
6 */ 6 */
7 #include "PathOpsExtendedTest.h" 7 #include "PathOpsExtendedTest.h"
8 #include "PathOpsTestCommon.h" 8 #include "PathOpsTestCommon.h"
9 9
10 class PathTest_Private { 10 class PathTest_Private {
(...skipping 8281 matching lines...) Expand 10 before | Expand all | Expand 10 after
8292 path.quadTo(SkBits2Float(0x5adada72), SkBits2Float(0x52525252), SkBits2Float(0x7 2725252), SkBits2Float(0x72727272)); // 3.08009e+16f, 2.25831e+11f, 4.79967e+30 f, 4.80216e+30f 8292 path.quadTo(SkBits2Float(0x5adada72), SkBits2Float(0x52525252), SkBits2Float(0x7 2725252), SkBits2Float(0x72727272)); // 3.08009e+16f, 2.25831e+11f, 4.79967e+30 f, 4.80216e+30f
8293 8293
8294 SkPath path1(path); 8294 SkPath path1(path);
8295 path.reset(); 8295 path.reset();
8296 path.setFillType((SkPath::FillType) 0); 8296 path.setFillType((SkPath::FillType) 0);
8297 8297
8298 SkPath path2(path); 8298 SkPath path2(path);
8299 testPathOpFuzz(reporter, path1, path2, (SkPathOp) 0, filename); 8299 testPathOpFuzz(reporter, path1, path2, (SkPathOp) 0, filename);
8300 } 8300 }
8301 8301
8302 static void fuzz763_57(skiatest::Reporter* reporter, const char* filename) {
8303 SkPath path;
8304 path.setFillType((SkPath::FillType) 0);
8305
8306 SkPath path1(path);
8307 path.reset();
8308 path.setFillType((SkPath::FillType) 0);
8309 path.moveTo(SkBits2Float(0x68546829), SkBits2Float(0x555b2d29)); // 4.01225e+24 f, 1.50617e+13f
8310 path.moveTo(SkBits2Float(0x1f2a322a), SkBits2Float(0x4b7b2108)); // 3.60404e-20 f, 1.6458e+07f
8311 path.lineTo(SkBits2Float(0x2829ed84), SkBits2Float(0x5b2d2d55)); // 9.43289e-15 f, 4.8745e+16f
8312 path.moveTo(SkBits2Float(0x6838552d), SkBits2Float(0xf0684f5b)); // 3.48195e+24 f, -2.87586e+29f
8313 path.conicTo(SkBits2Float(0x212a1f5b), SkBits2Float(0x2a8cef2a), SkBits2Float(0x 682d2953), SkBits2Float(0xce682103), SkBits2Float(0x4b7bc055)); // 5.76397e-19f , 2.50349e-13f, 3.27093e+24f, -9.73619e+08f, 1.64988e+07f
8314 path.lineTo(SkBits2Float(0x5b2c6829), SkBits2Float(0x3b2a8c55)); // 4.85282e+16 f, 0.00260236f
8315 path.lineTo(SkBits2Float(0x6838552d), SkBits2Float(0xf0684f5b)); // 3.48195e+24 f, -2.87586e+29f
8316 path.close();
8317 path.moveTo(SkBits2Float(0x6838552d), SkBits2Float(0xf0684f5b)); // 3.48195e+24 f, -2.87586e+29f
8318 path.conicTo(SkBits2Float(0xd2c00321), SkBits2Float(0xc0394b7b), SkBits2Float(0x 8c08ed7a), SkBits2Float(0x211f2f2a), SkBits2Float(0x704b7b03)); // -4.12343e+11 f, -2.89523f, -1.05485e-31f, 5.39337e-19f, 2.51897e+29f
8319 path.cubicTo(SkBits2Float(0x2d6829ed), SkBits2Float(0x5b2d555b), SkBits2Float(0x 68275b2d), SkBits2Float(0x21685527), SkBits2Float(0x0321082a), SkBits2Float(0x6a 4b7bc0)); // 1.3197e-11f, 4.8789e+16f, 3.16127e+24f, 7.87174e-19f, 4.7323e-37f, 6.14991e+25f
8320 path.conicTo(SkBits2Float(0x212a8ced), SkBits2Float(0x0321081f), SkBits2Float(0x 6a4b7bc0), SkBits2Float(0x2829ed84), SkBits2Float(0x5b2d2d55)); // 5.77848e-19f , 4.7323e-37f, 6.14991e+25f, 9.43289e-15f, 4.8745e+16f
8321 path.moveTo(SkBits2Float(0x6839552d), SkBits2Float(0xf0683b5b)); // 3.50084e+24 f, -2.87489e+29f
8322 path.conicTo(SkBits2Float(0x212a1f5b), SkBits2Float(0x228cef2a), SkBits2Float(0x 682d2953), SkBits2Float(0xee682103), SkBits2Float(0x287bc055)); // 5.76397e-19f , 3.82003e-18f, 3.27093e+24f, -1.79601e+28f, 1.3975e-14f
8323 path.lineTo(SkBits2Float(0x5b2c6829), SkBits2Float(0x212a8c55)); // 4.85282e+16 f, 5.7784e-19f
8324 path.conicTo(SkBits2Float(0x4b03213b), SkBits2Float(0xc07b2a08), SkBits2Float(0x 5b2d7a6a), SkBits2Float(0xf0556830), SkBits2Float(0x2a8c555b)); // 8.59372e+06f , -3.92444f, 4.88298e+16f, -2.64185e+29f, 2.49282e-13f
8325 path.conicTo(SkBits2Float(0x0321212a), SkBits2Float(0x4b7bd2c0), SkBits2Float(0x ed7ac039), SkBits2Float(0x2f2a8c08), SkBits2Float(0x7b03211f)); // 4.73517e-37f , 1.65035e+07f, -4.85023e+27f, 1.55112e-10f, 6.80863e+35f
8326 path.lineTo(SkBits2Float(0x6839552d), SkBits2Float(0xf0683b5b)); // 3.50084e+24 f, -2.87489e+29f
8327 path.close();
8328 path.moveTo(SkBits2Float(0x6839552d), SkBits2Float(0xf0683b5b)); // 3.50084e+24 f, -2.87489e+29f
8329 path.lineTo(SkBits2Float(0x6829ed27), SkBits2Float(0x2d555b2d)); // 3.20982e+24 f, 1.21279e-11f
8330 path.moveTo(SkBits2Float(0x68275b2d), SkBits2Float(0xf0685527)); // 3.16127e+24 f, -2.87614e+29f
8331 path.conicTo(SkBits2Float(0x721f2a5b), SkBits2Float(0x212a8c55), SkBits2Float(0x 0321082a), SkBits2Float(0x6a4b7b28), SkBits2Float(0x4797ed7a)); // 3.1526e+30f, 5.7784e-19f, 4.7323e-37f, 6.14984e+25f, 77787
8332 path.lineTo(SkBits2Float(0x68275b2d), SkBits2Float(0xf0685527)); // 3.16127e+24 f, -2.87614e+29f
8333 path.close();
8334 path.moveTo(SkBits2Float(0x68275b2d), SkBits2Float(0xf0685527)); // 3.16127e+24 f, -2.87614e+29f
8335 path.quadTo(SkBits2Float(0x2828102a), SkBits2Float(0x2c682921), SkBits2Float(0x8 c555bf6), SkBits2Float(0x6d03de30)); // 9.32938e-15f, 3.2992e-12f, -1.64366e-31 f, 2.5507e+27f
8336 path.cubicTo(SkBits2Float(0x683f2d55), SkBits2Float(0xf05b684b), SkBits2Float(0x 8c55272d), SkBits2Float(0x212a292a), SkBits2Float(0x0321082a), SkBits2Float(0x21 1f2a21)); // 3.61123e+24f, -2.71613e+29f, -1.64207e-31f, 5.76527e-19f, 4.7323e- 37f, 5.39271e-19f
8337 path.lineTo(SkBits2Float(0x3a803adf), SkBits2Float(0x8a294f1a)); // 0.000978317 f, -8.15193e-33f
8338 path.quadTo(SkBits2Float(0x291d9628), SkBits2Float(0x2a43e62b), SkBits2Float(0x0 93a2a81), SkBits2Float(0x5c5c8ced)); // 3.49912e-14f, 1.73993e-13f, 2.24089e-33 f, 2.48318e+17f
8339 path.lineTo(SkBits2Float(0x68275b2d), SkBits2Float(0xf0685527)); // 3.16127e+24 f, -2.87614e+29f
8340 path.close();
8341 path.moveTo(SkBits2Float(0x68275b2d), SkBits2Float(0xf0685527)); // 3.16127e+24 f, -2.87614e+29f
8342 path.cubicTo(SkBits2Float(0x3ac2213a), SkBits2Float(0x291d9628), SkBits2Float(0x 2a43e62b), SkBits2Float(0x293a2a81), SkBits2Float(0x5c5c8ced), SkBits2Float(0x5c 5c6e5c)); // 0.00148109f, 3.49912e-14f, 1.73993e-13f, 4.13372e-14f, 2.48318e+17 f, 2.48183e+17f
8343 path.lineTo(SkBits2Float(0x1f212a8c), SkBits2Float(0xc0032108)); // 3.41283e-20 f, -2.04889f
8344 path.lineTo(SkBits2Float(0xed847b4b), SkBits2Float(0x2d552829)); // -5.12513e+2 7f, 1.21166e-11f
8345 path.conicTo(SkBits2Float(0x552d5b5b), SkBits2Float(0x3b5a6839), SkBits2Float(0x 5b2df068), SkBits2Float(0x2a212a1f), SkBits2Float(0x532a8cef)); // 1.1913e+13f, 0.00333263f, 4.89595e+16f, 1.43143e-13f, 7.32509e+11f
8346
8347 SkPath path2(path);
8348 testPathOpFuzz(reporter, path1, path2, (SkPathOp) 0, filename);
8349 }
8350
8302 static struct TestDesc failTests[] = { 8351 static struct TestDesc failTests[] = {
8352 TEST(fuzz763_57),
8303 TEST(fuzz763_56), 8353 TEST(fuzz763_56),
8304 TEST(fuzz763_55), 8354 TEST(fuzz763_55),
8305 TEST(fuzz763_54), 8355 TEST(fuzz763_54),
8306 TEST(fuzz763_53), 8356 TEST(fuzz763_53),
8307 TEST(fuzz763_52), 8357 TEST(fuzz763_52),
8308 TEST(fuzz763_51), 8358 TEST(fuzz763_51),
8309 TEST(fuzz763_50), 8359 TEST(fuzz763_50),
8310 TEST(fuzz763_49), 8360 TEST(fuzz763_49),
8311 TEST(fuzz763_48), 8361 TEST(fuzz763_48),
8312 TEST(fuzz763_47), 8362 TEST(fuzz763_47),
(...skipping 74 matching lines...) Expand 10 before | Expand all | Expand 10 after
8387 } 8437 }
8388 8438
8389 static struct TestDesc repTests[] = { 8439 static struct TestDesc repTests[] = {
8390 TEST(fuzz763_5a), 8440 TEST(fuzz763_5a),
8391 }; 8441 };
8392 8442
8393 DEF_TEST(PathOpsRepOp, reporter) { 8443 DEF_TEST(PathOpsRepOp, reporter) {
8394 for (int index = 0; index < 1; ++index) 8444 for (int index = 0; index < 1; ++index)
8395 RunTestSet(reporter, repTests, SK_ARRAY_COUNT(repTests), nullptr, nullptr, n ullptr, false); 8445 RunTestSet(reporter, repTests, SK_ARRAY_COUNT(repTests), nullptr, nullptr, n ullptr, false);
8396 } 8446 }
OLDNEW
« no previous file with comments | « src/pathops/SkOpCoincidence.cpp ('k') | tests/PathOpsSimplifyFailTest.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698