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

StackOverflowError at com.sun.tools.javac.code.Types.lub

XMLWordPrintable

    • b36
    • Verified

        When trying to build our project's code using JDK 8u20's, javac crashes with a StackOverflowError.
        This worked fine in all prior versions of t he JDK (e.g. 8u11, 7u67,
        6u45, etc.) so this is a regression in the compiler.
        This happens on RHEL 5.10 64-bit, CentOS 6.5 32-bit & 64-bit, RHEL 7
        64-bit, etc.

        java version "1.8.0_20"
        Java(TM) SE Runtime Environment (build 1.8.0_20-b26)
        Java HotSpot(TM) 64-Bit Server VM (build 25.20-b23, mixed mode)
        javac 1.8.0_20

        The system is out of resources.
        Consult the following stack trace for details.
        java.lang.StackOverflowError
                at com.sun.tools.javac.code.Types.lub(Types.java:3532)
                at com.sun.tools.javac.code.Types.lub(Types.java:3616)
                at com.sun.tools.javac.code.Types.lub(Types.java:3616)
                at com.sun.tools.javac.code.Types.lub(Types.java:3616)
                at com.sun.tools.javac.code.Types.lub(Types.java:3616)
        ...

        HOW TO REPRODUCE:

        To reproduce issue, download tarball at following URL:

        http://nextmidas.techma.com/nextmidas/nxm350/nxm350_showing_jdk8u20_javac_bug.tar.gz
        (the original project has been simplified in order to make it easier to reproduce).

        Then:

        1. extract tarball
        2. cd to directory (nxmxxx)
        3. javac -classpath . -source 1.6 nxm/sys/lib/KeyObject.java

        I think one of the key thing here is the use of -source 1.6 or -or-
        -source 1.7 when using JDK 8u20's javac.

              mcimadamore Maurizio Cimadamore
              mcimadamore Maurizio Cimadamore
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

                Created:
                Updated:
                Resolved: