Uploaded image for project: 'JDK'
  1. JDK
  2. JDK-8296472 Remove ObjectLocker around appendToClassPathForInstrumentation call
  3. JDK-8297073

Release Note: appendToClassPathForInstrumentation Must Be Used in a Thread-Safe Manner

    XMLWordPrintable

Details

    Description

      When running an application with a Java agent (e.g. `-javaagent:myagent.jar`) and a custom system class loader (e.g.
      `-Djava.system.class.loader=MyClassLoader`), and the Java agent invokes the `Instrumentation.appendToSystemClassLoaderSearch` API to append to the class loader search, then the custom system class loader `appendToClassPathForInstrumentation` method will be invoked to add the JAR file to the custom system class loader's search path.

      The JVM no longer synchronizes on the custom class loader while calling `appendToClassPathForInstrumentation`. The `appendToClassPathForInstrumentation` method in the custom class loader must add to the class search path in a thread-safe manner.

      Attachments

        Activity

          People

            coleenp Coleen Phillimore
            coleenp Coleen Phillimore
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: