[jdk11u] RFR: 8275703: System.loadLibrary fails on Big Sur for libraries hidden from filesystem

Goetz Lindenmaier goetz at openjdk.java.net
Tue Mar 8 08:09:36 UTC 2022


I backport this for parity with 11.0.15-oracle.

The code touched was completely reworked in jdk15 by "8228336: Refactor native library loading implementation"

make/test/JtregNativeJdk.gmk
Trivial resolve due to context.

src/hotspot/share/prims/jvm.cpp
Applies clean, but does not compile.
I removed "log_info(library)("Failed to load library %s", name);"
Logging was only added to this file in jdk15 with "8187305: Add logging for shared library loads/unloads"

Changes to 
src/java.base/macosx/classes/jdk/internal/loader/ClassLoaderHelper.java
applied to 
src/java.base/macosx/classes/java/lang/ClassLoaderHelper.java
Fits well.

Changes to 
src/java.base/share/classes/jdk/internal/loader/NativeLibraries.java
applied to class NativeLibrary in java/lang/ClassLoader.java.
I had to modify the code.

Changes to 
src/java.base/share/native/libjava/NativeLibraries.c
applied to 
src/java.base/share/native/libjava/ClassLoader.c
Fits acceptable.

Changes to
src/java.base/unix/classes/jdk/internal/loader/ClassLoaderHelper.java
applied to 
src/java.base/unix/classes/java/lang/ClassLoaderHelper.java
Fits well.

Changes to
src/java.base/windows/classes/jdk/internal/loader/ClassLoaderHelper.java
applied to 
src/java.base/windows/classes/java/lang/ClassLoaderHelper.java
Fits well.

SAP testing passed.

-------------

Commit messages:
 - Backport 6aa02d75d9f26f46fbdb54aef52cea3257aa7462

Changes: https://git.openjdk.java.net/jdk11u/pull/30/files
 Webrev: https://webrevs.openjdk.java.net/?repo=jdk11u&pr=30&range=00
  Issue: https://bugs.openjdk.java.net/browse/JDK-8275703
  Stats: 189 lines in 10 files changed: 167 ins; 0 del; 22 mod
  Patch: https://git.openjdk.java.net/jdk11u/pull/30.diff
  Fetch: git fetch https://git.openjdk.java.net/jdk11u pull/30/head:pull/30

PR: https://git.openjdk.java.net/jdk11u/pull/30


More information about the jdk-updates-dev mailing list