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

Goetz Lindenmaier goetz at openjdk.java.net
Tue Mar 8 17:03:17 UTC 2022


On Tue, 8 Mar 2022 07:59:10 GMT, Goetz Lindenmaier <goetz at openjdk.org> wrote:

> 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.

Thanks for the review!
I think adding the log output is a bit lost, as all the related logs are missing in 11, as e.g. 
"Loaded library %s"
"Unloaded library with handle "

As for the comment ... I did not find an appropriate place. The code is split into several classes after the reengineering.

Pre-submit failures: dependencies missing

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

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


More information about the jdk-updates-dev mailing list