-
Bug
-
Resolution: Fixed
-
P2
-
1.2.0
-
None
-
b01
-
generic
-
windows_nt
-
Not verified
Issue | Fix Version | Assignee | Priority | Status | Resolution | Resolved In Build |
---|---|---|---|---|---|---|
JDK-2022521 | 1.2.0 | Deepa Viswanathan | P2 | Resolved | Fixed | 1.2fcs |
The following program produces incorrect results -
class test2
{
static public void main(String args[])
{
new test2();
}
test2()
{
Object cols[] = { null, null, null, null, null, null, null, null};
int i = 0;
int j = 0;
int k = 0;
for (k=0; k<10; k++) {
for (i=0; i<11; i++)
for (j=0; j<12; j++)
try {
drawImage(i,j,k,cols[k%8]);
} catch(Throwable e) {
System.out.println("k="+k + " i="+i + " j="+j + "e="+e);
return;
}
}
}
private void drawImage(int i,int j,int k,Object c)
{
if (k == 1 && i == 2 && j == 3)
throw new java.lang.Error("I'm an Error");
}
}
Result with the JIT -
Symantec Java! JustInTime Compiler Version 3.00.066(x) for JDK 1.2
Copyright (C) 1996-98 Symantec Corporation
k=81653608 i=2 j=3 e=java.lang.Error: I'm an Error
^^^^^^^^^^
Without the JIT, the result is ok:
k=1 i=2 j=3 e=java.lang.Error: I'm an Error
class test2
{
static public void main(String args[])
{
new test2();
}
test2()
{
Object cols[] = { null, null, null, null, null, null, null, null};
int i = 0;
int j = 0;
int k = 0;
for (k=0; k<10; k++) {
for (i=0; i<11; i++)
for (j=0; j<12; j++)
try {
drawImage(i,j,k,cols[k%8]);
} catch(Throwable e) {
System.out.println("k="+k + " i="+i + " j="+j + "e="+e);
return;
}
}
}
private void drawImage(int i,int j,int k,Object c)
{
if (k == 1 && i == 2 && j == 3)
throw new java.lang.Error("I'm an Error");
}
}
Result with the JIT -
Symantec Java! JustInTime Compiler Version 3.00.066(x) for JDK 1.2
Copyright (C) 1996-98 Symantec Corporation
k=81653608 i=2 j=3 e=java.lang.Error: I'm an Error
^^^^^^^^^^
Without the JIT, the result is ok:
k=1 i=2 j=3 e=java.lang.Error: I'm an Error
- backported by
-
JDK-2022521 Argument to method corrupted in the catch block (x.3.00.066 symcjit.dll).
-
- Resolved
-