Skip to content

[CFE] co19/LanguageFeatures/Extension-types/dynamic_semantics_extension_type_A05_t02 crashes compiler #53238

@sgrekhov

Description

@sgrekhov

Test https://github.com/dart-lang/co19/blob/master/LanguageFeatures/Extension-types/dynamic_semantics_extension_type_A05_t02.dart crashes the compiler
Log

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

--- Command "fasta" (took 45ms):
(cd /b/s/w/ir/ ; 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_dynamic_semantics_extension_type_A05_t02/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/dynamic_semantics_extension_type_A05_t02.dart )

exit code:
253

stderr:
Unhandled exception:
  Crash when compiling file:///b/s/w/ir/tests/co19/src/LanguageFeatures/Extension-types/dynamic_semantics_extension_type_A05_t02.dart at character offset 1287:
'package:_fe_analyzer_shared/src/type_inference/assigned_variables.dart': Failed assertion: line 184 pos 14: 'undeclaredReads.isEmpty': Variables read from but not declared: {VariableDeclarationImpl(final V1 #this)}

#0      _AssertionError._doThrowNew (dart:core-patch/errors_patch.dart:51:61)
#1      _AssertionError._throwNew (dart:core-patch/errors_patch.dart:40:5)
#2      AssignedVariables.finish.<anonymous closure> (package:_fe_analyzer_shared/src/type_inference/assigned_variables.dart:184:14)
#3      AssignedVariables.finish (package:_fe_analyzer_shared/src/type_inference/assigned_variables.dart:195:6)
#4      BodyBuilder.finishFunction (package:front_end/src/fasta/kernel/body_builder.dart:1199:36)
#5      DietListener.buildFunctionBody (package:front_end/src/fasta/source/diet_listener.dart:1217:19)
#6      DietListener._endClassMethod (package:front_end/src/fasta/source/diet_listener.dart:772:5)
#7      DietListener.endClassConstructor (package:front_end/src/fasta/source/diet_listener.dart:713:5)
#8      Listener.endExtensionTypeConstructor (package:_fe_analyzer_shared/src/parser/listener.dart:1277:5)
#9      Parser.parseMethod (package:_fe_analyzer_shared/src/parser/parser_impl.dart:4896:20)
#10     Parser.parseClassOrMixinOrExtensionOrEnumMemberImpl (package:_fe_analyzer_shared/src/parser/parser_impl.dart:4630:15)
#11     Parser.parseClassOrMixinOrExtensionBody (package:_fe_analyzer_shared/src/parser/parser_impl.dart:4247:15)
#12     Parser.parseExtensionTypeDeclarationRest (package:_fe_analyzer_shared/src/parser/parser_impl.dart:3120:13)
#13     Parser.parseExtension (package:_fe_analyzer_shared/src/parser/parser_impl.dart:3036:16)
#14     Parser.parseTopLevelKeywordDeclaration (package:_fe_analyzer_shared/src/parser/parser_impl.dart:769:18)
#15     Parser.parseTopLevelDeclarationImpl (package:_fe_analyzer_shared/src/parser/parser_impl.dart:531:14)
#16     Parser.parseUnit (package:_fe_analyzer_shared/src/parser/parser_impl.dart:411:15)
#17     SourceLoader.buildBody (package:front_end/src/fasta/source/source_loader.dart:1248:12)
<asynchronous suspension>
#18     SourceLoader.buildBodies (package:front_end/src/fasta/source/source_loader.dart:670:7)
<asynchronous suspension>
#19     KernelTarget.buildComponent.<anonymous closure> (package:front_end/src/fasta/kernel/kernel_target.dart:595:7)
<asynchronous suspension>
#20     withCrashReporting (package:front_end/src/fasta/crash.dart:133:12)
<asynchronous suspension>
#21     KernelTarget.buildComponent (package:front_end/src/fasta/kernel/kernel_target.dart:576:12)
<asynchronous suspension>
#22     CompileTask.compile (file:///b/s/w/ir/pkg/front_end/tool/_fasta/entry_points.dart:436:19)
<asynchronous suspension>
#23     BatchCompiler.batchCompileImpl (file:///b/s/w/ir/pkg/front_end/tool/_fasta/entry_points.dart:221:5)
<asynchronous suspension>
#24     CompilerContext.clear (package:front_end/src/fasta/compiler_context.dart:139:3)
<asynchronous suspension>
#25     runProtectedFromAbort (file:///b/s/w/ir/pkg/front_end/tool/_fasta/command_line.dart:416:12)
<asynchronous suspension>
#26     BatchCompiler.run (file:///b/s/w/ir/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/dynamic_semantics_extension_type_A05_t02

Metadata

Metadata

Assignees

No one assigned

    Labels

    cfe-feature-extension-typesImplement extension types feature in the CFEcrashProcess exits with SIGSEGV, SIGABRT, etc. An unhandled exception is not a crash.feature-extension-typesImplementation of the extension type featurelegacy-area-front-endLegacy: Use area-dart-model instead.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions