|
Quick Lists
|
|
Bug ID:
|
4907999
|
|
Votes
|
1
|
|
Synopsis
|
[1.3.1_09] OutOfBoundsException with -server when ToString applies to rmi.UID
|
|
Category
|
hotspot:compiler2
|
|
Reported Against
|
1.3.1_09
|
|
Release Fixed
|
1.3.1_12
|
|
State
|
10-Fix Delivered,
Verified,
bug
|
|
Priority:
|
3-Medium
|
|
Related Bugs
|
|
|
Submit Date
|
18-AUG-2003
|
|
Description
|
When we use toString for java.rmi.server.UID with -server in 1.3.1_09,
ArrayIndexOutOfBoundsException Occurs.
CONFIGRATION:
OS: Windows2000(SP3, japanese)/WindowsXP(SP1, Japanese)
JDK version: 1.3.1_09
REPRODUCTION:
To Compile the attached test program, Uidtest.java
and invoke "java -server Uidtest".
You will see the following message.
.....
3179c3:f71363e967:-8000
3179c3:f71363e967:-8000
3179c3:f71363e967:-8000
java.lang.ArrayIndexOutOfBoundsException
at java.lang.Long.toString(Long.java:98)
at java.rmi.server.UID.toString(UID.java:150)
at Uidtest.main(Uidtest.java:10)
TEST PROGRAM:
==== Uitest.java =====
import java.rmi.server.UID;
public class Uidtest
{
public static final UID u = new UID();
public static void main(String args[])
{
try{
for(int i=0; i<10000; i++){
System.out.println(u.toString());
}
}catch(Exception e){
e.printStackTrace();
System.exit(0);
}
}
}
<====
NOTE:
- This issue does not occur in 1.4.X and 1.5(b14).
- This occurs with -server option, not with -client.
- We found the Web site
http://forum.java.sun.com/thread.jsp?forum=4&thread=226539
but could not find out the related bugid.
===========================================================================
|
|
Work Around
|
N/A
|
|
Evaluation
|
Long.toString(long,int) should never throw an ArrayIndexOutOfBoundsException, so this can't be a problem in UID.toString. The implementation of Long.toString(long,int) did not change from 1.3.1 to 1.4. And the fact that this bug is reported to only occur with "-server", it certainly seems like a VM problem (that must have been fixed in 1.4). I can't seem to find an existing bug report that is an exact match, however, so I'm recategorizing this to hotspot/compiler2 for further evaluation.
xxxxx@xxxxx 2003-08-18
In 1.3.1_10, In "Shift Right arithmetic Long by variable" function in i486.ad file, the machine code is getting generated for SHR instruction instead of SAR.
So the fix is to change SHR to SAR. See the 'Suggested fix' section.
xxxxx@xxxxx 2004-01-09
|
|
Comments
|
PLEASE NOTE: JDK6 is formerly known as Project Mustang
|
|
|
 |