java/lang/invoke/MethodTypeSecurityManager.java fails with "should never leak JDK internal class" when running with AOT cache built with AOTClassLinking enabled.
Steps to reproduce:
> TESTED_JAVA/bin/java -XX:AOTMode=create -XX:AOTConfiguration=TESTED_JAVA/lib/classlist -XX:+AOTClassLinking -XX:AOTCache=app.aot
> jib.sh make -- run-test TEST="java/lang/invoke/MethodTypeSecurityManager.java"
TEST_VM_OPTS="-XX:AOTCache=FULL_PATH/app.aot"
No issue in case AOTClassLinking is disabled during the cache creation.
Steps to reproduce:
> TESTED_JAVA/bin/java -XX:AOTMode=create -XX:AOTConfiguration=TESTED_JAVA/lib/classlist -XX:+AOTClassLinking -XX:AOTCache=app.aot
> jib.sh make -- run-test TEST="java/lang/invoke/MethodTypeSecurityManager.java"
TEST_VM_OPTS="-XX:AOTCache=FULL_PATH/app.aot"
No issue in case AOTClassLinking is disabled during the cache creation.