RFR: 8281335: Allow a library already loaded via System::loadLibrary to be loaded as a raw library
Mandy Chung
mchung at openjdk.java.net
Thu Feb 10 23:34:43 UTC 2022
This patch removes the restriction in the raw library loading mechanism that does not allow mix-n-match of loading a library as a JNI library and as a raw library.
The raw library loading mechanism is designed for panama to load native library essentially equivalent to dlopen/dlclose calls independent of JNI library loading. If a native library is loaded as a JNI library and a raw library, it will get different NativeLibrary instances. When a class loader is being unloaded, JNI_Unload will be invoked but the native library may not be unloaded until NativeLibrary::unload is explicitly called for the raw library.
-------------
Commit messages:
- Allow raw libraries to be loaded even if it's loaded via System::loadLibrary
Changes: https://git.openjdk.java.net/jdk/pull/7435/files
Webrev: https://webrevs.openjdk.java.net/?repo=jdk&pr=7435&range=00
Issue: https://bugs.openjdk.java.net/browse/JDK-8281335
Stats: 324 lines in 4 files changed: 191 ins; 115 del; 18 mod
Patch: https://git.openjdk.java.net/jdk/pull/7435.diff
Fetch: git fetch https://git.openjdk.java.net/jdk pull/7435/head:pull/7435
PR: https://git.openjdk.java.net/jdk/pull/7435
More information about the core-libs-dev
mailing list