Skip to content

Inconsistent results for -Float32x4.zero().clamp  #40426

Open
@bkonyi

Description

@bkonyi

The fuzzer caught a bug where clamping -Float32x4.zero() would result in different results depending on whether or not the Float32x4.clamp() operation had been optimized.

In addition, the C implementation of the clamp operation will produce different results from intrinsics for both:

  • x86/x64
  • ARM

DartFuzz reproduction information:

Dart Revision: 00e481a

Isolate (/b/s/w/ituNmYtd/dart_fuzzLUECTE) FP NO-FFI FLAT : KBC-INT-SRC-O3-DebugSIMARM64 - AOT-ReleaseX64: !DIVERGENCE! 1.86:3199948411 (output)

-- BEGIN REPRODUCE  --

dartfuzz.dart --fp --no-ffi --flat --seed 3199948411 /b/s/w/ituNmYtd/dart_fuzzLUECTE/fuzz.dart

-- RUN 1 --

/b/s/w/ir/out/DebugSIMARM64/dart --enable-interpreter --compilation-counter-threshold=-1 --optimization_level=3 --old_gen_heap_size=128 /b/s/w/ituNmYtd/dart_fuzzLUECTE/fuzz.dart

-- RUN 2 --

DART_CONFIGURATION='ReleaseX64' DART_VM_FLAGS='--enable-asserts' /b/s/w/ir/pkg/vm/tool/precompiler2 /b/s/w/ituNmYtd/dart_fuzzLUECTE/fuzz.dart /b/s/w/ituNmYtd/dart_fuzzLUECTE/snapshot
/b/s/w/ir/pkg/vm/tool/dart_precompiled_runtime2 /b/s/w/ituNmYtd/dart_fuzzLUECTE/snapshot

-- END REPRODUCE  --

Metadata

Metadata

Assignees

No one assigned

    Labels

    area-vmUse area-vm for VM related issues, including code coverage, and the AOT and JIT backends.dartfuzzFound with Dart fuzzing (DartFuzz, libFuzzer, etc.)library-typed-data

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions