JDK-8186390 : test for JDK-4755500
  • Type: Enhancement
  • Component: hotspot
  • Sub-Component: compiler
  • Affected Version: 10
  • Priority: P4
  • Status: Resolved
  • Resolution: Fixed
  • Submitted: 2017-08-17
  • Updated: 2017-08-25
  • Resolved: 2017-08-21
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 10
10 b21Fixed
Related Reports
Relates :  
Description
add a regression test for JDK-4755500:

###@###.### 2002-10-04

Revised test case with pass/fail result:
public class MathBugTest {
  public static void main(String[] args) {
    // Note: it's really only necessary to run this loop 8 times to
    // reproduce the bug, but the 2000-length loop causes compilation
    // of Math.round() without any other command-line flags.
    // A bug in the d2l NaN case was causing overflow of the FPU
    // stack, yielding subsequent wrong results for flds.
    for (int i=0; i<2000; i++) {
        Math.round(Double.NaN);
    }
    if (Math.round(1d) != 1) {
        throw new RuntimeException("TEST FAILED");
    }
    System.out.println("Test passed.");
  }
}
Comments
http://cr.openjdk.java.net/~iignatyev//8186390/webrev.00/index.html
17-08-2017