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

Always disable Java agents for "java -Xshare:dump"

XMLWordPrintable

    • Icon: Enhancement Enhancement
    • Resolution: Unresolved
    • Icon: P4 P4
    • None
    • None
    • hotspot

      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. See JDK-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.

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

              Created:
              Updated: