Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

kernel/CFE crash: RangeError in Class.superclassConstraints #46161

Open
jensjoha opened this issue May 27, 2021 · 0 comments
Open

kernel/CFE crash: RangeError in Class.superclassConstraints #46161

jensjoha opened this issue May 27, 2021 · 0 comments
Labels
area-front-end Use area-front-end for front end / CFE / kernel format related issues.

Comments

@jensjoha
Copy link
Contributor

Crash when compiling null,
at character offset null:
RangeError (index): Invalid value: Valid value range is empty: 1
#0      List.[] (dart:core-patch/growable_array.dart:254:60)
#1      Class.superclassConstraints (package:kernel/ast.dart:1090:73)
#2      ClassBuilderImpl.checkMixinApplication (package:front_end/src/fasta/builder/class_builder.dart:801:51)
#3      SourceLoader.checkMixins (package:front_end/src/fasta/source/source_loader.dart:1165:19)
#4      KernelTarget.buildOutlines.<anonymous closure> (package:front_end/src/fasta/kernel/kernel_target.dart:339:14)
<asynchronous suspension>
#5      withCrashReporting (package:front_end/src/fasta/crash.dart:121:12)
<asynchronous suspension>
#6      Outline.run.<anonymous closure> (file:///usr/local/google/home/jensj/code/dart-sdk/sdk/pkg/front_end/test/fasta/testing/suite.dart:1850:21)
<asynchronous suspension>
#7      Outline.run (file:///usr/local/google/home/jensj/code/dart-sdk/sdk/pkg/front_end/test/fasta/testing/suite.dart:1837:12)
<asynchronous suspension>
#8      ChainContext.run.doStep.<anonymous closure> (package:testing/src/chain.dart:188:22)
<asynchronous suspension>

or with assertions enabled:

'package:kernel/ast.dart': Failed assertion: line 1087 pos 14: 'currentClass.implementedTypes.length == 2': is not true.
#0      _AssertionError._doThrowNew (dart:core-patch/errors_patch.dart:46:39)
#1      _AssertionError._throwNew (dart:core-patch/errors_patch.dart:36:5)
#2      Class.superclassConstraints (package:kernel/ast.dart:1087:14)
#3      ClassBuilderImpl.checkMixinApplication (package:front_end/src/fasta/builder/class_builder.dart:801:51)
#4      SourceLoader.checkMixins (package:front_end/src/fasta/source/source_loader.dart:1165:19)
#5      KernelTarget.buildOutlines.<anonymous closure> (package:front_end/src/fasta/kernel/kernel_target.dart:339:14)
<asynchronous suspension>
#6      withCrashReporting (package:front_end/src/fasta/crash.dart:121:12)
<asynchronous suspension>
#7      Outline.run.<anonymous closure> (file:///usr/local/google/home/jensj/code/dart-sdk/sdk/pkg/front_end/test/fasta/testing/suite.dart:1850:21)
<asynchronous suspension>
#8      Outline.run (file:///usr/local/google/home/jensj/code/dart-sdk/sdk/pkg/front_end/test/fasta/testing/suite.dart:1837:12)
<asynchronous suspension>
#9      ChainContext.run.doStep.<anonymous closure> (package:testing/src/chain.dart:188:22)
<asynchronous suspension>

Reproduction at https://dart-review.googlesource.com/c/sdk/+/201562

/cc @johnniwinther

@jensjoha jensjoha added the area-front-end Use area-front-end for front end / CFE / kernel format related issues. label May 27, 2021
dart-bot pushed a commit that referenced this issue May 27, 2021
```
Crash when compiling null,
at character offset null:
RangeError (index): Invalid value: Valid value range is empty: 1
#0      List.[] (dart:core-patch/growable_array.dart:254:60)
#1      Class.superclassConstraints (package:kernel/ast.dart:1090:73)
#2      ClassBuilderImpl.checkMixinApplication (package:front_end/src/fasta/builder/class_builder.dart:801:51)
#3      SourceLoader.checkMixins (package:front_end/src/fasta/source/source_loader.dart:1165:19)
#4      KernelTarget.buildOutlines.<anonymous closure> (package:front_end/src/fasta/kernel/kernel_target.dart:339:14)
<asynchronous suspension>
#5      withCrashReporting (package:front_end/src/fasta/crash.dart:121:12)
<asynchronous suspension>
#6      Outline.run.<anonymous closure> (file:///usr/local/google/home/jensj/code/dart-sdk/sdk/pkg/front_end/test/fasta/testing/suite.dart:1850:21)
<asynchronous suspension>
#7      Outline.run (file:///usr/local/google/home/jensj/code/dart-sdk/sdk/pkg/front_end/test/fasta/testing/suite.dart:1837:12)
<asynchronous suspension>
#8      ChainContext.run.doStep.<anonymous closure> (package:testing/src/chain.dart:188:22)
<asynchronous suspension>
```

or with assertions enabled:

```
'package:kernel/ast.dart': Failed assertion: line 1087 pos 14: 'currentClass.implementedTypes.length == 2': is not true.
#0      _AssertionError._doThrowNew (dart:core-patch/errors_patch.dart:46:39)
#1      _AssertionError._throwNew (dart:core-patch/errors_patch.dart:36:5)
#2      Class.superclassConstraints (package:kernel/ast.dart:1087:14)
#3      ClassBuilderImpl.checkMixinApplication (package:front_end/src/fasta/builder/class_builder.dart:801:51)
#4      SourceLoader.checkMixins (package:front_end/src/fasta/source/source_loader.dart:1165:19)
#5      KernelTarget.buildOutlines.<anonymous closure> (package:front_end/src/fasta/kernel/kernel_target.dart:339:14)
<asynchronous suspension>
#6      withCrashReporting (package:front_end/src/fasta/crash.dart:121:12)
<asynchronous suspension>
#7      Outline.run.<anonymous closure> (file:///usr/local/google/home/jensj/code/dart-sdk/sdk/pkg/front_end/test/fasta/testing/suite.dart:1850:21)
<asynchronous suspension>
#8      Outline.run (file:///usr/local/google/home/jensj/code/dart-sdk/sdk/pkg/front_end/test/fasta/testing/suite.dart:1837:12)
<asynchronous suspension>
#9      ChainContext.run.doStep.<anonymous closure> (package:testing/src/chain.dart:188:22)
<asynchronous suspension>
```

Bug: #46161

Change-Id: I452729ae4b3d0a14528ea2dda51de14185bb965b
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/201562
Reviewed-by: Johnni Winther <johnniwinther@google.com>
Commit-Queue: Jens Johansen <jensj@google.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area-front-end Use area-front-end for front end / CFE / kernel format related issues.
Projects
None yet
Development

No branches or pull requests

1 participant