Skip to content

Dart VM does not preserve identities for SIMD objects #43255

Open
@sgrekhov

Description

@sgrekhov

The following test fail on dartkp-strong-linux-release-simarm64 configuration

import "dart:typed_data";
import "../../../Utils/expect.dart";

main() {
  var obj1 = new Float32x4(1.0, 2.0, 3.0, 4.0);
  var obj2 = new Float32x4(1.0, 2.0, 3.0, 4.0);
  var obj3 = obj1;
  var obj4 = new Float32x4(1.0, 2.0, 3.0, 4.0);

  Expect.isTrue(obj1 == obj3);
  Expect.isTrue(obj1 == obj1);
  Expect.isFalse(obj2 == obj3); // Fail here
  Expect.isFalse(obj1 == obj2);
  Expect.isFalse(obj1 == obj4);
}

Output is


/==================================================================================================================================================\
| dartkp-strong-linux-release-simarm64:co19/LibTest/typed_data/Float32x4/operator_equality_A01_t01 is new and failed (RuntimeError, expected Pass) |
\==================================================================================================================================================/

--- Command "vm_compile_to_kernel" (took 03.000137s):
DART_CONFIGURATION=ReleaseSIMARM64 /b/s/w/ir/pkg/vm/tool/gen_kernel --enable-experiment=non-nullable --aot --platform=out/ReleaseSIMARM64/vm_platform_strong.dill -o /b/s/w/ir/out/ReleaseSIMARM64/generated_compilations/dartkp/tests_co19_src_LibTest_typed_data_Float32x4_operator_equality_A01_t01/out.dill /b/s/w/ir/tests/co19/src/LibTest/typed_data/Float32x4/operator_equality_A01_t01.dart --enable-experiment=non-nullable --packages=/b/s/w/ir/.packages -Ddart.vm.product=false -Ddart.developer.causal_async_stacks=true --sound-null-safety

exit code:
0

--- Command "precompiler" (took 05.000422s):
DART_CONFIGURATION=ReleaseSIMARM64 out/ReleaseSIMARM64/gen_snapshot --enable-experiment=non-nullable --snapshot-kind=app-aot-elf --elf=/b/s/w/ir/out/ReleaseSIMARM64/generated_compilations/dartkp/tests_co19_src_LibTest_typed_data_Float32x4_operator_equality_A01_t01/out.aotsnapshot --loading-unit-manifest=/b/s/w/ir/out/ReleaseSIMARM64/generated_compilations/dartkp/tests_co19_src_LibTest_typed_data_Float32x4_operator_equality_A01_t01/ignored.json --sound-null-safety --enable-experiment=non-nullable --ignore-unrecognized-flags --packages=/b/s/w/ir/.packages /b/s/w/ir/out/ReleaseSIMARM64/generated_compilations/dartkp/tests_co19_src_LibTest_typed_data_Float32x4_operator_equality_A01_t01/out.dill

exit code:
0

--- Command "remove_kernel_file" (took 15ms):
DART_CONFIGURATION=ReleaseSIMARM64 rm /b/s/w/ir/out/ReleaseSIMARM64/generated_compilations/dartkp/tests_co19_src_LibTest_typed_data_Float32x4_operator_equality_A01_t01/out.dill

exit code:
0

--- Command "vm" (took 31ms):
DART_CONFIGURATION=ReleaseSIMARM64 out/ReleaseSIMARM64/dart_precompiled_runtime --sound-null-safety --enable-experiment=non-nullable --ignore-unrecognized-flags --packages=/b/s/w/ir/.packages /b/s/w/ir/out/ReleaseSIMARM64/generated_compilations/dartkp/tests_co19_src_LibTest_typed_data_Float32x4_operator_equality_A01_t01/out.aotsnapshot

exit code:
255

stderr:
Unhandled exception:
Expect.isFalse(true) fails.
#0      _fail (file:///b/s/w/ir/tests/co19/src/Utils/expect.dart:20)
#1      Expect.isFalse (file:///b/s/w/ir/tests/co19/src/Utils/expect_common.dart:48)
#2      main (file:///b/s/w/ir/tests/co19/src/LibTest/typed_data/Float32x4/operator_equality_A01_t01.dart:26)
#3      _startIsolate.<anonymous closure> (dart:isolate-patch/isolate_patch.dart:301)
#4      _RawReceivePortImpl._handleMessage (dart:isolate-patch/isolate_patch.dart:168)

--- Re-run this test:
python tools/test.py -n dartkp-strong-linux-release-simarm64 co19/LibTest/typed_data/Float32x4/operator_equality_A01_t01

Metadata

Metadata

Assignees

No one assigned

    Labels

    area-vmUse area-vm for VM related issues, including code coverage, and the AOT and JIT backends.status-blockedBlocked from making progress by another (referenced) issue

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions