dart-sdk/runtime
Alexander Markov badc77239a [vm/aot] Avoid unbinding canonical names in AOT transformations
AOT transformations (mixin deduplication and TFA tree shaker) were
using CanonicalName.unbind() in order to make sure that kernel
writer will not be able to write dangling references to the deleted
classes or members (to detect such dangling references earlier).

This conflicts with lazy reading from a kernel file if --from-dill
option is used: lazy reader may read a reference to such class after
unbind() and it creates a new Reference object for such canonical name.
This causes crash later when the fresh Reference is used as it doesn't
have Class node filled in.

The solution is to avoid calling CanonicalName.unbind().
Instead, it is enough to nullify node.reference.canonicalName, which
won't break CanonicalName.reference used by lazy reader.

This crash can be reproduced on tests/language_2/vm/regress_flutter_55345_test.dart
if it is compiled in AOT mode using 2-step kernel generation.

Bug: b/158853113
Change-Id: Ib2004dbbbda85d9f56adc56b48882f4ef08869a7
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/151120
Commit-Queue: Alexander Markov <alexmarkov@google.com>
Reviewed-by: Martin Kustermann <kustermann@google.com>
2020-06-15 22:00:42 +00:00
..
bin Add an --os=fuchsia option to build.py: 2020-06-15 20:05:16 +00:00
docs
include
lib Revert "[vm] Check prefix.loadLibrary is called and returns before prefix members are used." 2020-06-15 19:35:06 +00:00
llvm_codegen
observatory
platform Add an --os=fuchsia option to build.py: 2020-06-15 20:05:16 +00:00
tests/vm [vm/aot] Avoid unbinding canonical names in AOT transformations 2020-06-15 22:00:42 +00:00
third_party
tools
vm [vm/benchmark] Fix metric type of GenKernelKernelMaxRSS benchmark 2020-06-15 20:10:16 +00:00
.clang-tidy
.gitignore
BUILD.gn Add an --os=fuchsia option to build.py: 2020-06-15 20:05:16 +00:00
codereview.settings
configs.gni
CPPLINT.cfg
PRESUBMIT.py
runtime_args.gni