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

Side by Side Diff: tests/lib/mirrors/invocation_fuzz_test.dart

Issue 2687883002: Do not invoke fatal in dart:_internal when fuzzing mirrors (Closed)
Patch Set: Created 3 years, 10 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 | « no previous file | 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 // Copyright (c) 2014, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2014, the Dart project authors. Please see the AUTHORS file
2 // for details. All rights reserved. Use of this source code is governed by a 2 // for details. All rights reserved. Use of this source code is governed by a
3 // BSD-style license that can be found in the LICENSE file. 3 // BSD-style license that can be found in the LICENSE file.
4 4
5 // This test reflectively enumerates all the methods in the system and tries to 5 // This test reflectively enumerates all the methods in the system and tries to
6 // invoke them with various basic values (nulls, ints, etc). This may result in 6 // invoke them with various basic values (nulls, ints, etc). This may result in
7 // Dart exceptions or hangs, but should never result in crashes or JavaScript 7 // Dart exceptions or hangs, but should never result in crashes or JavaScript
8 // exceptions. 8 // exceptions.
9 9
10 library test.invoke_natives; 10 library test.invoke_natives;
(...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after
43 43
44 // These construct an object with an uninitialized native field. 44 // These construct an object with an uninitialized native field.
45 // TODO(23869): We could make this safer, but making the failure non-fatal 45 // TODO(23869): We could make this safer, but making the failure non-fatal
46 // would we worthless aside from this test. 46 // would we worthless aside from this test.
47 'dart.io.X509Certificate.X509Certificate._', 47 'dart.io.X509Certificate.X509Certificate._',
48 'dart.io._X509Impl._X509Impl', 48 'dart.io._X509Impl._X509Impl',
49 49
50 // Don't call private methods in dart.async as they may circumvent the zoned 50 // Don't call private methods in dart.async as they may circumvent the zoned
51 // error handling below. 51 // error handling below.
52 new RegExp(r"^dart\.async\._.*$"), 52 new RegExp(r"^dart\.async\._.*$"),
53
54 'dart._internal.fatal',
53 ]; 55 ];
54 56
55 bool isBlacklisted(Symbol qualifiedSymbol) { 57 bool isBlacklisted(Symbol qualifiedSymbol) {
56 var qualifiedString = MirrorSystem.getName(qualifiedSymbol); 58 var qualifiedString = MirrorSystem.getName(qualifiedSymbol);
57 for (var pattern in blacklist) { 59 for (var pattern in blacklist) {
58 if (qualifiedString.contains(pattern)) { 60 if (qualifiedString.contains(pattern)) {
59 print('Skipping $qualifiedString'); 61 print('Skipping $qualifiedString');
60 return true; 62 return true;
61 } 63 }
62 } 64 }
(...skipping 115 matching lines...) Expand 10 before | Expand all | Expand 10 after
178 0, 0xEFFFFFF, 0xFFFFFFFF, 0xFFFFFFFFFFFFFFFF, 3.14159, 180 0, 0xEFFFFFF, 0xFFFFFFFF, 0xFFFFFFFFFFFFFFFF, 3.14159,
179 "foo", 'blåbærgrød', 'Îñţérñåţîöñåļîžåţîờñ', "\u{1D11E}", #symbol]; 181 "foo", 'blåbærgrød', 'Îñţérñåţîöñåļîžåţîờñ', "\u{1D11E}", #symbol];
180 valueObjects.forEach((v) => checkInstance(reflect(v), 'value object')); 182 valueObjects.forEach((v) => checkInstance(reflect(v), 'value object'));
181 183
182 uncaughtErrorHandler(self, parent, zone, error, stack) {}; 184 uncaughtErrorHandler(self, parent, zone, error, stack) {};
183 var zoneSpec = 185 var zoneSpec =
184 new ZoneSpecification(handleUncaughtError: uncaughtErrorHandler); 186 new ZoneSpecification(handleUncaughtError: uncaughtErrorHandler);
185 testZone = Zone.current.fork(specification: zoneSpec); 187 testZone = Zone.current.fork(specification: zoneSpec);
186 testZone.createTimer(Duration.ZERO, doOneTask); 188 testZone.createTimer(Duration.ZERO, doOneTask);
187 } 189 }
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698