-
Bug
-
Resolution: Fixed
-
P1
-
1.2.0
-
1.2rc2
-
x86
-
solaris_2.5.1
-
Not verified
Name: akC45999 Date: 10/16/98
Test below shows that x86's (JDK12fcs-N with JIT on) VM trows
NullPointerException instead of StackOverflowError. Similar bug was
filed for the case when the method Runner is not synchronized (bug 4177154).
--------------------------------- exceptions03102.java
import java.io.PrintStream;
public class exceptions03102 {
public static int counter = 1;
static synchronized int Runner() {
counter = counter * -1;
int i = counter;
if(counter < 2) counter += Runner();
return i;
}
public static void main(String argv[]) {
try{
Runner();
} catch (Throwable e) {
System.out.println(e);
}
}
}
---------------------------------- output
novo26% dotest
java full version "JDK-1.2fcs-N"
java.lang.NullPointerException
novo26%
======================================================================
======================================================================
- relates to
-
JDK-4181952 VM trows NullPointerException instead of StackOverflowError
- Closed