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

VM crashes when "const {}" is used as the default value for Iterable #36621

Closed
f3ath opened this Issue Apr 13, 2019 · 2 comments

Comments

Projects
None yet
3 participants
@f3ath
Copy link

f3ath commented Apr 13, 2019

Dart VM version: 2.2.0 (Tue Feb 26 15:04:32 2019 +0100) on "linux_x64"
OS: Arch Linux

Code (foo.dart):

main() {}
foo({Iterable<String> a = const {}}) {}

Dump:

$ dart foo.dart 
../../runtime/vm/compiler/frontend/kernel_translation_helper.cc: 2236: error: unreachable code
thread=4089, isolate=foo.dart:main()(0x55617d89bb00)
  [0x000055617baa67ac] dart::Profiler::DumpStackTrace(void*)
  [0x000055617baa67ac] dart::Profiler::DumpStackTrace(void*)
  [0x000055617bcd8e72] dart::Assert::Fail(char const*, ...)
  [0x000055617bc506b4] Unknown symbol
  [0x000055617bc5a74c] dart::kernel::TypeTranslator::SetupFunctionParameters(dart::Class const&, dart::Function const&, bool, bool, dart::kernel::FunctionNodeHelper*)
  [0x000055617ba00476] dart::kernel::KernelLoader::LoadProcedure(dart::Library const&, dart::Class const&, bool, long)
  [0x000055617b9fe937] dart::kernel::KernelLoader::FinishTopLevelClassLoading(dart::Class const&, dart::Library const&, dart::kernel::LibraryIndex const&)
  [0x000055617ba01ddf] dart::kernel::KernelLoader::FinishLoading(dart::Class const&)
  [0x000055617b96a5b5] dart::ClassFinalizer::FinalizeClass(dart::Class const&)
  [0x000055617b96b905] dart::ClassFinalizer::LoadClassMembers(dart::Class const&)
  [0x000055617ba272fb] dart::Class::EnsureIsFinalized(dart::Thread*) const
  [0x000055617ba51168] dart::Library::EnsureTopLevelClassIsFinalized() const
  [0x000055617ba54e9a] dart::Library::LookupLocalOrReExportObject(dart::String const&) const
  [0x000055617ba56d18] dart::Library::InvokeGetter(dart::String const&, bool, bool, bool) const
  [0x000055617bccaeb6] Dart_GetField
  [0x000055617b78197b] dart::bin::RunMainIsolate(char const*, dart::bin::CommandLineOptions*)
  [0x000055617b782807] dart::bin::main(int, char**)
  [0x000055617b783119] Unknown symbol
-- End of DumpStackTrace
Aborted (core dumped)
@aartbik

This comment has been minimized.

Copy link
Contributor

aartbik commented Apr 15, 2019

Using sdk/out/DebugX64/dart, ToT of Dart runs fine:

$ dart foo.dart

@aartbik

This comment has been minimized.

Copy link
Contributor

aartbik commented Apr 15, 2019

The kernel_translation_helper.cc has changed a lot recently due to all the CFE changes. Please run a more recent version and try again.

@aartbik aartbik closed this Apr 15, 2019

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.