-
Bug
-
Resolution: Fixed
-
P2
-
8
-
b19
-
x86_64
-
linux
-
Verified
Issue | Fix Version | Assignee | Priority | Status | Resolution | Resolved In Build |
---|---|---|---|---|---|---|
JDK-8048477 | 8u25 | Maurizio Cimadamore | P2 | Resolved | Fixed | b05 |
JDK-8046347 | 8u20 | Maurizio Cimadamore | P2 | Closed | Fixed | b20 |
JDK-8052624 | emb-8u26 | Maurizio Cimadamore | P2 | Resolved | Fixed | b17 |
FULL PRODUCT VERSION :
java version "1.8.0_20-ea"
Java(TM) SE Runtime Environment (build 1.8.0_20-ea-b14)
Java HotSpot(TM) 64-Bit Server VM (build 25.20-b14, mixed mode)
ADDITIONAL OS VERSION INFORMATION :
Linux HOST 3.11.0-18-generic #32-Ubuntu SMP Tue Feb 18 21:11:14 UTC 2014 x86_64 x86_64 x86_64 GNU/Linux
A DESCRIPTION OF THE PROBLEM :
The class provided below compiles using javac 1.8.0_05-b13, but causes a stack overflow exception with javac 1.8.0_20-ea-b14.
REGRESSION. Last worked in version 8
ADDITIONAL REGRESSION INFORMATION:
java version "1.8.0_05"
Java(TM) SE Runtime Environment (build 1.8.0_05-b13)
Java HotSpot(TM) 64-Bit Server VM (build 25.5-b02, mixed mode)
STEPS TO FOLLOW TO REPRODUCE THE PROBLEM :
Compile the source code given below.
EXPECTED VERSUS ACTUAL BEHAVIOR :
EXPECTED -
It should compile without problem.
ACTUAL -
It produces a stack overflow exception shown below.
ERROR MESSAGES/STACK TRACES THAT OCCUR :
The system is out of resources.
Consult the following stack trace for details.
java.lang.StackOverflowError
at com.sun.tools.javac.code.Type.hasTag(Type.java:97)
at com.sun.tools.javac.code.Types$SameTypeVisitor.visitType(Types.java:1102)
at com.sun.tools.javac.code.Types$SameTypeVisitor.visitType(Types.java:1088)
at com.sun.tools.javac.code.Types$DefaultTypeVisitor.visitTypeVar(Types.java:4404)
at com.sun.tools.javac.code.Type$TypeVar.accept(Type.java:1266)
at com.sun.tools.javac.code.Types$DefaultTypeVisitor.visit(Types.java:4398)
at com.sun.tools.javac.code.Types.isSameType(Types.java:1082)
at com.sun.tools.javac.code.Types.isSameType(Types.java:1077)
at com.sun.tools.javac.code.Types.containsTypeEquivalent(Types.java:4061)
at com.sun.tools.javac.code.Types.containsTypeEquivalent(Types.java:1436)
at com.sun.tools.javac.code.Types$LooseSameTypeVisitor.containsTypes(Types.java:1231)
at com.sun.tools.javac.code.Types$SameTypeVisitor.visitClassType(Types.java:1156)
at com.sun.tools.javac.code.Types$SameTypeVisitor.visitClassType(Types.java:1088)
at com.sun.tools.javac.code.Type$ClassType.accept(Type.java:763)
at com.sun.tools.javac.code.Types$DefaultTypeVisitor.visit(Types.java:4398)
...
REPRODUCIBILITY :
This bug can be reproduced always.
---------- BEGIN SOURCE ----------
public class StackOverflowBug {
interface A<T> {
}
<T extends A<T>> T m(T v) {
return m(v);
}
}
---------- END SOURCE ----------
java version "1.8.0_20-ea"
Java(TM) SE Runtime Environment (build 1.8.0_20-ea-b14)
Java HotSpot(TM) 64-Bit Server VM (build 25.20-b14, mixed mode)
ADDITIONAL OS VERSION INFORMATION :
Linux HOST 3.11.0-18-generic #32-Ubuntu SMP Tue Feb 18 21:11:14 UTC 2014 x86_64 x86_64 x86_64 GNU/Linux
A DESCRIPTION OF THE PROBLEM :
The class provided below compiles using javac 1.8.0_05-b13, but causes a stack overflow exception with javac 1.8.0_20-ea-b14.
REGRESSION. Last worked in version 8
ADDITIONAL REGRESSION INFORMATION:
java version "1.8.0_05"
Java(TM) SE Runtime Environment (build 1.8.0_05-b13)
Java HotSpot(TM) 64-Bit Server VM (build 25.5-b02, mixed mode)
STEPS TO FOLLOW TO REPRODUCE THE PROBLEM :
Compile the source code given below.
EXPECTED VERSUS ACTUAL BEHAVIOR :
EXPECTED -
It should compile without problem.
ACTUAL -
It produces a stack overflow exception shown below.
ERROR MESSAGES/STACK TRACES THAT OCCUR :
The system is out of resources.
Consult the following stack trace for details.
java.lang.StackOverflowError
at com.sun.tools.javac.code.Type.hasTag(Type.java:97)
at com.sun.tools.javac.code.Types$SameTypeVisitor.visitType(Types.java:1102)
at com.sun.tools.javac.code.Types$SameTypeVisitor.visitType(Types.java:1088)
at com.sun.tools.javac.code.Types$DefaultTypeVisitor.visitTypeVar(Types.java:4404)
at com.sun.tools.javac.code.Type$TypeVar.accept(Type.java:1266)
at com.sun.tools.javac.code.Types$DefaultTypeVisitor.visit(Types.java:4398)
at com.sun.tools.javac.code.Types.isSameType(Types.java:1082)
at com.sun.tools.javac.code.Types.isSameType(Types.java:1077)
at com.sun.tools.javac.code.Types.containsTypeEquivalent(Types.java:4061)
at com.sun.tools.javac.code.Types.containsTypeEquivalent(Types.java:1436)
at com.sun.tools.javac.code.Types$LooseSameTypeVisitor.containsTypes(Types.java:1231)
at com.sun.tools.javac.code.Types$SameTypeVisitor.visitClassType(Types.java:1156)
at com.sun.tools.javac.code.Types$SameTypeVisitor.visitClassType(Types.java:1088)
at com.sun.tools.javac.code.Type$ClassType.accept(Type.java:763)
at com.sun.tools.javac.code.Types$DefaultTypeVisitor.visit(Types.java:4398)
...
REPRODUCIBILITY :
This bug can be reproduced always.
---------- BEGIN SOURCE ----------
public class StackOverflowBug {
interface A<T> {
}
<T extends A<T>> T m(T v) {
return m(v);
}
}
---------- END SOURCE ----------
- backported by
-
JDK-8048477 javac fails with StackOverflowException
- Resolved
-
JDK-8052624 javac fails with StackOverflowException
- Resolved
-
JDK-8046347 javac fails with StackOverflowException
- Closed
- relates to
-
JDK-6558545 Undecidable type system leads to stack overflow
- Open
-
JDK-4993221 Produce infinite types from lub as required by JLS
- Open
-
JDK-8037878 javac should take multiple upper bounds into account in incorporation
- Closed
(1 relates to)