Issue | Fix Version | Assignee | Priority | Status | Resolution | Resolved In Build |
---|---|---|---|---|---|---|
JDK-2041305 | 1.3.0 | Clifford Click | P1 | Resolved | Fixed | 1.3 |
Name: kb87695 Date: 03/08/2001
LoopTransform problems.
Hi,
I have some problems in jdk1.3.0.01 in Solaris. This is related to
the LoopTransformations, that were added in 1.3.0 and was not present in
hotspot 101. The problem is in the shared code, I guess it will fail for Windows
as well.
There are two test cases for the same.
I am using the server compiler of the following jdk distributed as
jdk-1_3_0_01-fcs-bin-solsparc-09_nov_2000.zip.
The version string goes as follows.
$ java -server -version
java version "1.3.0_01"
Java(TM) 2 Runtime Environment, Standard Edition (build 1.3.0_01)
Java HotSpot(TM) Server VM (build 1.3.0_01, mixed mode)
Case 1:
The test case is as follows
public class FreqInline {
public int target(int i, int j) {
if( i < j )
return i - j;
else if( i > j )
return j - i;
else
return j + i;
}
public void caller() {
for(int i = 0; i < 1000000; i++)
target(i, i + 1);
for(int i = 0; i < 10; i++)
target(i,i);
}
public static void main(String[] args) {
FreqInline frIn = new FreqInline();
for(int i = 0; i < 100000; i++)
frIn.caller();
}
}
The problems show up as follows.
$ java -server FreqInline
#
# HotSpot Virtual Machine Error, Unexpected Signal 11
# Please report this error at
# http://java.sun.com/cgi-bin/bugreport.cgi
#
# Error ID: 4F533F534F4C415249530E435050079A 01
#
# Problematic Thread: prio=5 tid=0xdba38 nid=0xb runnable
#
With java_g it gave this
$ java_g -server FreqInline
#
# HotSpot Virtual Machine Error, Unexpected Signal 11
# Please report this error at
# http://java.sun.com/cgi-bin/bugreport.cgi
#
# occurred at pc=fe1a1c48
#
# Error ID:
/usr/re/hotspot/hotspot1.3.0_01/ws/solsparc/src/os/solaris/vm/os_solaris.cpp,
1946 [ Patched ]
#
# Problematic Thread: prio=5 tid=0x136d80 nid=0xb runnable
#
Dumping core....
Abort
Please look into this bug. Please do not hesitate to ask for any further
clarifications. For a reduced method problem, let me say that the bug
manifests itself compiling method FreqInline.caller. So this bug also
shows up if you say
$ java_g -server -XX:CompileOnly=.caller FreqInline
VM option 'CompileOnly=.caller'
#
# HotSpot Virtual Machine Error, Unexpected Signal 11
# Please report this error at
# http://java.sun.com/cgi-bin/bugreport.cgi
#
# occurred at pc=fe1a1c48
#
# Error ID:
/usr/re/hotspot/hotspot1.3.0_01/ws/solsparc/src/os/solaris/vm/os_solaris.cpp,
1946 [ Patched ]
#
# Problematic Thread: prio=5 tid=0x136e18 nid=0xb runnable
#
Dumping core....
Abort
Case 2:
The test case is as follows
public class UtilTest
{
public static long power2(int x) {
long l = 1L;
for (int i = 1; i <= x; i++)
l += l;
return l;
}
public static void main(String[] strings) {
System.out.println(power2(5));
}
}
The output of the run is as follows. In this case, you have to force
compilation on power2 to let that happen.
$ java_g -server -version
java version "1.3.1beta"
Java(TM) 2 Runtime Environment, Standard Edition (build 1.3.1beta-b10)
Java HotSpot(TM) Server VM (build 1.3.0_01-debug, mixed mode)
$ java_g -server -Xcomp -XX:CompileOnly=.power2 UtilTest
VM option 'CompileOnly=.power2'
#
# HotSpot Virtual Machine Error, assertion failure
# Please report this error at
# http://java.sun.com/cgi-bin/bugreport.cgi
#
# assert(loop_count++ < K, "infinite loop in PhaseGVN::transform")
#
# Error ID: /usr/re/hotspot/hotspot1.3.0_01/ws/solsparc/src/share/vm/opto/phaseX.cpp, 823 [ Patched ]
#
# Problematic Thread: prio=5 tid=0x13c710 nid=0xb runnable
#
Dumping core....
Abort
(Review ID: 117685)
======================================================================
- backported by
-
JDK-2041305 Loop Optimization problems
-
- Resolved
-