-
Bug
-
Resolution: Fixed
-
P4
-
1.1.6
-
1.1.6
-
x86
-
windows_95, windows_nt
-
Not verified
Issue | Fix Version | Assignee | Priority | Status | Resolution | Resolved In Build |
---|---|---|---|---|---|---|
JDK-2020323 | 1.2.0 | Deepa Viswanathan | P4 | Resolved | Fixed | 1.2beta4 |
Name: dm26566 Date: 04/29/98
There is a problem with the JIT compiler in
JDK 1.1.6
for example on the following code
mal2@vladik2 /winfiles/Y: cat X.java
/* ========== This is the code to clean up the databas from old data ======== */
import java.util.*;
class X implements java.io.Serializable {
public static void main(String[] args) throws Throwable {
ResourceBundle resources=null;
if(args.length!=3)
{
System.err.println("usage: CleanUpTheDataBase days_offset_start days_offset_end ConfigFile");
System.exit(1);
}
System.err.println("LEN="+args.length);
long d_start=0,d_end=0;
try {
d_start=new Long(args[0]).longValue();
}catch(Exception e1)
{
System.err.println("Invalid date offset "+args[0]);
System.exit(1);
}
try {
d_end=new Long(args[1]).longValue();
}catch(Exception e1)
{
System.err.println("Invalid date offset "+args[1]);
System.exit(1);
}
/* read configuration */
String stmp;
try {
stmp=new String(args[2]);
System.err.println(" REDAING PROPERTIES "+args[2]);
resources = PropertyResourceBundle.getBundle(stmp);
System.err.println(" DONE ");
} catch (MissingResourceException mre) {
System.err.println("Server.properties not found");
System.exit(1);
}
Object [] pagehandlers=null;
String dataBaseAddress=null;
String sqlDriver=null;
String login=null,password=null;
try {
dataBaseAddress=resources.getString("dataBaseAddress");
} catch(Exception e1) {
System.err.println("No Database URL specified (dataBaseAddress)");
System.exit(1);
}
try {
sqlDriver=resources.getString("sqlDriver");
} catch(Exception e2) {
System.err.println("No SQL Sriver specified (sqlDriver)");
System.exit(1);
}
try {
login=resources.getString("login");
password=resources.getString("password");
} catch(Exception e3) {
System.err.println("No Login or Password specified (login or password)");
System.exit(1);
}
long t_curr=System.currentTimeMillis();
System.out.println("CLEAN:: Starting cleaning");
Hashtable handlers=new Hashtable(2000 );
Object oph;
int xi;
for(xi=0;xi<pagehandlers.length;xi++)
{
System.err.println(xi);
oph=pagehandlers[xi];
handlers.put(oph,oph);
}
System.out.println("CLEAN:: DONE");
}
}
----------------------------
mal2@vladik2 /winfiles/Y:
It prints:
mal2@vladik2 /winfiles/Y: cat txt.txt
H:\>java X 0 0 S1
LEN=3
REDAING PROPERTIES S1
java.lang.ArrayIndexOutOfBoundsException
at java.util.ResourceBundle.getLoader(Compiled Code)
at X.main(Compiled Code)
H:\>java -nojit X 0 0 S1
LEN=3
REDAING PROPERTIES S1
Server.properties not found
H:\>
mal2@vladik2 /winfiles/Y:
So it works OK with java -nojit X 0 0 S1
and does not work with java X 0 0 S1
mal2@vladik2 /winfiles/Y: cat TST.BAT
java X 0 0 S1
java -nojit X 0 0 S1
mal2@vladik2 /winfiles/Y:
(Review ID: 29309)
======================================================================
erik.larsen@Eng 1998-05-12
Here's another test case (from a web bug incident)
NT 4.0
jdk1.1.6
Here's the code
package tst;
import java.util.ResourceBundle;
import java.text.MessageFormat;
public class ResTst {
String ERR = "ERR";
public static void main(String argv[]) {
ResTst c = new ResTst();
String [] items = {
c.ERR
};
ResourceBundle rbMessages=ResourceBundle.getBundle("tst.ResTstMsgs");
for( int x=0;x<items.length;x++) {
String s = rbMessages.getString(items[x]);
System.out.println(items[x] + " : " + s);
}
String s = rbMessages.getString("ERRARGS");
String ss = MessageFormat.format(s, new Object[] { "House", "Burning"});
System.out.println(s + " : " + ss);
}
}
Here's the properties:
ERR=TST Error Message
ERRARGS=Your {0} is {1}
Heres the output with jit:
java.lang.ArrayIndexOutOfBoundsException
at java.util.ResourceBundle.getLoader(Compiled Code)
at tst.ResTst.main(Compiled Code)
Heres the output wothout jit(-nojit)
ERR : Error Message
Your {0} is {1} : Your House is Burning
- backported by
-
JDK-2020323 Problem with JDK1.1.6 JIT compiler.
- Resolved