-
Bug
-
Resolution: Duplicate
-
P2
-
None
-
1.4.0
-
sparc
-
solaris_2.6
Name: auR10023 Date: 06/27/2001
Java virtual machine fails with core dump. Here is the test demonstrating
this bug:
------t.java------
class t {
String getTypeName() {
return "";
}
public void posGet_arr_int_int() {
Iter iter = new Iter (new Interval[] {
new Interval(0, 20),
new Interval(0, 20),
new Interval(0, 20),
new Interval(0, 20),
new Interval(0, 20),
new Interval(0, 20)
});
int [] param = null;
int len = 0;
String meth = "" + getTypeName();
while ((param = iter.getNext()) != null) {
len = param[3] - param[2];
for (int i = 0; i < len; i++) {
}
}
}
public static void main(String[] args) {
t obj = new t();
obj.posGet_arr_int_int();
}
}
class Iter {
int [] oldVal;
int [] curVal;
int [] tmpVal;
int [] result;
Interval [] intervals; // array of the interval descriptors
public int getParam(int pos) {
return tmpVal[pos];
}
public Interval getInterval(int pos) {
return intervals[pos];
}
public Iter(Interval [] intervals) {
curVal = new int [intervals.length];
tmpVal = new int [intervals.length];
result = new int [intervals.length];
oldVal = new int [intervals.length];
this.intervals = intervals;
for (int i = 0; i < curVal.length; i++) {
curVal[i] = 0;
tmpVal[i] = 0;
oldVal[i] = 0;
}
}
protected int [] getNextParameters() {
if (curVal == null) {
return null;
}
System.arraycopy(curVal, 0, tmpVal, 0, tmpVal.length);
int i = curVal.length - 1;
for (; i >= 0; i--) {
curVal[i]++;
if (intervals[i].contains(curVal[i])) {
break;
}
curVal[i] = 0;
}
if (i < 0) {
curVal = null;
}
for (i = 0; i < result.length; i++) {
result[i] = intervals[i].getValue(tmpVal[i]);
}
return result;
}
public int [] getNext() {
int [] res = null;
boolean isNotValid = true;
System.arraycopy(tmpVal, 0, oldVal, 0, tmpVal.length);
res = getNextParameters();
while (isNotValid && curVal != null) {
isNotValid = false;
for (int i = 0; i < curVal.length; i++) {
if (!intervals[i].contains(tmpVal[i])) {
res = getNextParameters();
isNotValid = true;
break;
}
}
}
return res;
}
}
class Interval {
int from, to;
public Interval (int from, int to){
this.from = from;
this.to = to;
}
public int getLength() {
return to - from;
}
public int getValue(int param) {
return from + param;
}
public boolean contains(int param) {
return param >= 0 && param < getLength();
}
public boolean containsValue(int value) {
return value >= from && value < to;
}
}
#java -version
java version "1.4.0-beta"
Java(TM) 2 Runtime Environment, Standard Edition (build 1.4.0-beta-b65)
Java HotSpot(TM) Client VM (build 1.4.0-beta-b65, mixed mode)
#java -server t
Unexpected Signal : 11 occurred at PC=0xFE179308
Function=JVM_GetCPClassNameUTF+0xAD10
Library=/set/jdk-builds/JDK1.4.0beta-b65/solaris/jre/lib/sparc/server/libjvm.so
Current Java thread:
Dynamic libraries:
0x10000 /set/java/jdk1.4/solaris/bin/../bin/sparc/native_threads/java
0xff360000 /usr/lib//libthread.so.1
0xff3a0000 /usr/lib//libdl.so.1
0xff280000 /usr/lib//libc.so.1
0xff270000 /usr/platform/SUNW,Ultra-4/lib/libc_psr.so.1
0xfe000000 /set/jdk-builds/JDK1.4.0beta-b65/solaris/jre/lib/sparc/server/libjvm.so
0xff210000 /usr/lib//libCrun.so.1
0xff1f0000 /usr/lib//libsocket.so.1
0xff100000 /usr/lib//libnsl.so.1
0xff0d0000 /usr/lib//libm.so.1
0xff250000 /usr/lib//libw.so.1
0xff0b0000 /usr/lib//libmp.so.2
0xff080000 /set/jdk-builds/JDK1.4.0beta-b65/solaris/jre/lib/sparc/native_threads/libhpi.so
0xff050000 /set/jdk-builds/JDK1.4.0beta-b65/solaris/jre/lib/sparc/libverify.so
0xfe7c0000 /set/jdk-builds/JDK1.4.0beta-b65/solaris/jre/lib/sparc/libjava.so
0xff030000 /set/jdk-builds/JDK1.4.0beta-b65/solaris/jre/lib/sparc/libzip.so
Local Time = Wed Jun 27 19:18:52 2001
Elapsed Time = 2
#
# HotSpot Virtual Machine Error : 11
# Error ID : 4F530E43505002D7 01
# Please report this error at
# http://java.sun.com/cgi-bin/bugreport.cgi
#
# Java VM: Java HotSpot(TM) Server VM (1.4.0-beta-b65 mixed mode)
#
# An error report file has been saved as hs_err_pid19659.log.
# Please refer to the file for further information.
#
Abort (core dumped)
======================================================================