JDK-8293991 : java/lang/Float/Binary16ConversionNaN.java fails on silent NaN conversions
  • Type: Bug
  • Component: core-libs
  • Sub-Component: java.lang
  • Affected Version: 20
  • Priority: P4
  • Status: Resolved
  • Resolution: Fixed
  • Submitted: 2022-09-19
  • Updated: 2022-09-29
  • Resolved: 2022-09-23
The Version table provides details related to the release that this issue/RFE will be addressed.

Unresolved : Release in which this issue/RFE will be addressed.
Resolved: Release in which this issue/RFE has been resolved.
Fixed : Release in which this issue/RFE has been fixed. The release containing this fix may be available for download as an Early Access Release or a General Availability Release.

To download the current JDK release, click here.
JDK 20
20 b17Fixed
Related Reports
Relates :  
Description
Reliably reproduces on x86-32 with FPU:

```
$ CONF=linux-x86-server-fastdebug make test TEST=java/lang/Float/Binary16ConversionNaN.java TEST_VM_OPTS="-XX:UseAVX=0 -XX:UseSSE=0"
...
Roundtrip failure on NaN value 7de2	 got back 7fe2
Roundtrip failure on NaN value fde2	 got back ffe2
```

Since there are many NaN values in FP16 -- basically any non-zero significand works, we should probably just relax the test.
Comments
Changeset: 0b56b822 Author: Aleksey Shipilev <shade@openjdk.org> Date: 2022-09-23 09:03:18 +0000 URL: https://git.openjdk.org/jdk/commit/0b56b822436a0662170c11777ff0009b89a667eb
23-09-2022

Gulp! And even JDK-8076373 encountered the signaling/quiet issue.
22-09-2022

Yes. This is not the first time we see this, see for example JDK-8285985.
22-09-2022

Does this failure mean that the x86 FPU converts a signaling NaN to a quiet NaN while preserving the other bits?
22-09-2022

A pull request was submitted for review. URL: https://git.openjdk.org/jdk/pull/10333 Date: 2022-09-19 10:25:50 +0000
19-09-2022