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!)