Uploaded image for project: 'JDK'
  1. JDK
  2. JDK-8144066

StackOverflowException when computing glb

    XMLWordPrintable

    Details

    • Subcomponent:
    • Resolved In Build:
      b152
    • Verification:
      Verified

      Description

      The following program:

      class A<T> {
        Exception[] bar(A<? super Exception[]> x, A<? super Throwable[]> y){
          return foo(x, y);
        }

        <T> T foo(A<? super T> x, A<? super T> y){
          return null;
        }
      }

      Crashes with SOE:

      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:133)
              at com.sun.tools.javac.code.Types$12.visitClassType(Types.java:1928)
              at com.sun.tools.javac.code.Types$12.visitClassType(Types.java:1916)
              at com.sun.tools.javac.code.Type$ClassType.accept(Type.java:999)
              at com.sun.tools.javac.code.Types$DefaultTypeVisitor.visit(Types.java:4519)
              at com.sun.tools.javac.code.Types.asSuper(Types.java:1913)
              at com.sun.tools.javac.code.Types$4.visitClassType(Types.java:919)
              at com.sun.tools.javac.code.Types$4.visitClassType(Types.java:840)
              at com.sun.tools.javac.code.Type$ClassType.accept(Type.java:999)
              at com.sun.tools.javac.code.Types$DefaultTypeVisitor.visit(Types.java:4519)
              at com.sun.tools.javac.code.Types.isSubtype(Types.java:836)
              at com.sun.tools.javac.code.Types.isSubtypeNoCapture(Types.java:810)
              at com.sun.tools.javac.code.Types$4.visitType(Types.java:854)
              at com.sun.tools.javac.code.Types$4.visitType(Types.java:840)
              at com.sun.tools.javac.code.Types$DefaultTypeVisitor.visitTypeVar(Types.java:4525)
              at com.sun.tools.javac.code.Types$SimpleVisitor.visitCapturedType(Types.java:4570)
              at com.sun.tools.javac.code.Type$CapturedType.accept(Type.java:1696)
              at com.sun.tools.javac.code.Types$DefaultTypeVisitor.visit(Types.java:4519)
              at com.sun.tools.javac.code.Types.isSubtype(Types.java:836)
              at com.sun.tools.javac.code.Types.isSubtypeNoCapture(Types.java:810)
              at com.sun.tools.javac.code.Types.closureMin(Types.java:3561)
              at com.sun.tools.javac.code.Types.glbFlattened(Types.java:3752)
              at com.sun.tools.javac.code.Types.glbFlattened(Types.java:3773)
              at com.sun.tools.javac.code.Types.glbFlattened(Types.java:3773)
              at com.sun.tools.javac.code.Types.glbFlattened(Types.java:3773)
              at com.sun.tools.javac.code.Types.glbFlattened(Types.java:3773)
              at com.sun.tools.javac.code.Types.glbFlattened(Types.java:3773)
              at com.sun.tools.javac.code.Types.glbFlattened(Types.java:3773)
              at com.sun.tools.javac.code.Types.glbFlattened(Types.java:3773)
              at com.sun.tools.javac.code.Types.glbFlattened(Types.java:3773)
              at com.sun.tools.javac.code.Types.glbFlattened(Types.java:3773)
              at com.sun.tools.javac.code.Types.glbFlattened(Types.java:3773)
              at com.sun.tools.javac.code.Types.glbFlattened(Types.java:3773)
              at com.sun.tools.javac.code.Types.glbFlattened(Types.java:3773)
              at com.sun.tools.javac.code.Types.glbFlattened(Types.java:3773)
              at com.sun.tools.javac.code.Types.glbFlattened(Types.java:3773)
              at com.sun.tools.javac.code.Types.glbFlattened(Types.java:3773)
              at com.sun.tools.javac.code.Types.glbFlattened(Types.java:3773)
              at com.sun.tools.javac.code.Types.glbFlattened(Types.java:3773)
              at com.sun.tools.javac.code.Types.glbFlattened(Types.java:3773)
              at com.sun.tools.javac.code.Types.glbFlattened(Types.java:3773)
              at com.sun.tools.javac.code.Types.glbFlattened(Types.java:3773)
              at com.sun.tools.javac.code.Types.glbFlattened(Types.java:3773)
              at com.sun.tools.javac.code.Types.glbFlattened(Types.java:3773)
              at com.sun.tools.javac.code.Types.glbFlattened(Types.java:3773)
              at com.sun.tools.javac.code.Types.glbFlattened(Types.java:3773)
              at com.sun.tools.javac.code.Types.glbFlattened(Types.java:3773)
              at com.sun.tools.javac.code.Types.glbFlattened(Types.java:3773)
              at com.sun.tools.javac.code.Types.glbFlattened(Types.java:3773)
              at com.sun.tools.javac.code.Types.glbFlattened(Types.java:3773)
      ...

        Attachments

          Issue Links

            Activity

              People

              Assignee:
              dlsmith Dan Smith
              Reporter:
              mcimadamore Maurizio Cimadamore
              Votes:
              0 Vote for this issue
              Watchers:
              4 Start watching this issue

                Dates

                Created:
                Updated:
                Resolved: