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
A "normal compile" doesn't fail, but on fuzzing it does like this:
Compiled and got 1 libs
-> invalidating [...]/pkg/front_end/testcases/dart2js/late_fields_with_annotation.dart
-> and got 1 libs
Can't serialize, got 'root::[...]/pkg/front_end/testcases/dart2js/late_fields_with_annotation.dart::C::@fields::[...]/pkg/front_end/testcases/dart2js/late_fields_with_annotation.dart::_#C#a#A is already bound to Reference to [...]/pkg/front_end/testcases/dart2js/late_fields_with_annotation.dart::C::@fields::[...]/pkg/front_end/testcases/dart2js/late_fields_with_annotation.dart::_#C#a#A with node C._#C#a#A (Field:323541), trying to bind to Reference to C._#C#a#A with node C._#C#a#A (Field:323829)' from #0 CanonicalName.bindTo (package:kernel/canonical_name.dart:237:7)
#1 Field.bindCanonicalNames (package:kernel/ast.dart:2208:36)
#2 Class.ensureCanonicalNames (package:kernel/ast.dart:1267:17)
#3 Library.ensureCanonicalNames (package:kernel/ast.dart:514:18)
#4 Component.computeCanonicalNamesForLibrary (package:kernel/ast.dart:14028:13)
#5 BinaryPrinter._computeCanonicalNames (package:kernel/binary/ast_to_binary.dart:557:19)
#6 BinaryPrinter.writeComponentFile.<anonymous closure> (package:kernel/binary/ast_to_binary.dart:576:7)
#7 Timeline.timeSync (dart:developer/timeline.dart:160:22)
#8 BinaryPrinter.writeComponentFile (package:kernel/binary/ast_to_binary.dart:574:14)
#9 FuzzCompiles.canSerialize ([...]/pkg/front_end/test/fasta/testing/suite.dart:1427:35)
#10 FuzzCompiles.performFileInvalidation ([...]/pkg/front_end/test/fasta/testing/suite.dart:1340:12)
<asynchronous suspension>
#11 FuzzCompiles.run ([...]/pkg/front_end/test/fasta/testing/suite.dart:1202:45)
<asynchronous suspension>
#12 ChainContext.run.doStep.<anonymous closure> (package:testing/src/chain.dart:196:22)
<asynchronous suspension>
I'm guessing this is what happens: in pkg/compiler/lib/src/kernel/transformations/late_lowering.dart _computeBackingInstanceField a field is "split", among other things changing the name of the field. This means that upon (advanced/experimental) recompile we cannot lookup the field by the original name, we thus create a new reference for it (this is bad as old libraries pointing at it will now point wrong) and when we split it again we again use the new reference and the (same) new name, meaning the canonical name created when serializing will be the same as last time, but that was already bound to the old reference.
I have no immediate good ideas of how to fix this.
This will fail (possibly the status entry in pkg/front_end/testcases/strong.status has to be removed):
A "normal compile" doesn't fail, but on fuzzing it does like this:
I'm guessing this is what happens: in pkg/compiler/lib/src/kernel/transformations/late_lowering.dart _computeBackingInstanceField a field is "split", among other things changing the name of the field. This means that upon (advanced/experimental) recompile we cannot lookup the field by the original name, we thus create a new reference for it (this is bad as old libraries pointing at it will now point wrong) and when we split it again we again use the new reference and the (same) new name, meaning the canonical name created when serializing will be the same as last time, but that was already bound to the old reference.
I have no immediate good ideas of how to fix this.
/cc @johnniwinther
The text was updated successfully, but these errors were encountered: