-
Enhancement
-
Resolution: Fixed
-
P3
-
None
-
None
See https://mail.openjdk.java.net/pipermail/core-libs-dev/2019-July/061268.html
A few ideas of potential clean up:
1. ClassLoader::sys_paths is the library path for boot loader whereas ClassLoader::usr_paths is the library path for user-defined loaders
We should consider refactoring the native library loading implementation
such that ClassLoader::loadLibrary can delegate to BootLoader::loadLibrary
and the permission checks for user-defined loader is not needed for the boot loader. So BootLoader::loadLibrary can further be optimized.
2. This refactoring enables Panama LibraryLookup to load a native library without the limitation to restrict only lookups from the same class loader can access functions from a native library.
JDK-8236075 has addressed the potential race in initializing sys_paths and usr_paths.
A few ideas of potential clean up:
1. ClassLoader::sys_paths is the library path for boot loader whereas ClassLoader::usr_paths is the library path for user-defined loaders
We should consider refactoring the native library loading implementation
such that ClassLoader::loadLibrary can delegate to BootLoader::loadLibrary
and the permission checks for user-defined loader is not needed for the boot loader. So BootLoader::loadLibrary can further be optimized.
2. This refactoring enables Panama LibraryLookup to load a native library without the limitation to restrict only lookups from the same class loader can access functions from a native library.
- relates to
-
JDK-8231584 Deadlock with ClassLoader.findLibrary and System.loadLibrary call
-
- Closed
-
-
JDK-8240975 Extend NativeLibraries to support explicit unloading
-
- Resolved
-
-
JDK-8227587 Add internal privileged System.loadLibrary
-
- Resolved
-
-
JDK-8236075 Minor bootstrap improvements
-
- Resolved
-