Some existing CDS tests cases use Java agents during "java -Xshare:dump" for injecting Java execution (to set up certain pre-conditions, etc). See
https://github.com/openjdk/jdk/blob/bd55d7a49514da9fa4de0d4a372956e21deab4d2/test/hotspot/jtreg/runtime/cds/appcds/javaldr/GCDuringDump.java
These tests require the diagnostic -XX:+AllowArchivingWithJavaAgent switch which can sometimes be abused and produce undesirable side effects. SeeJDK-8361725
We should remove -XX:+AllowArchivingWithJavaAgent and always disable Java agents for "java -Xshare:dump". The affected test cases should be changed to use -XX:ArchiveHeapTestClass, which is a debug-only flag so cannot be abused by product JVMs.
https://github.com/openjdk/jdk/blob/bd55d7a49514da9fa4de0d4a372956e21deab4d2/test/hotspot/jtreg/runtime/cds/appcds/javaldr/GCDuringDump.java
These tests require the diagnostic -XX:+AllowArchivingWithJavaAgent switch which can sometimes be abused and produce undesirable side effects. See
We should remove -XX:+AllowArchivingWithJavaAgent and always disable Java agents for "java -Xshare:dump". The affected test cases should be changed to use -XX:ArchiveHeapTestClass, which is a debug-only flag so cannot be abused by product JVMs.
- relates to
-
JDK-8361725 Do not load Java agent with "-Xshare:dump -XX:+AOTClassLinking"
-
- Resolved
-