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

Remove explicit libjvm.so dependency for libVThreadEventTest

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: P4 P4
    • 25
    • None
    • hotspot
    • None
    • b13

      When running test/hotspot/jtreg/serviceability/jvmti/vthread/VThreadEventTest/VThreadEventTest.java on static JDK, it fails due to missing libjvm.so:

      ```
      TEST RESULT: Failed. Execution failed: `main' threw exception: com.sun.tools.attach.AgentLoadException: Failed to load agent library: VThreadEventTest was not loaded. libjvm.so: cannot open shared object file: No such file or directory
      ```

      Looking at libVThreadEventTest.cpp, I think the only reason for explicitly linking with `libjvm.so` is the direct function call to `JNI_GetCreatedJavaVMs` from `Agent_OnAttach`. And there is no need to call `JNI_GetCreatedJavaVMs` since `Agent_OnAttach` already has the `vm` arg.

            jiangli Jiangli Zhou
            jiangli Jiangli Zhou
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated:
              Resolved: