Skip to content

Commit

Permalink
[dartfuzz] Fix infinite recursion in call methods
Browse files Browse the repository at this point in the history
Change-Id: Ia9add544bdb12fa806dbcfcedf41ccf023d48fa3
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/127204
Commit-Queue: Fizaa Luthra <fizaaluthra@google.com>
Reviewed-by: Ben Konyi <bkonyi@google.com>
  • Loading branch information
Fizaa Luthra authored and commit-bot@chromium.org committed Dec 5, 2019
1 parent 6dc48ab commit b8dbaaa
Showing 1 changed file with 2 additions and 6 deletions.
8 changes: 2 additions & 6 deletions runtime/tools/dartfuzz/dartfuzz.dart
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ import 'dartfuzz_type_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.74';
const String version = '1.75';

// Restriction on statements and expressions.
const int stmtDepth = 1;
Expand Down Expand Up @@ -167,11 +167,7 @@ class CallMethod extends Method {
String emitCall(int depth,
{RhsFilter rhsFilter, bool includeSemicolon = false}) {
String outputName;
if (fuzzer.currentClass == null) {
outputName = "${className}()";
} else {
outputName = fuzzer.coinFlip() ? name : "this";
}
outputName = "${className}()";
fuzzer.emitLn(outputName, newline: false);
fuzzer.emitExprList(depth + 1, parameters, rhsFilter: rhsFilter);
if (includeSemicolon) {
Expand Down

0 comments on commit b8dbaaa

Please sign in to comment.