-
Bug
-
Resolution: Fixed
-
P3
-
6u1
-
b39
-
generic
-
generic
-
Not verified
I have a non-trivial source tree that crashes javac with the following stack trace:
The system is out of resources.
Consult the following stack trace for details.
java.lang.StackOverflowError
at com.sun.tools.javac.code.Type$WildcardType.accept(Type.java:415)
at com.sun.tools.javac.code.Types$MapVisitor.visit(Types.java:3214)
at com.sun.tools.javac.code.Types.upperBound(Types.java:95)
at com.sun.tools.javac.code.Types.adaptRecursive(Types.java:2968)
at com.sun.tools.javac.code.Types.adapt(Types.java:2998)
at com.sun.tools.javac.code.Types.adaptRecursive(Types.java:2959)
at com.sun.tools.javac.code.Types.adaptRecursive(Types.java:2968)
at com.sun.tools.javac.code.Types.adapt(Types.java:2998)
at com.sun.tools.javac.code.Types.adaptRecursive(Types.java:2959)
at com.sun.tools.javac.code.Types.adaptRecursive(Types.java:2968)
at com.sun.tools.javac.code.Types.adapt(Types.java:2998)
at com.sun.tools.javac.code.Types.adaptRecursive(Types.java:2959)
at com.sun.tools.javac.code.Types.adaptRecursive(Types.java:2968)
at com.sun.tools.javac.code.Types.adapt(Types.java:2998)
at com.sun.tools.javac.code.Types.adaptRecursive(Types.java:2959)
at com.sun.tools.javac.code.Types.adaptRecursive(Types.java:2968)
at com.sun.tools.javac.code.Types.adapt(Types.java:2998)
at com.sun.tools.javac.code.Types.adaptRecursive(Types.java:2959)
at com.sun.tools.javac.code.Types.adaptRecursive(Types.java:2968)
at com.sun.tools.javac.code.Types.adapt(Types.java:2998)
at com.sun.tools.javac.code.Types.adaptRecursive(Types.java:2959)
at com.sun.tools.javac.code.Types.adaptRecursive(Types.java:2968)
This happens with the following java versoin on Linux:
: java -fullversion
java full version "1.6.0_01-b06"
If this can be fixed w/o a test case, that would be wonderful, but otherwise to produce a test case I need to identify which part of the source file is causing this problem. Is there anyway to run javac with some sort of debug flag so that I can figure out which source file is failing to compile? I think that is necessary for me to come up with a smaller test case.
Here's a very small test case:
class A<T extends A<?>> {}
class B extends A<A<?>> {}
class Test {
A<A<?>> t = null;
B c = (B)t;
}
The system is out of resources.
Consult the following stack trace for details.
java.lang.StackOverflowError
at com.sun.tools.javac.code.Type$WildcardType.accept(Type.java:415)
at com.sun.tools.javac.code.Types$MapVisitor.visit(Types.java:3214)
at com.sun.tools.javac.code.Types.upperBound(Types.java:95)
at com.sun.tools.javac.code.Types.adaptRecursive(Types.java:2968)
at com.sun.tools.javac.code.Types.adapt(Types.java:2998)
at com.sun.tools.javac.code.Types.adaptRecursive(Types.java:2959)
at com.sun.tools.javac.code.Types.adaptRecursive(Types.java:2968)
at com.sun.tools.javac.code.Types.adapt(Types.java:2998)
at com.sun.tools.javac.code.Types.adaptRecursive(Types.java:2959)
at com.sun.tools.javac.code.Types.adaptRecursive(Types.java:2968)
at com.sun.tools.javac.code.Types.adapt(Types.java:2998)
at com.sun.tools.javac.code.Types.adaptRecursive(Types.java:2959)
at com.sun.tools.javac.code.Types.adaptRecursive(Types.java:2968)
at com.sun.tools.javac.code.Types.adapt(Types.java:2998)
at com.sun.tools.javac.code.Types.adaptRecursive(Types.java:2959)
at com.sun.tools.javac.code.Types.adaptRecursive(Types.java:2968)
at com.sun.tools.javac.code.Types.adapt(Types.java:2998)
at com.sun.tools.javac.code.Types.adaptRecursive(Types.java:2959)
at com.sun.tools.javac.code.Types.adaptRecursive(Types.java:2968)
at com.sun.tools.javac.code.Types.adapt(Types.java:2998)
at com.sun.tools.javac.code.Types.adaptRecursive(Types.java:2959)
at com.sun.tools.javac.code.Types.adaptRecursive(Types.java:2968)
This happens with the following java versoin on Linux:
: java -fullversion
java full version "1.6.0_01-b06"
If this can be fixed w/o a test case, that would be wonderful, but otherwise to produce a test case I need to identify which part of the source file is causing this problem. Is there anyway to run javac with some sort of debug flag so that I can figure out which source file is failing to compile? I think that is necessary for me to come up with a smaller test case.
Here's a very small test case:
class A<T extends A<?>> {}
class B extends A<A<?>> {}
class Test {
A<A<?>> t = null;
B c = (B)t;
}
- relates to
-
JDK-6207386 Undecidable type system leads to crash
- Closed
-
JDK-6747877 Complex use of generics does not compile (javac and javadoc both crash)
- Closed