You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
[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 <[email protected]>
Reviewed-by: Martin Kustermann <[email protected]>
dart/emit_aot_size_info_flag_test: SkipByDesign # The test itself cannot determine the location of gen_snapshot (only tools/test.py knows where it is).
90
90
dart/bytecode_with_ast_in_aot_test: SkipByDesign # The test doesn't know location of cross-platform gen_snapshot
91
-
dart/split_aot_compilation_test: SkipByDesign # The test doesn't know location of cross-platform gen_snapshot
91
+
dart/split_aot_kernel_generation_test: SkipByDesign # The test doesn't know location of cross-platform gen_snapshot
92
+
dart/split_aot_kernel_generation2_test: SkipByDesign # The test doesn't know location of cross-platform gen_snapshot
92
93
dart_2/emit_aot_size_info_flag_test: SkipByDesign # The test itself cannot determine the location of gen_snapshot (only tools/test.py knows where it is).
93
94
dart_2/bytecode_with_ast_in_aot_test: SkipByDesign # The test doesn't know location of cross-platform gen_snapshot
94
-
dart_2/split_aot_compilation_test: SkipByDesign # The test doesn't know location of cross-platform gen_snapshot
95
+
dart_2/split_aot_kernel_generation_test: SkipByDesign # The test doesn't know location of cross-platform gen_snapshot
96
+
dart_2/split_aot_kernel_generation2_test: SkipByDesign # The test doesn't know location of cross-platform gen_snapshot
0 commit comments