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

runtime/jni/atExit/TestAtExit.java should be supported on static JDK

XMLWordPrintable

    • Icon: Enhancement Enhancement
    • Resolution: Fixed
    • Icon: P4 P4
    • 25
    • None
    • hotspot
    • None
    • b10

      The libstExit native is currently explicitly linked with `libjvm.so` due to the direct JNI_GetDefaultJavaVMInitArgs usage in test/hotspot/jtreg/runtime/jni/atExit/libatExit.c. The direct call to JNI_GetDefaultJavaVMInitArgs in libatExit.c has no issue when running on static JDK, however requiring explicitly linking with `libjvm.so` is problematic with static JDK support:

      1. There is no libjvm.so in static-jdk. One could try to link a libjvm.so from a 'regulard' JDK image. However, at runtime a libjvm.so does not exist when running on static JDK.
      2. There is no need to link libExit with a static libjvm.a either. The JNI_GetDefaultJavaVMInitArgs symbol can be resolved from the main executable, as libjvm.a is statically linked with the launcher executable.

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

              Created:
              Updated:
              Resolved: