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

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

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Not an Issue
    • Icon: P2 P2
    • hs25
    • 8
    • hotspot

      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.

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

              Created:
              Updated:
              Resolved: