RFR: 8348828: Windows dll loading now resolves symlinks
Benjamin Peterson
duke at openjdk.org
Wed May 7 23:23:52 UTC 2025
On Wed, 7 May 2025 23:02:41 GMT, Brian Burkhalter <bpb at openjdk.org> wrote:
> > > > At this point, the path to load will be `$PWD\rando` due to symlink resolution.
> > >
> > >
> > > Which is in fact correct, no?
> >
> >
> > Correct in that that's the library that should be loaded. `LoadLibrary` doesn't want to cooperate, though.
>
> So is it correct to say that the link resolution appears correct but `LoadLibrary`'s quirks cause the intended behavior to fail?
Yes. The `getCanonicalPath` canonicalization indeed produces the file pointed to by the symlink. However, in the context of `NativeLibraries`, doing path canonicalization is at best unnecessary and at worst yields the linked bug.
-------------
PR Comment: https://git.openjdk.org/jdk/pull/24694#issuecomment-2860678324
More information about the core-libs-dev
mailing list