[8u] RFR 8225425: java.lang.UnsatisfiedLinkError: net.dll: Can't find dependent libraries
Andrew John Hughes
gnu.andrew at redhat.com
Thu Sep 12 02:55:47 UTC 2019
On 10/09/2019 19:47, Aleksey Shipilev wrote:
> Original bug:
> https://bugs.openjdk.java.net/browse/JDK-8230573
> https://hg.openjdk.java.net/jdk/jdk/rev/56df9a08ed9c
>
> 11u fix (would be handy for URIBuilder, see below):
> https://hg.openjdk.java.net/jdk-updates/jdk11u/rev/343f922e2fbe
>
> This is in 8u231, so it is important to get it into jdk8u232. Ivan, Chris, can you eyeball it too,
> please?
That alone isn't really a reason for critical inclusion. There are other
changes that have had to be deferred to 8u242. However, this looks ok
for 8u232.
>
> The patch does not apply cleanly, because build system is different, the context is different, test
> library layout is different, URIBuilder is not there, etc.
>
> 8u webrev:
> https://cr.openjdk.java.net/~shade/8225425/webrev.8u.01/
>
> Notable changes w.r.t. original fix:
>
> *) The build system fix goes into make/lib/NetworkingLibraries.gmk, not in make/lib/Lib-java.base.gmk
>
Looks fine, matches the original backport of the security fix where
urlmon was added.
> *) src/java.base/windows/native/libnet/NTLMAuthentication.c failed to apply, because "LPCWSTR
> bstrURL;" was in context. Had to reapply the entire patch to that file by hand.
>
diff suggests this went well :)
> *) test/lib/jdk/test/lib/net/URIBuilder.java put into location that fits 8u.
>
The diff I'm looking at has it at that same location:
$ diffstat -p0 8225425.8u
new/make/lib/NetworkingLibraries.gmk
| 2
new/src/windows/classes/sun/net/www/protocol/http/ntlm/NTLMAuthentication.java | 14
new/src/windows/native/sun/net/www/protocol/http/ntlm/NTLMAuthentication.c | 32 +
new/test/lib/jdk/test/lib/net/URIBuilder.java
| 111 +++++
new/test/sun/net/www/protocol/http/TestTransparentNTLM.java
| 196 ++++++++++
5 files changed, 349 insertions(+), 6 deletions(-)
The right location would seem to be
jdk/test/lib/testlibrary/jdk/testlibrary/net as
jdk/test/lib/testlibrary/jdk/testlibrary/ houses JDKToolLauncher.java,
which is in test/lib/jdk/test/lib/ in trunk.
Why is this being backported as part of this and not a backport of
https://bugs.openjdk.java.net/browse/JDK-8220575 which would also mean
we get the advantages of introducing this helper class in other tests?
> *) test/sun/net/www/protocol/http/TestTransparentNTLM.java has several changes:
>
> Fit new location of URIBuilder:
> 30 * @library ../../../../../lib/
>
> Read the InputStream without readAllBytes method (added in 9):
> 85 InputStream is = uc.getInputStream();
> 86 byte[] buf = new byte[1024];
> 87 while (is.read(buf) != -1) {};
>
This conversion loses the output of the read data. Something closer to
the original would be along the lines of:
InputStream is = uc.getInputStream();
BufferedReader r = new BufferedReader(new InputStreamReader(is, UTF_8);
String body = r.readLine();
out.print("received body: " + body);
while (body != null) { body = r.readLine(); out.print(body); }
> Testing: new test on Windows, jdk_security on Windows; eyeballing net.dll dependencies before/after
> the fix -- urlmon.dll is indeed gone; Linux x86_64 tier1
>
--
Andrew :)
Senior Free Java Software Engineer
Red Hat, Inc. (http://www.redhat.com)
PGP Key: ed25519/0xCFDA0F9B35964222 (hkp://keys.gnupg.net)
Fingerprint = 5132 579D D154 0ED2 3E04 C5A0 CFDA 0F9B 3596 4222
https://keybase.io/gnu_andrew
More information about the jdk8u-dev
mailing list