Java Solaris Communities Sun Store Join SDN My Profile Why Join?
 
Bug Database
Bug Detail
Quick Lists
Top 25 Bugs
Top 25 RFE's
Recently Closed Bugs
Printable Page Printable Page


Bug Database
Bug ID: 4899484
Votes 0
Synopsis ia64: RegTest-test java/lang/Math/IeeeRecommendedTests.java fails
Category hotspot:compiler2
Reported Against tiger-beta
Release Fixed 1.5(tiger-b37)
State 10-Fix Delivered, Verified, bug
Priority: 3-Medium
Related Bugs 6280731
Submit Date 31-JUL-2003
Description




Filed By       : J2SE-SQA [j2se-tck-  xxxxx@xxxxx  ]
JDK            : JDK1.5.0-b12, JDK1.5.0-b11
                  (This is a new Regression test which is absent in previous JDKs)
Testbase       : RegTest-test
Platform[s]    : Windows 2003 Enterprise (Itanium),  customer  Advanced Server 2.1 (Itanium)
                  (I am not able to reproduce the failure on 32-bit platforms)
switch/Mode    : all
Falling tests  : java/lang/Math/IeeeRecommendedTests.java

RegTest-test java/lang/Math/IeeeRecommendedTests.java test fails with JDK1.5.0-b12
on Windows 2003 Enterprise (64-bit).

Test source location:
=====================
/java/re/jdk/1.4.2/promoted/latest/ws/j2se/test/java/lang/Math/IeeeRecommendedTests.java

jtr file location:
==================
/net/jtgb4u4c.sfbay/export/sail15/results/tiger/b12/regtest/win32/redhat7.2_gnome_smp_-server_smp_JCC-ITANIUM- customer /workDir/test/java/lang/Math/IeeeRecommendedTests.jtr

How to reproduce:
=================
Run the following script (you may need to change it's variables):
--- script start ---
#!/bin/sh

RESULT_DIR=`pwd`
WORK_DIR=$RESULT_DIR/workDir/test
REPORT_DIR=$RESULT_DIR/reportDir
JT_HOME="h:/java/jct"
JAVA_HOME="h:/java/jdk1.5.0/win32"
TEST_BASE_PATH="h:/java/regtest/test"
TESTWITH=$JAVA_HOME
TESTJAVA=$JAVA_HOME
JTOPTS="-server"
TESTVMOPTS="-server"

export CLASSPATH="$JT_HOME/classes;$JT_HOME/lib/javatest.jar;$JT_HOME/lib/jtreg.jar;$JT_HOME/jemmy/jemmy.jar"

mkdir -p $WORK_DIR/scratch 2>&1
mkdir -p $WORK_DIR/jtData 2>&1
mkdir -p $REPORT_DIR 2>&1
cd $WORK_DIR/scratch

$JAVA_HOME/bin/java -cp $CLASSPATH $JTOPTS -DenvVars=TESTJAVAHOME=$JAVA_HOME,TESTVMOPTS=$TESTVMOPTS,DISPLAY=:0,windir=$windir,PATH=${SHELL%/*},CPAPPEND=$JT_HOME/jemmy/jemmy.jar,TZ=,LC_ALL=en_US,LC_CTYPE=en_US,LANG=en_US,LPDEST= -DDISPLAY=:0 -DlocalHost="JCC-ITANIUM- customer " -Dprogram=jtreg com.sun.javatest.regtest.Main -a -v default -batch -params -w "$WORK_DIR" -r "$REPORT_DIR" -t "$TEST_BASE_PATH" "$TEST_BASE_PATH/java/lang/Math/IeeeRecommendedTests.java"
--- script end ---

Test output (jtr part):
=======================
----------System.out:(0/0)----------
----------System.err:(502/48957)----------
Failure for FpUtils.ilogb(float): For input 4.9E-324 expected -1074 got -1023.
Failure for FpUtils.ilogb(float): For input -4.9E-324 expected -1074 got -1023.
Failure for FpUtils.ilogb(float): For input 1.0E-323 expected -1073 got -1023.
Failure for FpUtils.ilogb(float): For input -1.0E-323 expected -1073 got -1023.
Failure for FpUtils.ilogb(float): For input 2.0E-323 expected -1072 got -1023.
Failure for FpUtils.ilogb(float): For input -2.0E-323 expected -1072 got -1023.
Failure for FpUtils.ilogb(float): For input 1.5E-323 expected -1073 got -1023.
Failure for FpUtils.ilogb(float): For input -1.5E-323 expected -1073 got -1023.
Failure for FpUtils.ilogb(float): For input 4.0E-323 expected -1071 got -1023.
Failure for FpUtils.ilogb(float): For input -4.0E-323 expected -1071 got -1023.
Failure for FpUtils.ilogb(float): For input 3.5E-323 expected -1072 got -1023.
Failure for FpUtils.ilogb(float): For input -3.5E-323 expected -1072 got -1023.
Failure for FpUtils.ilogb(float): For input 7.9E-323 expected -1070 got -1023.
Failure for FpUtils.ilogb(float): For input -7.9E-323 expected -1070 got -1023.
Failure for FpUtils.ilogb(float): For input 7.4E-323 expected -1071 got -1023.
Failure for FpUtils.ilogb(float): For input -7.4E-323 expected -1071 got -1023.
Failure for FpUtils.ilogb(float): For input 1.58E-322 expected -1069 got -1023.
Failure for FpUtils.ilogb(float): For input -1.58E-322 expected -1069 got -1023.
Failure for FpUtils.ilogb(float): For input 1.53E-322 expected -1070 got -1023.
Failure for FpUtils.ilogb(float): For input -1.53E-322 expected -1070 got -1023.
Failure for FpUtils.ilogb(float): For input 3.16E-322 expected -1068 got -1023.
...
Failure for FpUtils.scalb(double,int): For input (1.5E-323, 2094)  expected Infinity got 3.3706746278668423E307.
Failure for FpUtils.scalb(double,int): For input (-1.5E-323, 2094)  expected -Infinity got -3.3706746278668423E307.
Failure for FpUtils.scalb(double,int): For input (1.5E-323, 2095)  expected Infinity got 6.741349255733685E307.
Failure for FpUtils.scalb(double,int): For input (-1.5E-323, 2095)  expected -Infinity got -6.741349255733685E307.
Failure for FpUtils.scalb(double,int): For input (1.5E-323, 2096)  expected Infinity got 1.348269851146737E308.
Failure for FpUtils.scalb(double,int): For input (-1.5E-323, 2096)  expected -Infinity got -1.348269851146737E308.
Testing the recommended functions incurred 388 failures.
java.lang.RuntimeException
	at IeeeRecommendedTests.main(IeeeRecommendedTests.java:1804)
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
	at java.lang.reflect.Method.invoke(Method.java:324)
	at com.sun.javatest.regtest.MainWrapper$MainThread.run(MainWrapper.java:82)
	at java.lang.Thread.run(Thread.java:549)

JavaTest Message: Test threw exception: java.lang.RuntimeException
JavaTest Message: shutting down test

STATUS:Failed.`main' threw exception: java.lang.RuntimeException
result: Failed. Execution failed: `main' threw exception: java.lang.RuntimeException

Specific machine info:
======================
Hostname: JCC-ITANIUM- customer 
OS: Windows 2003 Enterprise

======================================================================
Work Around
N/A
Evaluation
I've verified the regression tests fail on a recent build on a local itanium machine.  All the failures are for double subnormal inputs.

The problem is apparently a code generation issue with the Itanium server compiler.  I wrote a simple stand-alone test program with some of the failing values.  When the short program was run without a vm option or with -Xint, the proper results are calculated.  However, the program fails when run with -Xcomp.

import sun.misc.FpUtils;
import sun.misc.DoubleConsts;

public class test {
    public static void main(String argv[]) {
	double [] values = {
	    Double.MIN_VALUE,
	    Double.MIN_VALUE*2,
	    Double.MIN_VALUE*3,
	    FpUtils.nextDown(DoubleConsts.MIN_NORMAL),
	    DoubleConsts.MIN_NORMAL,
	};

	for(int i =0; i < values.length; i++) {
	    System.out.println("0x" + Long.toHexString(Double.doubleToRawLongBits(values[i])) +
			       "\t0x" + Long.toHexString(Double.doubleToLongBits(values[i])) +
			       // "\t" + Double.toHexString(values[i]) +
			       "\t" + FpUtils.ilogb(values[i])
			       );
						       
	}

    }
}


(The ilogb failures are mislabled as float when they are actualy double input.)

Transferring bug to C2.

  xxxxx@xxxxx   2003-07-31
Comments
  
  Include a link with my name & email   


PLEASE NOTE: JDK6 is formerly known as Project Mustang