-
Notifications
You must be signed in to change notification settings - Fork 1.6k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[CFE] Reproduction & fix of crashes found by weekly bot (#83)
Calling "SpecialCasedBinaryOperator" and "SpecialCasedTernaryOperator" with wrong number of parameters (especially too few) would not go well. It's now checked and goes a lot better. Change-Id: Id9606db869f020bbd7264686adaf9521bd263fb9 Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/237900 Reviewed-by: Johnni Winther <johnniwinther@google.com> Commit-Queue: Jens Johansen <jensj@google.com>
- Loading branch information
Showing
24 changed files
with
275 additions
and
14 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
9 changes: 9 additions & 0 deletions
9
pkg/front_end/testcases/expression/weekly_bot_run_83_crash.expression.yaml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
# Copyright (c) 2022, the Dart project authors. Please see the AUTHORS file | ||
# for details. All rights reserved. Use of this source code is governed by a | ||
# BSD-style license that can be found in the LICENSE file. | ||
|
||
sources: "" | ||
definitions: [] | ||
position: "dart:core#double" | ||
expression: | | ||
remainder() |
7 changes: 7 additions & 0 deletions
7
pkg/front_end/testcases/expression/weekly_bot_run_83_crash.expression.yaml.expect
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
Errors: { | ||
org-dartlang-debug:synthetic_debug_expression:1:10: Error: Too few positional arguments: 1 required, 0 given. | ||
remainder() | ||
^ | ||
} | ||
method /* from org-dartlang-debug:synthetic_debug_expression */ debugExpr() → dynamic | ||
return invalid-expression "org-dartlang-debug:synthetic_debug_expression:1:10: Error: Too few positional arguments: 1 required, 0 given.\nremainder()\n ^" in this.{dart.core::double::remainder}{<inapplicable>}.(){() → invalid-type}; |
9 changes: 9 additions & 0 deletions
9
pkg/front_end/testcases/expression/weekly_bot_run_83_crash_2.expression.yaml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
# Copyright (c) 2022, the Dart project authors. Please see the AUTHORS file | ||
# for details. All rights reserved. Use of this source code is governed by a | ||
# BSD-style license that can be found in the LICENSE file. | ||
|
||
sources: "" | ||
definitions: [] | ||
position: "dart:core#double" | ||
expression: | | ||
clamp() |
7 changes: 7 additions & 0 deletions
7
pkg/front_end/testcases/expression/weekly_bot_run_83_crash_2.expression.yaml.expect
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
Errors: { | ||
org-dartlang-debug:synthetic_debug_expression:1:6: Error: Too few positional arguments: 2 required, 0 given. | ||
clamp() | ||
^ | ||
} | ||
method /* from org-dartlang-debug:synthetic_debug_expression */ debugExpr() → dynamic | ||
return invalid-expression "org-dartlang-debug:synthetic_debug_expression:1:6: Error: Too few positional arguments: 2 required, 0 given.\nclamp()\n ^" in this.{dart.core::num::clamp}{<inapplicable>}.(){() → invalid-type}; |
9 changes: 9 additions & 0 deletions
9
pkg/front_end/testcases/expression/weekly_bot_run_83_crash_2_prime.expression.yaml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
# Copyright (c) 2022, the Dart project authors. Please see the AUTHORS file | ||
# for details. All rights reserved. Use of this source code is governed by a | ||
# BSD-style license that can be found in the LICENSE file. | ||
|
||
sources: "" | ||
definitions: [] | ||
position: "dart:core#double" | ||
expression: | | ||
clamp(42, 42) |
4 changes: 4 additions & 0 deletions
4
pkg/front_end/testcases/expression/weekly_bot_run_83_crash_2_prime.expression.yaml.expect
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
Errors: { | ||
} | ||
method /* from org-dartlang-debug:synthetic_debug_expression */ debugExpr() → dynamic | ||
return this.{dart.core::num::clamp}(42, 42){(dart.core::num, dart.core::num) → dart.core::num}; |
9 changes: 9 additions & 0 deletions
9
pkg/front_end/testcases/expression/weekly_bot_run_83_crash_prime.expression.yaml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
# Copyright (c) 2022, the Dart project authors. Please see the AUTHORS file | ||
# for details. All rights reserved. Use of this source code is governed by a | ||
# BSD-style license that can be found in the LICENSE file. | ||
|
||
sources: "" | ||
definitions: [] | ||
position: "dart:core#double" | ||
expression: | | ||
remainder(42) |
4 changes: 4 additions & 0 deletions
4
pkg/front_end/testcases/expression/weekly_bot_run_83_crash_prime.expression.yaml.expect
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
Errors: { | ||
} | ||
method /* from org-dartlang-debug:synthetic_debug_expression */ debugExpr() → dynamic | ||
return this.{dart.core::double::remainder}(42){(dart.core::num) → dart.core::double}; |
10 changes: 10 additions & 0 deletions
10
pkg/front_end/testcases/general/error_recovery/weekly_bot_83_failure.dart
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
main2() { | ||
double x = 42; | ||
x.remainder(); | ||
} | ||
|
||
main(List<String> args) { | ||
if (args.length == 42) { | ||
main2(); | ||
} | ||
} |
2 changes: 2 additions & 0 deletions
2
...nt_end/testcases/general/error_recovery/weekly_bot_83_failure.dart.textual_outline.expect
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
main2() {} | ||
main(List<String> args) {} |
2 changes: 2 additions & 0 deletions
2
...stcases/general/error_recovery/weekly_bot_83_failure.dart.textual_outline_modelled.expect
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
main(List<String> args) {} | ||
main2() {} |
22 changes: 22 additions & 0 deletions
22
pkg/front_end/testcases/general/error_recovery/weekly_bot_83_failure.dart.weak.expect
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
library /*isNonNullableByDefault*/; | ||
// | ||
// Problems in library: | ||
// | ||
// pkg/front_end/testcases/general/error_recovery/weekly_bot_83_failure.dart:3:14: Error: Too few positional arguments: 1 required, 0 given. | ||
// x.remainder(); | ||
// ^ | ||
// | ||
import self as self; | ||
import "dart:core" as core; | ||
|
||
static method main2() → dynamic { | ||
core::double x = 42.0; | ||
invalid-expression "pkg/front_end/testcases/general/error_recovery/weekly_bot_83_failure.dart:3:14: Error: Too few positional arguments: 1 required, 0 given. | ||
x.remainder(); | ||
^" in x.{core::double::remainder}{<inapplicable>}.(){() → invalid-type}; | ||
} | ||
static method main(core::List<core::String> args) → dynamic { | ||
if(args.{core::List::length}{core::int} =={core::num::==}{(core::Object) → core::bool} 42) { | ||
self::main2(); | ||
} | ||
} |
22 changes: 22 additions & 0 deletions
22
...front_end/testcases/general/error_recovery/weekly_bot_83_failure.dart.weak.modular.expect
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
library /*isNonNullableByDefault*/; | ||
// | ||
// Problems in library: | ||
// | ||
// pkg/front_end/testcases/general/error_recovery/weekly_bot_83_failure.dart:3:14: Error: Too few positional arguments: 1 required, 0 given. | ||
// x.remainder(); | ||
// ^ | ||
// | ||
import self as self; | ||
import "dart:core" as core; | ||
|
||
static method main2() → dynamic { | ||
core::double x = 42.0; | ||
invalid-expression "pkg/front_end/testcases/general/error_recovery/weekly_bot_83_failure.dart:3:14: Error: Too few positional arguments: 1 required, 0 given. | ||
x.remainder(); | ||
^" in x.{core::double::remainder}{<inapplicable>}.(){() → invalid-type}; | ||
} | ||
static method main(core::List<core::String> args) → dynamic { | ||
if(args.{core::List::length}{core::int} =={core::num::==}{(core::Object) → core::bool} 42) { | ||
self::main2(); | ||
} | ||
} |
8 changes: 8 additions & 0 deletions
8
...front_end/testcases/general/error_recovery/weekly_bot_83_failure.dart.weak.outline.expect
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
library /*isNonNullableByDefault*/; | ||
import self as self; | ||
import "dart:core" as core; | ||
|
||
static method main2() → dynamic | ||
; | ||
static method main(core::List<core::String> args) → dynamic | ||
; |
22 changes: 22 additions & 0 deletions
22
...t_end/testcases/general/error_recovery/weekly_bot_83_failure.dart.weak.transformed.expect
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
library /*isNonNullableByDefault*/; | ||
// | ||
// Problems in library: | ||
// | ||
// pkg/front_end/testcases/general/error_recovery/weekly_bot_83_failure.dart:3:14: Error: Too few positional arguments: 1 required, 0 given. | ||
// x.remainder(); | ||
// ^ | ||
// | ||
import self as self; | ||
import "dart:core" as core; | ||
|
||
static method main2() → dynamic { | ||
core::double x = 42.0; | ||
invalid-expression "pkg/front_end/testcases/general/error_recovery/weekly_bot_83_failure.dart:3:14: Error: Too few positional arguments: 1 required, 0 given. | ||
x.remainder(); | ||
^" in x.{core::double::remainder}{<inapplicable>}.(){() → invalid-type}; | ||
} | ||
static method main(core::List<core::String> args) → dynamic { | ||
if(args.{core::List::length}{core::int} =={core::num::==}{(core::Object) → core::bool} 42) { | ||
self::main2(); | ||
} | ||
} |
10 changes: 10 additions & 0 deletions
10
pkg/front_end/testcases/general/error_recovery/weekly_bot_83_failure_2.dart
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
main2() { | ||
double x = 42; | ||
x.clamp(); | ||
} | ||
|
||
main(List<String> args) { | ||
if (args.length == 42) { | ||
main2(); | ||
} | ||
} |
2 changes: 2 additions & 0 deletions
2
..._end/testcases/general/error_recovery/weekly_bot_83_failure_2.dart.textual_outline.expect
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
main2() {} | ||
main(List<String> args) {} |
2 changes: 2 additions & 0 deletions
2
...cases/general/error_recovery/weekly_bot_83_failure_2.dart.textual_outline_modelled.expect
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
main(List<String> args) {} | ||
main2() {} |
22 changes: 22 additions & 0 deletions
22
pkg/front_end/testcases/general/error_recovery/weekly_bot_83_failure_2.dart.weak.expect
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
library /*isNonNullableByDefault*/; | ||
// | ||
// Problems in library: | ||
// | ||
// pkg/front_end/testcases/general/error_recovery/weekly_bot_83_failure_2.dart:3:10: Error: Too few positional arguments: 2 required, 0 given. | ||
// x.clamp(); | ||
// ^ | ||
// | ||
import self as self; | ||
import "dart:core" as core; | ||
|
||
static method main2() → dynamic { | ||
core::double x = 42.0; | ||
invalid-expression "pkg/front_end/testcases/general/error_recovery/weekly_bot_83_failure_2.dart:3:10: Error: Too few positional arguments: 2 required, 0 given. | ||
x.clamp(); | ||
^" in x.{core::num::clamp}{<inapplicable>}.(){() → invalid-type}; | ||
} | ||
static method main(core::List<core::String> args) → dynamic { | ||
if(args.{core::List::length}{core::int} =={core::num::==}{(core::Object) → core::bool} 42) { | ||
self::main2(); | ||
} | ||
} |
22 changes: 22 additions & 0 deletions
22
...ont_end/testcases/general/error_recovery/weekly_bot_83_failure_2.dart.weak.modular.expect
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
library /*isNonNullableByDefault*/; | ||
// | ||
// Problems in library: | ||
// | ||
// pkg/front_end/testcases/general/error_recovery/weekly_bot_83_failure_2.dart:3:10: Error: Too few positional arguments: 2 required, 0 given. | ||
// x.clamp(); | ||
// ^ | ||
// | ||
import self as self; | ||
import "dart:core" as core; | ||
|
||
static method main2() → dynamic { | ||
core::double x = 42.0; | ||
invalid-expression "pkg/front_end/testcases/general/error_recovery/weekly_bot_83_failure_2.dart:3:10: Error: Too few positional arguments: 2 required, 0 given. | ||
x.clamp(); | ||
^" in x.{core::num::clamp}{<inapplicable>}.(){() → invalid-type}; | ||
} | ||
static method main(core::List<core::String> args) → dynamic { | ||
if(args.{core::List::length}{core::int} =={core::num::==}{(core::Object) → core::bool} 42) { | ||
self::main2(); | ||
} | ||
} |
8 changes: 8 additions & 0 deletions
8
...ont_end/testcases/general/error_recovery/weekly_bot_83_failure_2.dart.weak.outline.expect
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
library /*isNonNullableByDefault*/; | ||
import self as self; | ||
import "dart:core" as core; | ||
|
||
static method main2() → dynamic | ||
; | ||
static method main(core::List<core::String> args) → dynamic | ||
; |
22 changes: 22 additions & 0 deletions
22
...end/testcases/general/error_recovery/weekly_bot_83_failure_2.dart.weak.transformed.expect
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
library /*isNonNullableByDefault*/; | ||
// | ||
// Problems in library: | ||
// | ||
// pkg/front_end/testcases/general/error_recovery/weekly_bot_83_failure_2.dart:3:10: Error: Too few positional arguments: 2 required, 0 given. | ||
// x.clamp(); | ||
// ^ | ||
// | ||
import self as self; | ||
import "dart:core" as core; | ||
|
||
static method main2() → dynamic { | ||
core::double x = 42.0; | ||
invalid-expression "pkg/front_end/testcases/general/error_recovery/weekly_bot_83_failure_2.dart:3:10: Error: Too few positional arguments: 2 required, 0 given. | ||
x.clamp(); | ||
^" in x.{core::num::clamp}{<inapplicable>}.(){() → invalid-type}; | ||
} | ||
static method main(core::List<core::String> args) → dynamic { | ||
if(args.{core::List::length}{core::int} =={core::num::==}{(core::Object) → core::bool} 42) { | ||
self::main2(); | ||
} | ||
} |