[dart/fuzzer] Extend list of forbidden classes/methods

Rationale:
Avoid touching file system or exit codes just to avoid
possible false divergences.

https://github.com/dart-lang/sdk/issues/37632

Change-Id: I603ef19fa2919f0f26839c4f42bfc51a3fb96979
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/111360
Reviewed-by: Felicitas Hetzelt <felih@google.com>
Commit-Queue: Aart Bik <ajcbik@google.com>
This commit is contained in:
Aart Bik 2019-07-30 20:49:56 +00:00 committed by commit-bot@chromium.org
parent 361d27e20b
commit bb34cfeb25
3 changed files with 5 additions and 23 deletions

View file

@ -13,7 +13,7 @@ import 'dartfuzz_api_table.dart';
// Version of DartFuzz. Increase this each time changes are made
// to preserve the property that a given version of DartFuzz yields
// the same fuzzed program for a deterministic random seed.
const String version = '1.15';
const String version = '1.16';
// Restriction on statements and expressions.
const int stmtLength = 2;

View file

@ -46,11 +46,6 @@ class DartLib {
DartLib('endsWith', 'SS'),
DartLib('isEmpty', 'Sv'),
DartLib('isNotEmpty', 'Sv'),
DartLib('FileSystemEntity.identicalSync', 'VSS'),
DartLib('FileSystemEntity.isLinkSync', 'VS'),
DartLib('FileSystemEntity.isFileSync', 'VS'),
DartLib('FileSystemEntity.isDirectorySync', 'VS'),
DartLib('FileSystemEntity.isWatchSupported', 'Vv'),
DartLib('SecurityContext.alpnSupported', 'Vv'),
DartLib('NetworkInterface.listSupported', 'Vv'),
];
@ -158,17 +153,6 @@ class DartLib {
DartLib('ZLibOption.STRATEGY_FIXED', 'Vv'),
DartLib('ZLibOption.strategyDefault', 'Vv'),
DartLib('ZLibOption.STRATEGY_DEFAULT', 'Vv'),
DartLib('FileSystemEvent.create', 'Vv'),
DartLib('FileSystemEvent.CREATE', 'Vv'),
DartLib('FileSystemEvent.modify', 'Vv'),
DartLib('FileSystemEvent.MODIFY', 'Vv'),
DartLib('FileSystemEvent.delete', 'Vv'),
DartLib('FileSystemEvent.DELETE', 'Vv'),
DartLib('FileSystemEvent.move', 'Vv'),
DartLib('FileSystemEvent.MOVE', 'Vv'),
DartLib('FileSystemEvent.all', 'Vv'),
DartLib('FileSystemEvent.ALL', 'Vv'),
DartLib('exitCode', 'Vv'),
DartLib('RawSocketOption.levelSocket', 'Vv'),
DartLib('RawSocketOption.levelIPv4', 'Vv'),
DartLib('RawSocketOption.IPv4MulticastInterface', 'Vv'),
@ -785,7 +769,6 @@ class DartLib {
DartLib('Uri.decodeQueryComponent', 'VS'),
DartLib('Uri.encodeFull', 'VS'),
DartLib('Uri.decodeFull', 'VS'),
DartLib('FileSystemEntity.parentOf', 'VS'),
];
static const listLibs = [
DartLib('List.filled', 'ViI'),

View file

@ -128,7 +128,9 @@ visitCompilationUnit(CompilationUnitElement unit) {
void visitClass(ClassElement classElement) {
// Classes that cause too many false divergences.
if (classElement.name == 'ProcessInfo' || classElement.name == 'Platform') {
if (classElement.name == 'ProcessInfo' ||
classElement.name == 'Platform' ||
classElement.name.startsWith('FileSystem')) {
return;
}
// Every class element contains elements for the members, viz. `methods` visits
@ -253,10 +255,7 @@ void addToTable(String ret, String name, String proto) {
return;
}
// Avoid some obvious false divergences.
if (name == 'pid' ||
name == 'hashCode' ||
name == 'Platform.executable' ||
name == 'Platform.resolvedExecutable') {
if (name == 'pid' || name == 'hashCode' || name == 'exitCode') {
return;
}
// Restrict parameters for a few hardcoded cases,