Skip to content

[CFE] Crash when compiling co19/Language/Classes/Constructors/Factories/function_type_t02 #54010

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 Nov 10, 2023 · 1 comment
Assignees
Labels
cfe-dysfunctionalities Issues for the CFE not behaving as intended crash Process exits with SIGSEGV, SIGABRT, etc. An unhandled exception is not a crash. legacy-area-front-end Legacy: Use area-dart-model instead. model-crashes Crashes in the analyzer or CFE

Comments

@sgrekhov
Copy link
Contributor

Error log

/=====================================================================================================\
| co19/Language/Classes/Constructors/Factories/function_type_t02 broke (Pass -> Crash, expected Pass) |
\=====================================================================================================/

--- Command "fasta" (took 99ms):
(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_Language_Classes_Constructors_Factories_function_type_t02/out.dill --platform ./out/ReleaseX64/vm_platform_strong.dill -Dtest_runner.configuration=cfe-strong-linux --nnbd-strong --packages=./.dart_tool/package_config.json ./tests/co19/src/Language/Classes/Constructors/Factories/function_type_t02.dart )

exit code:
253

stdout:
tests/co19/src/Language/Classes/Constructors/Factories/function_type_t02.dart:54:21: Error: Enum factory constructors can't redirect to generative constructors.
  factory E2.f1() = E3;
                    ^
tests/co19/src/Language/Classes/Constructors/Factories/function_type_t02.dart:30:18: Error: The constructor function type 'C Function(dynamic)' isn't a subtype of 'F Function(dynamic)'.
 - 'C' is from 'tests/co19/src/Language/Classes/Constructors/Factories/function_type_t02.dart'.
 - 'F' is from 'tests/co19/src/Language/Classes/Constructors/Factories/function_type_t02.dart'.
  factory F(x) = C;
                 ^
tests/co19/src/Language/Classes/Constructors/Factories/function_type_t02.dart:59:21: Error: The constructor function type 'E3 Function()' isn't a subtype of 'E2 Function()'.
 - 'E3' is from 'tests/co19/src/Language/Classes/Constructors/Factories/function_type_t02.dart'.
 - 'E2' is from 'tests/co19/src/Language/Classes/Constructors/Factories/function_type_t02.dart'.
  factory E2.f2() = E3.f;
                    ^
tests/co19/src/Language/Classes/Constructors/Factories/function_type_t02.dart:44:15: Error: Verification of the generated program failed:
Target=vm, VerificationStage.afterModularTransformations: ConstructorInvocation with incompatible arguments for 'C.'.
  factory E1.f() = C;
              ^

stderr:
Unhandled exception:
  Crash when compiling:
'package:front_end/src/fasta/kernel/kernel_target.dart': Failed assertion: line 1621 pos 12: 'allowVerificationErrorForTesting || errors.isEmpty': Verification errors found.

#0      _AssertionError._doThrowNew (dart:core-patch/errors_patch.dart:51:61)
#1      _AssertionError._throwNew (dart:core-patch/errors_patch.dart:40:5)
#2      KernelTarget._verify (package:front_end/src/fasta/kernel/kernel_target.dart:1621:12)
#3      KernelTarget.buildComponent.<anonymous closure> (package:front_end/src/fasta/kernel/kernel_target.dart:635:9)
<asynchronous suspension>
#4      withCrashReporting (package:front_end/src/fasta/crash.dart:133:12)
<asynchronous suspension>
#5      KernelTarget.buildComponent (package:front_end/src/fasta/kernel/kernel_target.dart:576:12)
<asynchronous suspension>
#6      CompileTask.compile (file:///b/s/w/ir/pkg/front_end/tool/_fasta/entry_points.dart:436:19)
<asynchronous suspension>
#7      BatchCompiler.batchCompileImpl (file:///b/s/w/ir/pkg/front_end/tool/_fasta/entry_points.dart:221:5)
<asynchronous suspension>
#8      CompilerContext.clear (package:front_end/src/fasta/compiler_context.dart:139:3)
<asynchronous suspension>
#9      runProtectedFromAbort (file:///b/s/w/ir/pkg/front_end/tool/_fasta/command_line.dart:416:12)
<asynchronous suspension>
#10     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/Language/Classes/Constructors/Factories/function_type_t02

@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 Nov 10, 2023
@johnniwinther johnniwinther added the cfe-dysfunctionalities Issues for the CFE not behaving as intended label Nov 10, 2023
@johnniwinther johnniwinther added the model-crashes Crashes in the analyzer or CFE label Nov 10, 2023
@chloestefantsova
Copy link
Contributor

Should be fixed by https://dart-review.googlesource.com/c/sdk/+/336886.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
cfe-dysfunctionalities Issues for the CFE not behaving as intended crash Process exits with SIGSEGV, SIGABRT, etc. An unhandled exception is not a crash. legacy-area-front-end Legacy: Use area-dart-model instead. model-crashes Crashes in the analyzer or CFE
Projects
None yet
Development

No branches or pull requests

3 participants