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

JVM fails to start when AOTClassLinking is used with unverifiable old classes

XMLWordPrintable

    • master

        If an application runs with an AOTCache produced with -XX:+AOTClassLinking, and the app contains code like this, where BadOldClassA is below version 50, and

                Class c = BadOldClassA.class;
                Object n = new Object();
                if (c.isInstance(n)) {
                    throw new RuntimeException("Must not succeed");
                }

        The application will fail during JVM bootstrap:

        [0.225s][error][cds ] java.lang.VerifyError: (class: BadOldClassA, method: doit signature: ()Ljava/lang/String;) Wrong return type in function
        Error occurred during initialization of VM
        Unexpected exception when loading aot-linked classes.
        =============================
        Work-around: use -XX:-AOTClassLinking if your application contains unverifiable classes (or don't run such applications!)

              iklam Ioi Lam
              iklam Ioi Lam
              Votes:
              0 Vote for this issue
              Watchers:
              7 Start watching this issue

                Created:
                Updated:
                Resolved: