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

Stack overflow on cyclic typedef #32416

Closed
crelier opened this issue Mar 5, 2018 · 1 comment
Closed

Stack overflow on cyclic typedef #32416

crelier opened this issue Mar 5, 2018 · 1 comment
Assignees
Labels
area-front-end Use area-front-end for front end / CFE / kernel format related issues. crash Process exits with SIGSEGV, SIGABRT, etc. An unhandled exception is not a crash.

Comments

@crelier
Copy link
Contributor

crelier commented Mar 5, 2018

Fasta properly reports a compile time error that a typedef refers to itself, but then crashes with a stack overflow.

FAILED: dartk-vm debug_x64 language_2/cyclic_typedef_test/10
Expected: Pass
Actual: DartkCrash
Missing expected compile error.

--- Command "vm" (took 04.000070s):
DART_CONFIGURATION=DebugX64 pkg/vm/tool/dart2 --no-background-compilation --sync-async --ignore-unrecognized-flags --packages=/usr/local/google/home/regis/dart1/sdk/.packages /usr/local/google/home/regis/dart1/sdk/out/DebugX64/generated_tests/language_2/cyclic_typedef_test_10.dart

exit code:
252

stderr:
out/DebugX64/generated_tests/language_2/cyclic_typedef_test_10.dart:14:5: Error: The typedef 'A' has a reference to itself.
A // The name of the typedef
^
Crash when compiling file:///usr/local/google/home/regis/dart1/sdk/out/DebugX64/generated_tests/language_2/cyclic_typedef_test_10.dart,
at character offset null:
Stack Overflow
#0 KernelFunctionTypeAliasBuilder.buildThisType (package:front_end/src/fasta/kernel/kernel_function_type_alias_builder.dart:60)
#1 KernelFunctionTypeAliasBuilder.buildType (package:front_end/src/fasta/kernel/kernel_function_type_alias_builder.dart:106)
#2 KernelFunctionTypeAliasBuilder.buildType (package:front_end/src/fasta/kernel/kernel_function_type_alias_builder.dart:54)
#3 KernelFunctionTypeAliasBuilder.buildType (package:front_end/src/fasta/kernel/kernel_function_type_alias_builder.dart:54)
#4 KernelFunctionTypeAliasBuilder.buildType (package:front_end/src/fasta/kernel/kernel_function_type_alias_builder.dart:54)
#5 KernelFunctionTypeAliasBuilder.buildType (package:front_end/src/fasta/kernel/kernel_function_type_alias_builder.dart:54)
#6 KernelFunctionTypeAliasBuilder.buildType (package:front_end/src/fasta/kernel/kernel_function_type_alias_builder.dart:54)
#7 KernelFunctionTypeAliasBuilder.buildType (package:front_end/src/fasta/kernel/kernel_function_type_alias_builder.dart:54)
#8 KernelFunctionTypeAliasBuilder.buildType (package:front_end/src/fasta/kernel/kernel_function_type_alias_builder.dart:54)
#9 KernelFunctionTypeAliasBuilder.buildType (package:front_end/src/fasta/kernel/kernel_function_type_alias_builder.dart:54)
#10 KernelFunctionTypeAliasBuilder.buildType (package:front_end/src/fasta/kernel/kernel_function_type_alias_builder.dart:54)
#11 KernelFunctionTypeAliasBuilder.buildType (package:front_end/src/fasta/kernel/kernel_function_type_alias_builder.dart:54)
#12 KernelFunctionTypeAliasBuilder.buildType (package:front_end/src/fasta/kernel/kernel_function_type_alias_builder.dart:54)
#13 KernelFunctionTypeAliasBuilder.buildType (package:front_end/src/fasta/kernel/kernel_function_type_alias_builder.dart:54)
...
...

@crelier crelier added the area-front-end Use area-front-end for front end / CFE / kernel format related issues. label Mar 5, 2018
@kmillikin kmillikin added this to Incoming Untriaged in Dart Front End Apr 23, 2018
@askeksa-google askeksa-google changed the title Fasta reports correct error before crashing Stack overflow on cyclic typedef May 23, 2018
@askeksa-google askeksa-google added the crash Process exits with SIGSEGV, SIGABRT, etc. An unhandled exception is not a crash. label May 23, 2018
@askeksa-google askeksa-google added this to the Dart2Stable milestone May 24, 2018
@askeksa-google askeksa-google moved this from Incoming Untriaged to Triaged in Dart Front End May 24, 2018
@askeksa-google askeksa-google moved this from Triaged to In Progress in Dart Front End May 29, 2018
@askeksa-google askeksa-google self-assigned this May 29, 2018
@kmillikin kmillikin removed this from the Dart2Stable milestone May 30, 2018
dart-bot pushed a commit that referenced this issue Jun 22, 2018
Fixes #33208, #31810, #32416, #32417

Bug: http://dartbug.com/33208
Bug: http://dartbug.com/31810
Bug: http://dartbug.com/32416
Bug: http://dartbug.com/32417
Change-Id: Id178daf35be459fdefe04091bf929b5743d89e81
Reviewed-on: https://dart-review.googlesource.com/41264
Commit-Queue: Dmitry Stefantsov <dmitryas@google.com>
Reviewed-by: Aske Simon Christensen <askesc@google.com>
@chloestefantsova
Copy link
Contributor

I believe this is fixed as of 4fe71ec.

@kmillikin kmillikin moved this from In Progress to Done in Dart Front End Aug 1, 2018
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. crash Process exits with SIGSEGV, SIGABRT, etc. An unhandled exception is not a crash.
Projects
Development

No branches or pull requests

4 participants