-
Bug
-
Resolution: Fixed
-
P2
-
hs14
-
b02
-
generic
-
generic
-
Verified
Issue | Fix Version | Assignee | Priority | Status | Resolution | Resolved In Build |
---|---|---|---|---|---|---|
JDK-2173686 | 7 | Vladimir Kozlov | P2 | Closed | Fixed | b49 |
JDK-2180479 | 6u18 | Vladimir Kozlov | P2 | Closed | Fixed | b01 |
The following test case results in different results when running in -Xcomp and -Xint or -Xmixed modes.
> java -server -Xint Tester
Got java.lang.NegativeArraySizeException
Tester.var_bad = 2 (expected 2)
> java -server -Xmixed Tester
Got java.lang.NegativeArraySizeException
Tester.var_bad = 2 (expected 2)
> java -server -Xcomp -XX:CompileOnly=Tester Tester
Got java.lang.NegativeArraySizeException
Tester.var_bad = 1 (expected 2)
=== Tester.java ===
public class Tester {
static int var_bad = 1;
public static void main(String[] args)
{
var_bad++;
try {
for (int i = 0; i < 10; i++) (new byte[((byte)-1 << i)])[0] = 0;
}
catch (Exception e) { System.out.println("Got " + e); }
System.out.println("Tester.var_bad = " + var_bad + " (expected 2)\n");
}
}
===================
The problem is server compiler specific (32 and 64 bit).
> java -server -Xint Tester
Got java.lang.NegativeArraySizeException
Tester.var_bad = 2 (expected 2)
> java -server -Xmixed Tester
Got java.lang.NegativeArraySizeException
Tester.var_bad = 2 (expected 2)
> java -server -Xcomp -XX:CompileOnly=Tester Tester
Got java.lang.NegativeArraySizeException
Tester.var_bad = 1 (expected 2)
=== Tester.java ===
public class Tester {
static int var_bad = 1;
public static void main(String[] args)
{
var_bad++;
try {
for (int i = 0; i < 10; i++) (new byte[((byte)-1 << i)])[0] = 0;
}
catch (Exception e) { System.out.println("Got " + e); }
System.out.println("Tester.var_bad = " + var_bad + " (expected 2)\n");
}
}
===================
The problem is server compiler specific (32 and 64 bit).
- backported by
-
JDK-2173686 Server compiler leads to data corruption when expression throws an Exception
- Closed
-
JDK-2180479 Server compiler leads to data corruption when expression throws an Exception
- Closed
- duplicates
-
JDK-6795161 Escape analysis leads to data corruption
- Closed
- relates to
-
JDK-6711100 64bit fastdebug server vm crashes with assert(_base == Int,"Not an Int")
- Closed