Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Output divergence #38844

Closed
aartbik opened this issue Oct 11, 2019 · 3 comments
Closed

Output divergence #38844

aartbik opened this issue Oct 11, 2019 · 3 comments
Assignees
Labels
area-vm Use area-vm for VM related issues, including code coverage, and the AOT and JIT backends. dartfuzz Found with Dart fuzzing (DartFuzz, libFuzzer, etc.)

Comments

@aartbik
Copy link
Contributor

aartbik commented Oct 11, 2019

Isolate (/b/s/w/itt9jC7a/dart_fuzzAONVOA) FP NO-FFI FLAT : KBC-MIX-DebugIA32 - JIT-OPTCOUNTER-SLOWPATH-ReleaseSIMARM: !DIVERGENCE! 1.59:1050843418 (output)

-- BEGIN REPRODUCE  --

dartfuzz.dart --fp --no-ffi --flat --seed 1050843418 /b/s/w/itt9jC7a/dart_fuzzAONVOA/fuzz.dart

-- RUN 1 --

/b/s/w/ir/pkg/vm/tool/gen_kernel --gen-bytecode --platform=/b/s/w/ir/out/DebugIA32/vm_platform_strong.dill -o /b/s/w/itt9jC7a/dart_fuzzAONVOA/out.dill /b/s/w/itt9jC7a/dart_fuzzAONVOA/fuzz.dart
/b/s/w/ir/out/DebugIA32/dart --enable-interpreter --old_gen_heap_size=128 /b/s/w/itt9jC7a/dart_fuzzAONVOA/out.dill

-- RUN 2 --

/b/s/w/ir/out/ReleaseSIMARM/dart --optimization_counter_threshold=1 --use-slow-path --old_gen_heap_size=128 /b/s/w/itt9jC7a/dart_fuzzAONVOA/fuzz.dart

-- END REPRODUCE  --

@aartbik aartbik added area-vm Use area-vm for VM related issues, including code coverage, and the AOT and JIT backends. dartfuzz Found with Dart fuzzing (DartFuzz, libFuzzer, etc.) labels Oct 11, 2019
@aartbik
Copy link
Contributor Author

aartbik commented Oct 11, 2019

Confirmed difference for the SIMARM JIT run:

< [-nan, -nan, -nan, -nan]
---
> [inf, inf, inf, inf]

fuzz.dart.txt

@alexmarkov alexmarkov self-assigned this Oct 14, 2019
@alexmarkov
Copy link
Contributor

The small repro:

import 'dart:typed_data';

Float32x4 var16 = new Float32x4(1.0, 1.0, 1.0, 1.0);

main() {
  for (int i = 0; i < 10; ++i) {
    print(var16 / Float32x4.zero());
  }
}
out/ReleaseSIMARM/dart --optimization_counter_threshold=5 foo.dart
[inf, inf, inf, inf]
[inf, inf, inf, inf]
[-nan, -nan, -nan, -nan]
[-nan, -nan, -nan, -nan]
[-nan, -nan, -nan, -nan]
[-nan, -nan, -nan, -nan]
[-nan, -nan, -nan, -nan]
[-nan, -nan, -nan, -nan]
[-nan, -nan, -nan, -nan]
[-nan, -nan, -nan, -nan]

It looks like this problem was already reported (#26675), fixed (3da9c34), but the fix was reverted (2cb8062).

@mraleph do you have any plans to reland the fix?

@mraleph
Copy link
Member

mraleph commented Oct 15, 2019

I somehow missed that my commit was reverted. I will rebase and try relanding.

@alexmarkov alexmarkov assigned mraleph and unassigned alexmarkov Oct 15, 2019
tekknolagi pushed a commit to tekknolagi/dart-assembler that referenced this issue Nov 3, 2020
This instruction handles 0.0 and infinity operands
specially because otherwise it produces NaN where it
should produce appropriate infinity or zero.

Fixes dart-lang#24399
Fixes dart-lang#26675
Fixes dart-lang#38844

This relands commit 3da9c34

Change-Id: I116cea3b6c27b5dc16741f9652fbbb9a3ec1194e
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/121705
Commit-Queue: Vyacheslav Egorov <vegorov@google.com>
Reviewed-by: Alexander Markov <alexmarkov@google.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area-vm Use area-vm for VM related issues, including code coverage, and the AOT and JIT backends. dartfuzz Found with Dart fuzzing (DartFuzz, libFuzzer, etc.)
Projects
None yet
Development

No branches or pull requests

3 participants