-
Bug
-
Resolution: Fixed
-
P3
-
1.1, 1.1.2, 1.1.3, 1.1.4, 1.1.5, 1.1.6, 1.2.0
-
1.2beta2
-
x86, sparc
-
solaris_2.5, solaris_2.5.1, solaris_2.6, windows_95, windows_nt
-
Verified
Name: laC46010 Date: 12/09/96
The test case below causes compiler stack overflow and crash.
See also similar bug that was fixed long ago:
#1228407 (synopsis: fp.bugs 2439: recursive class definition causes compiler to go into loop)
-------------------------clss04901.java----------------------------------
// Ident: %Z%%M% %I% %E%
// Copyright %G% Sun Microsystems, Inc. All Rights Reserved
package javasoft.sqe.tests.lang.clss049.clss04901;
import java.io.PrintStream;
public class clss04901 extends clss04901 { // compile-time error
public static void main(String argv[])
{
System.exit(run(argv, System.out) + 95/*STATUS_TEMP*/);
}
public static int run(String argv[], PrintStream out) {
clss04901 x;
return 0/*STATUS_PASS*/;
}
}
------------------------------------------------------------------
/export/ld32/jdk_1.1/bin/javac -d /export/ld12/java/leo/res/clss/classes tests/lang/CLSS/clss049/clss04903/clss04903.java
java.lang.StackOverflowError
at sun.tools.java.ClassDeclaration.getClassDefinition(ClassDeclaration.java)
at sun.tools.java.ClassDefinition.getInnerClass(ClassDefinition.java)
at sun.tools.java.ClassDefinition.getInnerClass(ClassDefinition.java)
....
at sun.tools.java.ClassDefinition.getInnerClass(ClassDefinition.java)
at sun.tools.java.ClassDefinition.resolveName(ClassDefinition.java)
at sun.tools.java.Environment.resolveNames(Environment.java)
at sun.tools.java.Environment.resolveNames(Environment.java)
at sun.tools.java.Environment.resolveNames(Environment.java)
at sun.tools.javac.SourceField.resolveTypeStructure(SourceField.java)
at sun.tools.javac.SourceClass.resolveTypeStructure(SourceClass.java)
at sun.tools.javac.SourceClass.basicCheck(SourceClass.java)
at sun.tools.java.ClassDeclaration.getClassDefinition(ClassDeclaration.java)
at sun.tools.javac.Main.compile(Main.java)
at sun.tools.javac.Main.main(Main.java)
error: An error has occurred in the compiler; please file a bug report (###@###.###).
1 error
======================================================================
- duplicates
-
JDK-4088238 JCK tests cause an infinite number of error messages to be issued.
- Closed
-
JDK-4073739 The compiler falls into an infinite loop instead of giving an error.
- Closed
-
JDK-4100114 JCK tests cause an infinite number of error messages
- Closed