requesting review on JDK-8348828: Windows dll loading now resolves symlinks

Benjamin Peterson benjamin at engflow.com
Tue Feb 17 09:03:00 UTC 2026


Hi all, I'm gently probing this again. Since I started this thread,
some test cases were added to the PR. Then, a discussion with security
was privately opened:
https://github.com/openjdk/jdk/pull/24694#issuecomment-3419516424 I
realize some of this must be necessarily opaque to me, but I'm
wondering if any comment can be made about how far away the light at
the end of the tunnel is.

Regards,
Benjamin

On Tue, Oct 7, 2025 at 8:15 AM Benjamin Peterson <benjamin at engflow.com> wrote:
>
> I've had a PR for the native library loading code up for a months that
> I'd appreciate any review on:
> https://github.com/openjdk/jdk/pull/24694
>
> To summarize the issue and proposed fix: Before OpenJDK 24,
> System.loadLibrary on Windows passed symbolic links unresolved to the
> underlying LoadLibrary function. JDK-8003887 caused symbolic links to
> be resolved by Java before the system LoadLibrary function.
> Unfortunately, LoadLibrary is clever and may mangle the filename
> passed to it, which means passing a symlink may not have the same
> behavior as presenting the fully resolved path. I propose to fix this
> problem in the PR by disabling LoadLibrary's clever mangling behavior.
>
> Thank you for your time,
> Benjamin


More information about the core-libs-dev mailing list