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

Some uses of assert statements in default methods in bootclasspath cause VM crash

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: P2
    • Resolution: Not an Issue
    • Affects Version/s: 8
    • Fix Version/s: hs25
    • Component/s: hotspot
    • Labels:

      Description

      In the course of fixing JDK-8005294, versions of the patch for this fix added assert statements to a new default method in java.lang.reflect.AnnotatedElement, a type on the bootclasspath.

      Such code compiled fine. When any attempt was made to run the VM with this libraries change, the VM would exit with

          Error occurred during initialization of VM
          java.lang.UnsatisfiedLinkError: java.lang.Class.getClassLoader0()Ljava/lang/ClassLoader;
              <<no stack trace available>>

      which was interested to debug. When the asserts were removed from the code, the resulting JDK was built and run fine. The code in question, with assert statements commented out can be found at

              http://cr.openjdk.java.net/~darcy/8005294.4/

      It would be a serious limitation if asserts could not be used in default methods on the bootclasspatch. I have not investigated what other conditions, if any, are needed to trigger the problem.

        Attachments

          Issue Links

            Activity

              People

              Assignee:
              lfoltan Lois Foltan
              Reporter:
              darcy Joe Darcy
              Votes:
              0 Vote for this issue
              Watchers:
              5 Start watching this issue

                Dates

                Created:
                Updated:
                Resolved: