-
Enhancement
-
Resolution: Fixed
-
P4
-
19
-
None
More clean up in NativeLibraryImpl and Unloader that are used for JNI library only. RawNativeLibraries implements its own native load and unload methods.
This is to follow up the feedback on NativeLibraries::load:
https://mail.openjdk.java.net/pipermail/core-libs-dev/2022-February/086285.html
NativeLibraries::load calls JVM_LoadLibrary which will throw UnsatisfiedLinkError if it fails to load a native library and throwExceptionIfFail is true. The return value is important for the JNI case
and calling System::loadLibrary on the system with dynamic linker cache (Big Sur) where throwExceptionIfFail is false. JNI_TRUE return value for non-JNI case (i.e. raw library library mechanism) is confusing to the readers. That should be fixed. We should further clean up and have RawNativeLibraries to have its own native load and unload methods.
This is to follow up the feedback on NativeLibraries::load:
https://mail.openjdk.java.net/pipermail/core-libs-dev/2022-February/086285.html
NativeLibraries::load calls JVM_LoadLibrary which will throw UnsatisfiedLinkError if it fails to load a native library and throwExceptionIfFail is true. The return value is important for the JNI case
and calling System::loadLibrary on the system with dynamic linker cache (Big Sur) where throwExceptionIfFail is false. JNI_TRUE return value for non-JNI case (i.e. raw library library mechanism) is confusing to the readers. That should be fixed. We should further clean up and have RawNativeLibraries to have its own native load and unload methods.
- relates to
-
JDK-8281335 Allow a library already loaded via System::loadLibrary to be loaded as a raw library
-
- Closed
-
-
JDK-8282608 RawNativeLibraryImpl can't be passed to NativeLibraries::findEntry0
-
- Closed
-