Repository navigation
Define NativeLibraries.load so java.nio.file works on macOS - #16
Merged
Merged
Conversation
OpenLDK didn't define the native NativeLibraries.load, so on macOS the
first BootLoader.loadLibrary("nio") signalled UNDEFINED-FUNCTION. That
is reached from the first use of java.nio.file (FileSystems.getDefault
initializes UnixNativeDispatcher) and from MessageDigest.getInstance,
since java.security.Security reads its master file through Path.of.
Only macOS gets there. NativeLibraries skips a library file that isn't
present only when ClassLoaderHelper.loadLibraryOnlyIfPresent() is true,
and on macOS 11 and later it is false because of dyld's shared cache, so
load is called without checking for the file.
OpenLDK's natives are Lisp functions, so there is no library to load:
return false, which the JDK treats as an absent library and
BootLoader.loadLibrary ignores, as on Linux. aaa/digest.java checks an
MD5 digest.
burinc
added a commit
to jlt-commons/jolt-openldk
that referenced
this pull request
Oct 14, 2026
…fix, sent upstream as atgreen/openldk#16
This was referenced Oct 14, 2026
atgreen
added a commit
that referenced
this pull request
Oct 18, 2026
PRs #16, #17 and #18 each added a testsuite case (aaa/digest, aaa/zlib, aaa/instant). check-regression.sh only fails on lost passes and new failures, so a new test is not actually enforced until it is in the baseline. Core suites now 501 expected passes, up from 492; no test changed state. Co-Authored-By: Claude Opus 5 (1M context) <[email protected]>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
On macOS, the first use of
java.nio.filesignals UNDEFINED-FUNCTION for the nativeNativeLibraries.load. That includesMessageDigest.getInstance, sinceSecurityreads its master file throughPath.of.UnixNativeDispatcher.<clinit>callsBootLoader.loadLibrary("nio"), and on macOS 11+ClassLoaderHelper.loadLibraryOnlyIfPresent()is false, so the JDK callsloadwithout checking for the file. Linux checks for the file first and never gets that far.OpenLDK's natives are Lisp, so there is no library to load.
loadnow returns false, which the JDK treats as an absent library, the same as on Linux.On macOS arm64 (JDK 25.0.2),
make check-regressiongoes from 485 to 492 core passes, the baseline:aaa/h005,gcj/md5testandgcj/shatestnow pass, and nothing regresses. The newaaa/digest.javachecks an MD5 digest. Unit tests andocicl lintmatch master. Not run on Linux.