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

Side by Side Diff: tests/PathOpsSimplifyFailTest.cpp

Issue 2426393004: fix more chrome asan fuzzer failures (Closed)
Patch Set: add fail check Created 4 years, 1 month 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 | « tests/PathOpsOpTest.cpp ('k') | no next file » | 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 2013 Google Inc. 2 * Copyright 2013 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 "SkPath.h" 8 #include "SkPath.h"
9 #include "SkPathOps.h" 9 #include "SkPathOps.h"
10 #include "SkPoint.h" 10 #include "SkPoint.h"
(...skipping 137 matching lines...) Expand 10 before | Expand all | Expand 10 after
148 path.moveTo(SkBits2Float(0xe9b6b6b6), SkBits2Float(0xe9b6b8e9)); // -2.76109e+2 5f, -2.76122e+25f 148 path.moveTo(SkBits2Float(0xe9b6b6b6), SkBits2Float(0xe9b6b8e9)); // -2.76109e+2 5f, -2.76122e+25f
149 path.close(); 149 path.close();
150 path.moveTo(SkBits2Float(0xe9b6b6b6), SkBits2Float(0xe9b6b8e9)); // -2.76109e+2 5f, -2.76122e+25f 150 path.moveTo(SkBits2Float(0xe9b6b6b6), SkBits2Float(0xe9b6b8e9)); // -2.76109e+2 5f, -2.76122e+25f
151 path.quadTo(SkBits2Float(0xe93ae9e9), SkBits2Float(0xe964b6e9), SkBits2Float(0x0 000203a), SkBits2Float(0xb6000000)); // -1.41228e+25f, -1.72812e+25f, 1.15607e- 41f, -1.90735e-06f 151 path.quadTo(SkBits2Float(0xe93ae9e9), SkBits2Float(0xe964b6e9), SkBits2Float(0x0 000203a), SkBits2Float(0xb6000000)); // -1.41228e+25f, -1.72812e+25f, 1.15607e- 41f, -1.90735e-06f
152 path.moveTo(SkBits2Float(0x64b6b6b6), SkBits2Float(0xe9e9e900)); // 2.69638e+22 f, -3.53475e+25f 152 path.moveTo(SkBits2Float(0x64b6b6b6), SkBits2Float(0xe9e9e900)); // 2.69638e+22 f, -3.53475e+25f
153 path.quadTo(SkBits2Float(0xb6b6b6e9), SkBits2Float(0xb6b6b6b6), SkBits2Float(0xe 9e9b6ce), SkBits2Float(0xe9e93ae9)); // -5.44532e-06f, -5.44529e-06f, -3.53179e +25f, -3.52447e+25f 153 path.quadTo(SkBits2Float(0xb6b6b6e9), SkBits2Float(0xb6b6b6b6), SkBits2Float(0xe 9e9b6ce), SkBits2Float(0xe9e93ae9)); // -5.44532e-06f, -5.44529e-06f, -3.53179e +25f, -3.52447e+25f
154 154
155 testSimplifyFuzz(reporter, path, filename); 155 testSimplifyFuzz(reporter, path, filename);
156 } 156 }
157 157
158 static void fuzz763_2(skiatest::Reporter* reporter, const char* filename) {
159 SkPath path;
160 path.setFillType((SkPath::FillType) 0);
161 path.moveTo(SkBits2Float(0x00000000), SkBits2Float(0x00000000)); // 0, 0
162 path.cubicTo(SkBits2Float(0x76773011), SkBits2Float(0x5d66fe78), SkBits2Float(0x bbeeff66), SkBits2Float(0x637677a2), SkBits2Float(0x205266fe), SkBits2Float(0xec 296fdf)); // 1.25339e+33f, 1.0403e+18f, -0.00729363f, 4.54652e+21f, 1.78218e-19 f, -8.19347e+26f
163 path.lineTo(SkBits2Float(0x00000000), SkBits2Float(0x00000000)); // 0, 0
164 path.close();
165 path.moveTo(SkBits2Float(0x00000000), SkBits2Float(0x00000000)); // 0, 0
166 path.quadTo(SkBits2Float(0xec4eecec), SkBits2Float(0x6e6f10ec), SkBits2Float(0xb 6b6ecf7), SkBits2Float(0xb6b6b6b6)); // -1.00063e+27f, 1.84968e+28f, -5.45161e- 06f, -5.44529e-06f
167 path.moveTo(SkBits2Float(0x002032b8), SkBits2Float(0xecfeb6b6)); // 2.95693e-39 f, -2.46344e+27f
168 path.moveTo(SkBits2Float(0x73737300), SkBits2Float(0x73735273)); // 1.9288e+31f , 1.9278e+31f
169 path.cubicTo(SkBits2Float(0x1616ece4), SkBits2Float(0xdf020018), SkBits2Float(0x 77772965), SkBits2Float(0x1009db73), SkBits2Float(0x80ececec), SkBits2Float(0xf7 ffffff)); // 1.21917e-25f, -9.36751e+18f, 5.01303e+33f, 2.71875e-29f, -2.17582e -38f, -1.03846e+34f
170 path.lineTo(SkBits2Float(0x73737300), SkBits2Float(0x73735273)); // 1.9288e+31f , 1.9278e+31f
171 path.close();
172 path.moveTo(SkBits2Float(0x73737300), SkBits2Float(0x73735273)); // 1.9288e+31f , 1.9278e+31f
173 path.conicTo(SkBits2Float(0xec0700ec), SkBits2Float(0xecececec), SkBits2Float(0x ececccec), SkBits2Float(0x772965ec), SkBits2Float(0x77777377)); // -6.52837e+26 f, -2.2914e+27f, -2.29019e+27f, 3.4358e+33f, 5.0189e+33f
174 path.moveTo(SkBits2Float(0xfe817477), SkBits2Float(0xdf665266)); // -8.60376e+3 7f, -1.65964e+19f
175 path.close();
176 path.moveTo(SkBits2Float(0xfe817477), SkBits2Float(0xdf665266)); // -8.60376e+3 7f, -1.65964e+19f
177 path.quadTo(SkBits2Float(0x29ec02ec), SkBits2Float(0x1009ecec), SkBits2Float(0x8 0ececec), SkBits2Float(0xf7ffffff)); // 1.0481e-13f, 2.7201e-29f, -2.17582e-38f , -1.03846e+34f
178 path.lineTo(SkBits2Float(0xfe817477), SkBits2Float(0xdf665266)); // -8.60376e+3 7f, -1.65964e+19f
179 path.close();
180 path.moveTo(SkBits2Float(0xfe817477), SkBits2Float(0xdf665266)); // -8.60376e+3 7f, -1.65964e+19f
181 path.conicTo(SkBits2Float(0xff003aff), SkBits2Float(0xdbec2300), SkBits2Float(0x ecececec), SkBits2Float(0x6fdf6052), SkBits2Float(0x41ecec29)); // -1.70448e+38 f, -1.32933e+17f, -2.2914e+27f, 1.38263e+29f, 29.6153f
182 path.lineTo(SkBits2Float(0xfe817477), SkBits2Float(0xdf665266)); // -8.60376e+3 7f, -1.65964e+19f
183 path.close();
184 path.moveTo(SkBits2Float(0xfe817477), SkBits2Float(0xdf665266)); // -8.60376e+3 7f, -1.65964e+19f
185 path.quadTo(SkBits2Float(0xecf76e6f), SkBits2Float(0xeccfddec), SkBits2Float(0xe cececcc), SkBits2Float(0x66000066)); // -2.39301e+27f, -2.01037e+27f, -2.2914e+ 27f, 1.51118e+23f
186 path.lineTo(SkBits2Float(0xfe817477), SkBits2Float(0xdf665266)); // -8.60376e+3 7f, -1.65964e+19f
187 path.close();
188 path.moveTo(SkBits2Float(0xfe817477), SkBits2Float(0xdf665266)); // -8.60376e+3 7f, -1.65964e+19f
189 path.cubicTo(SkBits2Float(0x772965df), SkBits2Float(0x77777377), SkBits2Float(0x 77777876), SkBits2Float(0x665266fe), SkBits2Float(0xecececdf), SkBits2Float(0x02 85806e)); // 3.4358e+33f, 5.0189e+33f, 5.0193e+33f, 2.48399e+23f, -2.2914e+27f, 1.96163e-37f
190 path.lineTo(SkBits2Float(0xecececeb), SkBits2Float(0xecec0700)); // -2.2914e+27 f, -2.28272e+27f
191 path.lineTo(SkBits2Float(0xfe817477), SkBits2Float(0xdf665266)); // -8.60376e+3 7f, -1.65964e+19f
192 path.close();
193 path.moveTo(SkBits2Float(0xfe817477), SkBits2Float(0xdf665266)); // -8.60376e+3 7f, -1.65964e+19f
194 path.lineTo(SkBits2Float(0x65ecfaec), SkBits2Float(0xde777729)); // 1.39888e+23 f, -4.45794e+18f
195 path.conicTo(SkBits2Float(0x74777777), SkBits2Float(0x66fe7876), SkBits2Float(0x ecdf6660), SkBits2Float(0x726eecec), SkBits2Float(0x29d610ec)); // 7.84253e+31f , 6.00852e+23f, -2.16059e+27f, 4.73241e+30f, 9.50644e-14f
196 path.lineTo(SkBits2Float(0xfe817477), SkBits2Float(0xdf665266)); // -8.60376e+3 7f, -1.65964e+19f
197 path.close();
198 path.moveTo(SkBits2Float(0xd0ecec10), SkBits2Float(0x6e6eecdb)); // -3.17991e+1 0f, 1.84859e+28f
199 path.quadTo(SkBits2Float(0x003affec), SkBits2Float(0xec2300ef), SkBits2Float(0xe cececdb), SkBits2Float(0xcfececec)); // 5.41827e-39f, -7.88237e+26f, -2.2914e+2 7f, -7.9499e+09f
200 path.lineTo(SkBits2Float(0xd0ecec10), SkBits2Float(0x6e6eecdb)); // -3.17991e+1 0f, 1.84859e+28f
201 path.close();
202 path.moveTo(SkBits2Float(0xd0ecec10), SkBits2Float(0x6e6eecdb)); // -3.17991e+1 0f, 1.84859e+28f
203 path.quadTo(SkBits2Float(0xecccec80), SkBits2Float(0xfa66ecec), SkBits2Float(0x6 6fa0000), SkBits2Float(0x772965df)); // -1.9819e+27f, -2.99758e+35f, 5.90296e+2 3f, 3.4358e+33f
204 path.moveTo(SkBits2Float(0x77777790), SkBits2Float(0x00807677)); // 5.01923e+33 f, 1.17974e-38f
205 path.close();
206 path.moveTo(SkBits2Float(0x77777790), SkBits2Float(0x00807677)); // 5.01923e+33 f, 1.17974e-38f
207 path.cubicTo(SkBits2Float(0xecececec), SkBits2Float(0xfe66eaec), SkBits2Float(0x ecdf1452), SkBits2Float(0x806eecec), SkBits2Float(0x10ececec), SkBits2Float(0xec 000000)); // -2.2914e+27f, -7.67356e+37f, -2.15749e+27f, -1.01869e-38f, 9.34506 e-29f, -6.1897e+26f
208 path.lineTo(SkBits2Float(0x77777790), SkBits2Float(0x00807677)); // 5.01923e+33 f, 1.17974e-38f
209 path.close();
210 path.moveTo(SkBits2Float(0x77777790), SkBits2Float(0x00807677)); // 5.01923e+33 f, 1.17974e-38f
211 path.cubicTo(SkBits2Float(0x52668062), SkBits2Float(0x2965df66), SkBits2Float(0x 77777377), SkBits2Float(0x76777773), SkBits2Float(0x1697fe78), SkBits2Float(0xee bfff00)); // 2.47499e+11f, 5.1042e-14f, 5.0189e+33f, 1.2548e+33f, 2.4556e-25f, -2.971e+28f
212 path.lineTo(SkBits2Float(0x77777790), SkBits2Float(0x00807677)); // 5.01923e+33 f, 1.17974e-38f
213 path.close();
214
215 testSimplifyFuzz(reporter, path, filename);
216 }
217
158 218
159 #define TEST(test) test(reporter, #test) 219 #define TEST(test) test(reporter, #test)
160 220
161 DEF_TEST(PathOpsSimplifyFail, reporter) { 221 DEF_TEST(PathOpsSimplifyFail, reporter) {
222 TEST(fuzz763_2);
162 TEST(fuzz763_1); 223 TEST(fuzz763_1);
163 TEST(fuzz_x2); 224 TEST(fuzz_x2);
164 TEST(fuzz_x1); 225 TEST(fuzz_x1);
165 TEST(fuzz_59); 226 TEST(fuzz_59);
166 for (int index = 0; index < (int) (13 * nonFinitePtsCount * finitePtsCount); ++index) { 227 for (int index = 0; index < (int) (13 * nonFinitePtsCount * finitePtsCount); ++index) {
167 failOne(reporter, index); 228 failOne(reporter, index);
168 } 229 }
169 for (int index = 0; index < (int) (11 * finitePtsCount); ++index) { 230 for (int index = 0; index < (int) (11 * finitePtsCount); ++index) {
170 dontFailOne(reporter, index); 231 dontFailOne(reporter, index);
171 } 232 }
172 } 233 }
173 234
174 #undef TEST 235 #undef TEST
175 236
176 DEF_TEST(PathOpsSimplifyFailOne, reporter) { 237 DEF_TEST(PathOpsSimplifyFailOne, reporter) {
177 int index = 0; 238 int index = 0;
178 failOne(reporter, index); 239 failOne(reporter, index);
179 } 240 }
180 241
181 DEF_TEST(PathOpsSimplifyDontFailOne, reporter) { 242 DEF_TEST(PathOpsSimplifyDontFailOne, reporter) {
182 int index = 17; 243 int index = 17;
183 dontFailOne(reporter, index); 244 dontFailOne(reporter, index);
184 } 245 }
OLDNEW
« no previous file with comments | « tests/PathOpsOpTest.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698