Skip to content

Incorrect output from simple test in AOT mode when the option --enable-experiment=non-nullable is used #43810

@a-siva

Description

@a-siva

The following test generates incorrect output when run in precompiled (AOT) mode

import 'dart:typed_data';

main() {
  var list = Float64List.fromList([
      1, 2, 3, 4,
      5, 6, 7, 8,
      9, 10, 11, 12,
      13, 14, 15, 16
    ]);
  print(list);
}

When run using the JIT it works fine

asiva-desktop[sdk]>out/ReleaseX64/dart-sdk/bin/dart --enable-experiment=non-nullable /tmp/test.dart
[1.0, 2.0, 3.0, 4.0, 5.0, 6.0, 7.0, 8.0, 9.0, 10.0, 11.0, 12.0, 13.0, 14.0, 15.0, 16.0]

However we running on the precompiled runtime the results are different

/usr/local/google/home/asiva/workspace/dart-tot/sdk/pkg/vm/tool/gen_kernel --enable-experiment=non-nullable --aot --platform=out/ReleaseX64/vm_platform_strong_product.dill -o /tmp/test.dill /tmp/test.dart -Ddart.vm.product=true

out/ReleaseX64/gen_snapshot_product --enable-experiment=non-nullable --snapshot-kind=app-aot-elf --elf=/tmp/test.elf /tmp/test.dill

out/ReleaseX64/dart_precompiled_runtime_product /tmp/test.elf
[1.0, 3.0, 5.0, 7.0, 9.0, 11.0, 13.0, 15.0, 0.0, 10.0, 0.0, 12.0, 0.0, 14.0, 0.0, 16.0]

The flutter engine also uses the product configuration and is seeing a similar issue.

Metadata

Metadata

Assignees

Labels

NNBDIssues related to NNBD ReleaseP0A serious issue requiring immediate resolutionarea-vmUse area-vm for VM related issues, including code coverage, and the AOT and JIT backends.

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions