-
Bug
-
Resolution: Fixed
-
P4
-
8, 11, 12
-
b05
-
x86_64
-
generic
Issue | Fix Version | Assignee | Priority | Status | Resolution | Resolved In Build |
---|---|---|---|---|---|---|
JDK-8235726 | 11.0.8-oracle | Vicente Arturo Romero Zaldivar | P4 | Resolved | Fixed | b01 |
JDK-8235545 | 11.0.7 | Bernard Blaser | P4 | Resolved | Fixed | b01 |
JDK-8263232 | openjdk8u302 | Ge Guo | P4 | Resolved | Fixed | b01 |
A DESCRIPTION OF THE PROBLEM :
The javac compiler goes into an infinite recursion in procedure
jdk.compiler/com.sun.tools.javac.comp.Check.checkClassBounds
when compiling the simple example below.
STEPS TO FOLLOW TO REPRODUCE THE PROBLEM :
Compile the file below.
EXPECTED VERSUS ACTUAL BEHAVIOR :
EXPECTED -
Error message.
ACTUAL -
Error message and then the compiler throws a stack overflow exception.
CNode.java:5: error: unexpected type
abstract class ANode<E extends ANode<E>> extends E {
^
required: class
found: type parameter E
where E is a type-variable:
E declared in class ANode
1 error
The system is out of resources.
Consult the following stack trace for details.
java.lang.StackOverflowError
at jdk.compiler/com.sun.tools.javac.code.Types$16.visitTypeVar(Types.java:2579)
at jdk.compiler/com.sun.tools.javac.code.Types$16.visitTypeVar(Types.java:2535)
at jdk.compiler/com.sun.tools.javac.code.Type$TypeVar.accept(Type.java:1654)
at jdk.compiler/com.sun.tools.javac.code.Types$UnaryVisitor.visit(Types.java:4937)
at jdk.compiler/com.sun.tools.javac.code.Types.interfaces(Types.java:2532)
at jdk.compiler/com.sun.tools.javac.comp.Check.checkClassBounds(Check.java:2717)
at jdk.compiler/com.sun.tools.javac.comp.Check.checkClassBounds(Check.java:2732)
at jdk.compiler/com.sun.tools.javac.comp.Check.checkClassBounds(Check.java:2732)
at jdk.compiler/com.sun.tools.javac.comp.Check.checkClassBounds(Check.java:2732)
at jdk.compiler/com.sun.tools.javac.comp.Check.checkClassBounds(Check.java:2732)
---------- BEGIN SOURCE ----------
interface Node<E extends Node<E>>
{
}
abstract class ANode<E extends ANode<E>> extends E {
// On the previous line we can replace "extends E" with "implements E"
// and the compiler still goes into an infinite recursion.
}
---------- END SOURCE ----------
CUSTOMER SUBMITTED WORKAROUND :
Fix the error.
FREQUENCY : always
The javac compiler goes into an infinite recursion in procedure
jdk.compiler/com.sun.tools.javac.comp.Check.checkClassBounds
when compiling the simple example below.
STEPS TO FOLLOW TO REPRODUCE THE PROBLEM :
Compile the file below.
EXPECTED VERSUS ACTUAL BEHAVIOR :
EXPECTED -
Error message.
ACTUAL -
Error message and then the compiler throws a stack overflow exception.
CNode.java:5: error: unexpected type
abstract class ANode<E extends ANode<E>> extends E {
^
required: class
found: type parameter E
where E is a type-variable:
E declared in class ANode
1 error
The system is out of resources.
Consult the following stack trace for details.
java.lang.StackOverflowError
at jdk.compiler/com.sun.tools.javac.code.Types$16.visitTypeVar(Types.java:2579)
at jdk.compiler/com.sun.tools.javac.code.Types$16.visitTypeVar(Types.java:2535)
at jdk.compiler/com.sun.tools.javac.code.Type$TypeVar.accept(Type.java:1654)
at jdk.compiler/com.sun.tools.javac.code.Types$UnaryVisitor.visit(Types.java:4937)
at jdk.compiler/com.sun.tools.javac.code.Types.interfaces(Types.java:2532)
at jdk.compiler/com.sun.tools.javac.comp.Check.checkClassBounds(Check.java:2717)
at jdk.compiler/com.sun.tools.javac.comp.Check.checkClassBounds(Check.java:2732)
at jdk.compiler/com.sun.tools.javac.comp.Check.checkClassBounds(Check.java:2732)
at jdk.compiler/com.sun.tools.javac.comp.Check.checkClassBounds(Check.java:2732)
at jdk.compiler/com.sun.tools.javac.comp.Check.checkClassBounds(Check.java:2732)
---------- BEGIN SOURCE ----------
interface Node<E extends Node<E>>
{
}
abstract class ANode<E extends ANode<E>> extends E {
// On the previous line we can replace "extends E" with "implements E"
// and the compiler still goes into an infinite recursion.
}
---------- END SOURCE ----------
CUSTOMER SUBMITTED WORKAROUND :
Fix the error.
FREQUENCY : always
- backported by
-
JDK-8235545 infinite recursion while checking super class
- Resolved
-
JDK-8235726 infinite recursion while checking super class
- Resolved
-
JDK-8263232 infinite recursion while checking super class
- Resolved