OLD | NEW |
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 8167 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
8178 path.moveTo(SkBits2Float(0xef08a412), SkBits2Float(0x5aaeff7f)); // -4.22883e+2
8f, 2.46288e+16f | 8178 path.moveTo(SkBits2Float(0xef08a412), SkBits2Float(0x5aaeff7f)); // -4.22883e+2
8f, 2.46288e+16f |
8179 path.conicTo(SkBits2Float(0x7644626c), SkBits2Float(0x088912fc), SkBits2Float(0x
ae8744ef), SkBits2Float(0x76571f5a), SkBits2Float(0x45ab86fc)); // 9.95788e+32f
, 8.24985e-34f, -6.15133e-11f, 1.0908e+33f, 5488.87f | 8179 path.conicTo(SkBits2Float(0x7644626c), SkBits2Float(0x088912fc), SkBits2Float(0x
ae8744ef), SkBits2Float(0x76571f5a), SkBits2Float(0x45ab86fc)); // 9.95788e+32f
, 8.24985e-34f, -6.15133e-11f, 1.0908e+33f, 5488.87f |
8180 path.conicTo(SkBits2Float(0x4064fe62), SkBits2Float(0x290877ef), SkBits2Float(0x
780080b8), SkBits2Float(0x553c7644), SkBits2Float(0x644eae87)); // 3.57803f, 3.
03021e-14f, 1.04254e+34f, 1.2951e+13f, 1.52504e+22f | 8180 path.conicTo(SkBits2Float(0x4064fe62), SkBits2Float(0x290877ef), SkBits2Float(0x
780080b8), SkBits2Float(0x553c7644), SkBits2Float(0x644eae87)); // 3.57803f, 3.
03021e-14f, 1.04254e+34f, 1.2951e+13f, 1.52504e+22f |
8181 path.lineTo(SkBits2Float(0xef08a412), SkBits2Float(0x5aaeff7f)); // -4.22883e+2
8f, 2.46288e+16f | 8181 path.lineTo(SkBits2Float(0xef08a412), SkBits2Float(0x5aaeff7f)); // -4.22883e+2
8f, 2.46288e+16f |
8182 path.close(); | 8182 path.close(); |
8183 | 8183 |
8184 SkPath path2(path); | 8184 SkPath path2(path); |
8185 testPathOpFuzz(reporter, path1, path2, (SkPathOp) 0, filename); | 8185 testPathOpFuzz(reporter, path1, path2, (SkPathOp) 0, filename); |
8186 } | 8186 } |
8187 | 8187 |
| 8188 // hangs 654939 |
| 8189 static void fuzz763_54(skiatest::Reporter* reporter, const char* filename) { |
| 8190 SkPath path; |
| 8191 path.setFillType((SkPath::FillType) 0); |
| 8192 path.moveTo(SkBits2Float(0x00000000), SkBits2Float(0x00000000)); // 0, 0 |
| 8193 path.conicTo(SkBits2Float(0x5b682968), SkBits2Float(0xb3b32d11), SkBits2Float(0x
b3b3b3b3), SkBits2Float(0x5b29b3b3), SkBits2Float(0x212a8c55)); // 6.53477e+16f
, -8.34353e-08f, -8.36802e-08f, 4.77669e+16f, 5.7784e-19f |
| 8194 path.conicTo(SkBits2Float(0x68555b2d), SkBits2Float(0x28296869), SkBits2Float(0x
5b252a08), SkBits2Float(0x5d68392a), SkBits2Float(0x29282780)); // 4.03018e+24f
, 9.40402e-15f, 4.64896e+16f, 1.04584e+18f, 3.73378e-14f |
| 8195 path.lineTo(SkBits2Float(0x00000000), SkBits2Float(0x00000000)); // 0, 0 |
| 8196 path.close(); |
| 8197 path.moveTo(SkBits2Float(0x00000000), SkBits2Float(0x00000000)); // 0, 0 |
| 8198 path.cubicTo(SkBits2Float(0x52727272), SkBits2Float(0x72727252), SkBits2Float(0x
525252c7), SkBits2Float(0x72725252), SkBits2Float(0x72727272), SkBits2Float(0x72
727255)); // 2.60326e+11f, 4.80215e+30f, 2.25833e+11f, 4.79967e+30f, 4.80216e+3
0f, 4.80215e+30f |
| 8199 path.quadTo(SkBits2Float(0xd7da0000), SkBits2Float(0x5252525a), SkBits2Float(0x7
2525252), SkBits2Float(0x72727272)); // -4.79387e+14f, 2.25831e+11f, 4.16585e+3
0f, 4.80216e+30f |
| 8200 path.quadTo(SkBits2Float(0x48525252), SkBits2Float(0x72725252), SkBits2Float(0x7
2727272), SkBits2Float(0x72727255)); // 215369, 4.79967e+30f, 4.80216e+30f, 4.8
0215e+30f |
| 8201 path.quadTo(SkBits2Float(0xdada007b), SkBits2Float(0x5252525a), SkBits2Float(0x7
2675252), SkBits2Float(0x72727272)); // -3.0681e+16f, 2.25831e+11f, 4.5818e+30f
, 4.80216e+30f |
| 8202 path.quadTo(SkBits2Float(0x52525252), SkBits2Float(0x27725252), SkBits2Float(0x7
2727272), SkBits2Float(0x72727272)); // 2.25831e+11f, 3.36289e-15f, 4.80216e+30
f, 4.80216e+30f |
| 8203 path.quadTo(SkBits2Float(0x1c292172), SkBits2Float(0x7bc00321), SkBits2Float(0x9
aaaaaaa), SkBits2Float(0x8c556a4b)); // 5.59606e-22f, 1.99397e+36f, -7.05861e-2
3f, -1.64409e-31f |
| 8204 path.quadTo(SkBits2Float(0x72725572), SkBits2Float(0x00007272), SkBits2Float(0x5
25adada), SkBits2Float(0x52525252)); // 4.79991e+30f, 4.10552e-41f, 2.34994e+11
f, 2.25831e+11f |
| 8205 path.lineTo(SkBits2Float(0x00000000), SkBits2Float(0x00000000)); // 0, 0 |
| 8206 path.close(); |
| 8207 path.moveTo(SkBits2Float(0xa5252600), SkBits2Float(0x52b4adad)); // -1.43243e-1
6f, 3.88004e+11f |
| 8208 path.close(); |
| 8209 path.moveTo(SkBits2Float(0xa5252600), SkBits2Float(0x52b4adad)); // -1.43243e-1
6f, 3.88004e+11f |
| 8210 path.quadTo(SkBits2Float(0x72725570), SkBits2Float(0x52525272), SkBits2Float(0x7
2525252), SkBits2Float(0x72727272)); // 4.79991e+30f, 2.25832e+11f, 4.16585e+30
f, 4.80216e+30f |
| 8211 path.quadTo(SkBits2Float(0x72727255), SkBits2Float(0x555bb672), SkBits2Float(0x2
9686968), SkBits2Float(0x252a081f)); // 4.80215e+30f, 1.50985e+13f, 5.16058e-14
f, 1.47479e-16f |
| 8212 path.moveTo(SkBits2Float(0x5d68392a), SkBits2Float(0x01002780)); // 1.04584e+18
f, 2.35382e-38f |
| 8213 path.moveTo(SkBits2Float(0x72727200), SkBits2Float(0x72725252)); // 4.80212e+30
f, 4.79967e+30f |
| 8214 path.quadTo(SkBits2Float(0x5adada00), SkBits2Float(0xa5252652), SkBits2Float(0x7
27272ad), SkBits2Float(0xda007b72)); // 3.08006e+16f, -1.43245e-16f, 4.80218e+3
0f, -9.04113e+15f |
| 8215 path.lineTo(SkBits2Float(0x5252525a), SkBits2Float(0x72525252)); // 2.25831e+11
f, 4.16585e+30f |
| 8216 path.quadTo(SkBits2Float(0x72727272), SkBits2Float(0x52525252), SkBits2Float(0x2
7725252), SkBits2Float(0x72727272)); // 4.80216e+30f, 2.25831e+11f, 3.36289e-15
f, 4.80216e+30f |
| 8217 path.quadTo(SkBits2Float(0x72727272), SkBits2Float(0x74217472), SkBits2Float(0x0
05b5574), SkBits2Float(0x72680000)); // 4.80216e+30f, 5.11671e+31f, 8.38768e-39
f, 4.59523e+30f |
| 8218 path.quadTo(SkBits2Float(0x72727272), SkBits2Float(0x52525252), SkBits2Float(0x0
07b7272), SkBits2Float(0x525adada)); // 4.80216e+30f, 2.25831e+11f, 1.13368e-38
f, 2.34994e+11f |
| 8219 path.lineTo(SkBits2Float(0x72727200), SkBits2Float(0x72725252)); // 4.80212e+30
f, 4.79967e+30f |
| 8220 path.close(); |
| 8221 |
| 8222 SkPath path1(path); |
| 8223 path.reset(); |
| 8224 path.setFillType((SkPath::FillType) 0); |
| 8225 |
| 8226 SkPath path2(path); |
| 8227 testPathOpFuzz(reporter, path1, path2, (SkPathOp) 4, filename); |
| 8228 } |
| 8229 |
| 8230 |
| 8231 // afl crash |
| 8232 static void fuzz763_55(skiatest::Reporter* reporter, const char* filename) { |
| 8233 SkPath path; |
| 8234 path.setFillType((SkPath::FillType) 0); |
| 8235 path.moveTo(SkBits2Float(0x00000000), SkBits2Float(0x55415500)); // 0, 1.32857e
+13f |
| 8236 path.lineTo(SkBits2Float(0x55555568), SkBits2Float(0x55555555)); // 1.46602e+13
f, 1.46602e+13f |
| 8237 path.lineTo(SkBits2Float(0x98989898), SkBits2Float(0x55989898)); // -3.94452e-2
4f, 2.09726e+13f |
| 8238 path.lineTo(SkBits2Float(0xf6f65555), SkBits2Float(0x101006f6)); // -2.49812e+3
3f, 2.84044e-29f |
| 8239 path.quadTo(SkBits2Float(0xdca33f10), SkBits2Float(0xf6f6f6f6), SkBits2Float(0xf
621f6f6), SkBits2Float(0xf70ff6f6)); // -3.67598e+17f, -2.50452e+33f, -8.21259e
+32f, -2.91995e+33f |
| 8240 path.lineTo(SkBits2Float(0x9400f6f6), SkBits2Float(0x10530000)); // -6.51105e-2
7f, 4.16124e-29f |
| 8241 path.quadTo(SkBits2Float(0x0f101010), SkBits2Float(0x00101010), SkBits2Float(0xf
610f720), SkBits2Float(0xf6f6f6f6)); // 7.10284e-30f, 1.47513e-39f, -7.35062e+3
2f, -2.50452e+33f |
| 8242 path.lineTo(SkBits2Float(0x105352f6), SkBits2Float(0x1cf6ff10)); // 4.16763e-29
f, 1.63448e-21f |
| 8243 path.lineTo(SkBits2Float(0xf6f6220a), SkBits2Float(0x003700f6)); // -2.49608e+3
3f, 5.0513e-39f |
| 8244 path.cubicTo(SkBits2Float(0x0000001e), SkBits2Float(0x00fff4f6), SkBits2Float(0x
ff101064), SkBits2Float(0xf6b6ac7f), SkBits2Float(0xf6f629f6), SkBits2Float(0x10
f6f6f6)); // 4.2039e-44f, 2.35059e-38f, -1.91494e+38f, -1.85253e+33f, -2.4964e+
33f, 9.74104e-29f |
| 8245 path.quadTo(SkBits2Float(0x10101007), SkBits2Float(0x10f7fd10), SkBits2Float(0xf
6f6f6f6), SkBits2Float(0xf6f645e0)); // 2.84113e-29f, 9.78142e-29f, -2.50452e+3
3f, -2.4975e+33f |
| 8246 path.lineTo(SkBits2Float(0xed9ef6f6), SkBits2Float(0x53535353)); // -6.14965e+2
7f, 9.07636e+11f |
| 8247 path.lineTo(SkBits2Float(0x53006cf6), SkBits2Float(0x53295353)); // 5.51584e+11
f, 7.27247e+11f |
| 8248 path.lineTo(SkBits2Float(0x00000000), SkBits2Float(0x55415500)); // 0, 1.32857e
+13f |
| 8249 path.close(); |
| 8250 path.moveTo(SkBits2Float(0x00000000), SkBits2Float(0x55415500)); // 0, 1.32857e
+13f |
| 8251 path.lineTo(SkBits2Float(0xf6f6f6f6), SkBits2Float(0x5353d9f6)); // -2.50452e+3
3f, 9.09895e+11f |
| 8252 |
| 8253 SkPath path1(path); |
| 8254 path.reset(); |
| 8255 path.setFillType((SkPath::FillType) 0); |
| 8256 |
| 8257 SkPath path2(path); |
| 8258 testPathOpFuzz(reporter, path1, path2, (SkPathOp) 3, filename); |
| 8259 } |
| 8260 |
| 8261 // 656149 |
| 8262 static void fuzz763_56(skiatest::Reporter* reporter, const char* filename) { |
| 8263 SkPath path; |
| 8264 path.setFillType((SkPath::FillType) 0); |
| 8265 path.moveTo(SkBits2Float(0x00000000), SkBits2Float(0x00000000)); // 0, 0 |
| 8266 path.conicTo(SkBits2Float(0x5b682968), SkBits2Float(0xb3b32d11), SkBits2Float(0x
b3b3b3b3), SkBits2Float(0x5b29b3b3), SkBits2Float(0x72725255)); // 6.53477e+16f
, -8.34353e-08f, -8.36802e-08f, 4.77669e+16f, 4.79967e+30f |
| 8267 path.quadTo(SkBits2Float(0x525252c7), SkBits2Float(0x72725252), SkBits2Float(0x7
2727272), SkBits2Float(0x72727255)); // 2.25833e+11f, 4.79967e+30f, 4.80216e+30
f, 4.80215e+30f |
| 8268 path.quadTo(SkBits2Float(0xd7da0000), SkBits2Float(0x5adada00), SkBits2Float(0x5
2525252), SkBits2Float(0x00005252)); // -4.79387e+14f, 3.08006e+16f, 2.25831e+1
1f, 2.9531e-41f |
| 8269 path.conicTo(SkBits2Float(0xadada525), SkBits2Float(0x52525ab4), SkBits2Float(0x
52525252), SkBits2Float(0x72727272), SkBits2Float(0x52527272)); // -1.97412e-11
f, 2.25866e+11f, 2.25831e+11f, 4.80216e+30f, 2.25966e+11f |
| 8270 path.lineTo(SkBits2Float(0x00000000), SkBits2Float(0x00000000)); // 0, 0 |
| 8271 path.close(); |
| 8272 path.moveTo(SkBits2Float(0x00000000), SkBits2Float(0x00000000)); // 0, 0 |
| 8273 path.quadTo(SkBits2Float(0x72725252), SkBits2Float(0x72727272), SkBits2Float(0x7
2727255), SkBits2Float(0xda007b72)); // 4.79967e+30f, 4.80216e+30f, 4.80215e+30
f, -9.04113e+15f |
| 8274 path.lineTo(SkBits2Float(0x5252525a), SkBits2Float(0x72525252)); // 2.25831e+11
f, 4.16585e+30f |
| 8275 path.quadTo(SkBits2Float(0x72727272), SkBits2Float(0x52525252), SkBits2Float(0x2
7725252), SkBits2Float(0x72727272)); // 4.80216e+30f, 2.25831e+11f, 3.36289e-15
f, 4.80216e+30f |
| 8276 path.lineTo(SkBits2Float(0x7bc00321), SkBits2Float(0x9aaaaaaa)); // 1.99397e+36
f, -7.05861e-23f |
| 8277 path.quadTo(SkBits2Float(0x72725572), SkBits2Float(0x00007272), SkBits2Float(0x5
25adada), SkBits2Float(0x52525252)); // 4.79991e+30f, 4.10552e-41f, 2.34994e+11
f, 2.25831e+11f |
| 8278 path.lineTo(SkBits2Float(0x00000000), SkBits2Float(0x00000000)); // 0, 0 |
| 8279 path.close(); |
| 8280 path.moveTo(SkBits2Float(0xa5252600), SkBits2Float(0x52b4adad)); // -1.43243e-1
6f, 3.88004e+11f |
| 8281 path.close(); |
| 8282 path.moveTo(SkBits2Float(0xa5252600), SkBits2Float(0x52b4adad)); // -1.43243e-1
6f, 3.88004e+11f |
| 8283 path.quadTo(SkBits2Float(0x72727270), SkBits2Float(0x52525272), SkBits2Float(0x7
2525252), SkBits2Float(0x72727272)); // 4.80216e+30f, 2.25832e+11f, 4.16585e+30
f, 4.80216e+30f |
| 8284 path.quadTo(SkBits2Float(0x72727255), SkBits2Float(0xda007b72), SkBits2Float(0x2
6525ada), SkBits2Float(0x72ada525)); // 4.80215e+30f, -9.04113e+15f, 7.29815e-1
6f, 6.87879e+30f |
| 8285 path.quadTo(SkBits2Float(0x007b7272), SkBits2Float(0x525adada), SkBits2Float(0x5
2525252), SkBits2Float(0x72727252)); // 1.13368e-38f, 2.34994e+11f, 2.25831e+11
f, 4.80215e+30f |
| 8286 path.quadTo(SkBits2Float(0x52527272), SkBits2Float(0x52525252), SkBits2Float(0x7
2722772), SkBits2Float(0x72727272)); // 2.25966e+11f, 2.25831e+11f, 4.79636e+30
f, 4.80216e+30f |
| 8287 path.quadTo(SkBits2Float(0x74727272), SkBits2Float(0x55747421), SkBits2Float(0x0
000005b), SkBits2Float(0x72727268)); // 7.68345e+31f, 1.67987e+13f, 1.27518e-43
f, 4.80216e+30f |
| 8288 path.quadTo(SkBits2Float(0x52527272), SkBits2Float(0x52525252), SkBits2Float(0x7
2727272), SkBits2Float(0x72557272)); // 2.25966e+11f, 2.25831e+11f, 4.80216e+30
f, 4.22775e+30f |
| 8289 path.quadTo(SkBits2Float(0x5adada72), SkBits2Float(0x52525252), SkBits2Float(0x7
2725252), SkBits2Float(0x72727272)); // 3.08009e+16f, 2.25831e+11f, 4.79967e+30
f, 4.80216e+30f |
| 8290 |
| 8291 SkPath path1(path); |
| 8292 path.reset(); |
| 8293 path.setFillType((SkPath::FillType) 0); |
| 8294 |
| 8295 SkPath path2(path); |
| 8296 testPathOpFuzz(reporter, path1, path2, (SkPathOp) 0, filename); |
| 8297 } |
| 8298 |
8188 static struct TestDesc failTests[] = { | 8299 static struct TestDesc failTests[] = { |
| 8300 TEST(fuzz763_56), |
| 8301 TEST(fuzz763_55), |
| 8302 TEST(fuzz763_54), |
8189 TEST(fuzz763_53), | 8303 TEST(fuzz763_53), |
8190 TEST(fuzz763_52), | 8304 TEST(fuzz763_52), |
8191 TEST(fuzz763_51), | 8305 TEST(fuzz763_51), |
8192 TEST(fuzz763_50), | 8306 TEST(fuzz763_50), |
8193 TEST(fuzz763_49), | 8307 TEST(fuzz763_49), |
8194 TEST(fuzz763_48), | 8308 TEST(fuzz763_48), |
8195 TEST(fuzz763_47), | 8309 TEST(fuzz763_47), |
8196 TEST(fuzz763_46), | 8310 TEST(fuzz763_46), |
8197 TEST(fuzz763_45), | 8311 TEST(fuzz763_45), |
8198 TEST(fuzz763_44), | 8312 TEST(fuzz763_44), |
(...skipping 71 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
8270 } | 8384 } |
8271 | 8385 |
8272 static struct TestDesc repTests[] = { | 8386 static struct TestDesc repTests[] = { |
8273 TEST(fuzz763_5a), | 8387 TEST(fuzz763_5a), |
8274 }; | 8388 }; |
8275 | 8389 |
8276 DEF_TEST(PathOpsRepOp, reporter) { | 8390 DEF_TEST(PathOpsRepOp, reporter) { |
8277 for (int index = 0; index < 1; ++index) | 8391 for (int index = 0; index < 1; ++index) |
8278 RunTestSet(reporter, repTests, SK_ARRAY_COUNT(repTests), nullptr, nullptr, n
ullptr, false); | 8392 RunTestSet(reporter, repTests, SK_ARRAY_COUNT(repTests), nullptr, nullptr, n
ullptr, false); |
8279 } | 8393 } |
OLD | NEW |