Skip to content

[cfe] co19/LanguageFeatures/Extension-types/static_analysis_extension_types_A21_t07 crashes CFE #53213

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

Closed
sgrekhov opened this issue Aug 14, 2023 · 1 comment
Labels
cfe-feature-extension-types Implement extension types feature in the CFE crash Process exits with SIGSEGV, SIGABRT, etc. An unhandled exception is not a crash. feature-extension-types Implementation of the extension type feature legacy-area-front-end Legacy: Use area-dart-model instead.

Comments

@sgrekhov
Copy link
Contributor

Test https://github.com/dart-lang/co19/blob/master/LanguageFeatures/Extension-types/static_analysis_extension_types_A21_t07.dart crashes CFE
Log

/========================================================================================================================\
| co19/LanguageFeatures/Extension-types/static_analysis_extension_types_A21_t07 is new and failed (Crash, expected Pass) |
\========================================================================================================================/

--- Command "fasta" (took 89ms):
(cd /b/s/w/ir/cache/builder/sdk/ ; DART_CONFIGURATION=ReleaseX64 ./out/ReleaseX64/dart ./pkg/front_end/tool/_fasta/compile.dart --verify --skip-platform-verification -o ./out/ReleaseX64/generated_compilations/cfe-strong-linux/tests_co19_src_LanguageFeatures_Extension-types_static_analysis_extension_types_A21_t07/out.dill --platform ./out/ReleaseX64/vm_platform_strong.dill -Dtest_runner.configuration=cfe-strong-linux --enable-experiment=inline-class --nnbd-strong --packages=./.dart_tool/package_config.json ./tests/co19/src/LanguageFeatures/Extension-types/static_analysis_extension_types_A21_t07.dart )

exit code:
253

stdout:
tests/co19/src/LanguageFeatures/Extension-types/static_analysis_extension_types_A21_t07.dart:25:3: Error: 'ET1' is already declared in this scope.
  ET1.new(this.id);
  ^^^
tests/co19/src/LanguageFeatures/Extension-types/static_analysis_extension_types_A21_t07.dart:24:19: Context: Previous declaration of 'ET1'.
extension type ET1(int id) {
                  ^^^
tests/co19/src/LanguageFeatures/Extension-types/static_analysis_extension_types_A21_t07.dart:32:3: Error: 'ET2' is already declared in this scope.
  ET2(this.id);
  ^^^
tests/co19/src/LanguageFeatures/Extension-types/static_analysis_extension_types_A21_t07.dart:31:22: Context: Previous declaration of 'ET2'.
extension type ET2<T>(T id) {
                     ^^^
tests/co19/src/LanguageFeatures/Extension-types/static_analysis_extension_types_A21_t07.dart:39:3: Error: 'ET3' is already declared in this scope.
  ET3(this.id);
  ^^^
tests/co19/src/LanguageFeatures/Extension-types/static_analysis_extension_types_A21_t07.dart:38:20: Context: Previous declaration of 'ET3'.
extension type ET3.new(int id) {
                   ^^^
tests/co19/src/LanguageFeatures/Extension-types/static_analysis_extension_types_A21_t07.dart:46:3: Error: 'ET4' is already declared in this scope.
  ET4.new(this.id);
  ^^^
tests/co19/src/LanguageFeatures/Extension-types/static_analysis_extension_types_A21_t07.dart:45:23: Context: Previous declaration of 'ET4'.
extension type ET4<T>.new(T id) {
                      ^^^
tests/co19/src/LanguageFeatures/Extension-types/static_analysis_extension_types_A21_t07.dart:53:3: Error: 'ET5.n' is already declared in this scope.
  ET5.n(this.id);
  ^^^^^
tests/co19/src/LanguageFeatures/Extension-types/static_analysis_extension_types_A21_t07.dart:52:20: Context: Previous declaration of 'ET5.n'.
extension type ET5.n(int id) {
                   ^^^^^

stderr:
Unhandled exception:
  Crash when compiling file:///b/s/w/ir/cache/builder/sdk/tests/co19/src/LanguageFeatures/Extension-types/static_analysis_extension_types_A21_t07.dart at character offset 1481:
'package:front_end/src/fasta/source/source_function_builder.dart': Failed assertion: line 287 pos 14: 'false': identifier(id) not found in [FormalParameterBuilder(id)]

#0      _AssertionError._doThrowNew (dart:core-patch/errors_patch.dart:51:61)
#1      _AssertionError._throwNew (dart:core-patch/errors_patch.dart:40:5)
#2      SourceFunctionBuilderImpl.getFormal (package:front_end/src/fasta/source/source_function_builder.dart:287:14)
#3      _FunctionBodyBuilderContextMixin.getFormalParameterByName (package:front_end/src/fasta/kernel/body_builder_context.dart:628:20)
#4      BodyBuilder.endFormalParameter (package:front_end/src/fasta/kernel/body_builder.dart:5344:28)
#5      Parser.parseFormalParameter (package:_fe_analyzer_shared/src/parser/parser_impl.dart:2149:14)
#6      Parser.parseFormalParametersRest (package:_fe_analyzer_shared/src/parser/parser_impl.dart:1793:15)
#7      Parser.parseFormalParameters (package:_fe_analyzer_shared/src/parser/parser_impl.dart:1757:12)
#8      Parser.parseFormalParametersOpt (package:_fe_analyzer_shared/src/parser/parser_impl.dart:1558:15)
#9      DietListener.buildPrimaryConstructor (package:front_end/src/fasta/source/diet_listener.dart:1167:22)
#10     DietListener.endPrimaryConstructor (package:front_end/src/fasta/source/diet_listener.dart:1042:5)
#11     Parser.parseExtensionTypeDeclarationRest (package:_fe_analyzer_shared/src/parser/parser_impl.dart:3117:14)
#12     Parser.parseExtension (package:_fe_analyzer_shared/src/parser/parser_impl.dart:3036:16)
#13     Parser.parseTopLevelKeywordDeclaration (package:_fe_analyzer_shared/src/parser/parser_impl.dart:769:18)
#14     Parser.parseTopLevelDeclarationImpl (package:_fe_analyzer_shared/src/parser/parser_impl.dart:531:14)
#15     Parser.parseUnit (package:_fe_analyzer_shared/src/parser/parser_impl.dart:411:15)
#16     SourceLoader.buildBody (package:front_end/src/fasta/source/source_loader.dart:1248:12)
<asynchronous suspension>
#17     SourceLoader.buildBodies (package:front_end/src/fasta/source/source_loader.dart:670:7)
<asynchronous suspension>
#18     KernelTarget.buildComponent.<anonymous closure> (package:front_end/src/fasta/kernel/kernel_target.dart:595:7)
<asynchronous suspension>
#19     withCrashReporting (package:front_end/src/fasta/crash.dart:133:12)
<asynchronous suspension>
#20     KernelTarget.buildComponent (package:front_end/src/fasta/kernel/kernel_target.dart:576:12)
<asynchronous suspension>
#21     CompileTask.compile (file:///b/s/w/ir/cache/builder/sdk/pkg/front_end/tool/_fasta/entry_points.dart:436:19)
<asynchronous suspension>
#22     BatchCompiler.batchCompileImpl (file:///b/s/w/ir/cache/builder/sdk/pkg/front_end/tool/_fasta/entry_points.dart:221:5)
<asynchronous suspension>
#23     CompilerContext.clear (package:front_end/src/fasta/compiler_context.dart:139:3)
<asynchronous suspension>
#24     runProtectedFromAbort (file:///b/s/w/ir/cache/builder/sdk/pkg/front_end/tool/_fasta/command_line.dart:416:12)
<asynchronous suspension>
#25     BatchCompiler.run (file:///b/s/w/ir/cache/builder/sdk/pkg/front_end/tool/_fasta/entry_points.dart:173:13)
<asynchronous suspension>

--- Re-run this test:
python3 tools/test.py -n cfe-strong-linux co19/LanguageFeatures/Extension-types/static_analysis_extension_types_A21_t07
@sgrekhov sgrekhov added legacy-area-front-end Legacy: Use area-dart-model instead. crash Process exits with SIGSEGV, SIGABRT, etc. An unhandled exception is not a crash. labels Aug 14, 2023
@johnniwinther johnniwinther added the feature-extension-types Implementation of the extension type feature label Oct 3, 2023
@johnniwinther johnniwinther added the cfe-feature-extension-types Implement extension types feature in the CFE label Oct 13, 2023
@chloestefantsova
Copy link
Contributor

This appears to be fixed at the top of the branch. Please reopen if needed.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
cfe-feature-extension-types Implement extension types feature in the CFE crash Process exits with SIGSEGV, SIGABRT, etc. An unhandled exception is not a crash. feature-extension-types Implementation of the extension type feature legacy-area-front-end Legacy: Use area-dart-model instead.
Projects
None yet
Development

No branches or pull requests

3 participants