[8u] RFR: 8256818: SSLSocket that is never bound or connected leaks socket resources

Hohensee, Paul hohensee at amazon.com
Thu Apr 15 19:49:19 UTC 2021


This patch needs updating. E.g., the IOException catch code in SocketImpl.java is already in 8u.

Thanks,
Paul

-----Original Message-----
From: jdk8u-dev <jdk8u-dev-retn at openjdk.java.net> on behalf of Alex Kashchenko <akashche at redhat.com>
Date: Monday, January 4, 2021 at 2:11 PM
To: "jdk8u-dev at openjdk.java.net" <jdk8u-dev at openjdk.java.net>
Subject: [8u] RFR: 8256818: SSLSocket that is never bound or connected leaks socket resources

Hi,

Please review the backport of JDK-8256818 to 8u:

Bug: https://bugs.openjdk.java.net/browse/JDK-8256818

Original change: https://github.com/openjdk/jdk/commit/93b6ab56

11u change: https://hg.openjdk.java.net/jdk-updates/jdk11u-dev/rev/8f9ce4460636

Some details on current 11u behaviour (also applicable to 8u):
https://mail.openjdk.java.net/pipermail/jdk-updates-dev/2020-December/004507.html

8u webrev: https://cr.openjdk.java.net/~akasko/jdk8u/8256818/webrev.00/

Code change to SSLSocketImpl.java applies cleanly after path change.
SSLSocketLeak.java test needs to be adapted for 8u: to get the number
of process handles on Windows native lib is required; there is no
support for building native test libs in 8u, because of this
libFileUtils.c is placed into the same directory where test is; test
is marked as "manual" and "native" and comment with details about
shared lib is added to the test; test is adapted to load shared lib
directly without going through FileUtils; changes to CheckHandles.java
are not applicable to 8u, because corresponding change JDK-8239893 is
not in 8u.

Testing: checked that added test passes on Linux and Windows, ran
jtreg:jdk/sun/security/ssl/ and jck:api/javax_net/ssl .

--
-Alex




More information about the jdk8u-dev mailing list