[jdk21u-dev] Integrated: 8210471: GZIPInputStream constructor could leak an un-end()ed Inflater

Daniel Hu duke at openjdk.org
Sun May 11 23:30:04 UTC 2025


On Wed, 30 Apr 2025 17:33:04 GMT, Daniel Hu <duke at openjdk.org> wrote:

> Clean backport. The change ensures the Inflater in `GZIPInputStream` is ended for GC when `GZIPInputStream`'s constructor throws an exception, as prior the change the Inflater is left open in that scenario. GHA passes. Added test and test suite `test/jdk/java/util/zip` passes on linux x64. Note that the added test does not test for this specific issue; rather, it's a basic test for `GZIPInputStream`'s constructor as otherwise no test exists.

This pull request has now been integrated.

Changeset: e227f6aa
Author:    Daniel Hu <costmuch at amazon.com>
Committer: Paul Hohensee <phh at openjdk.org>
URL:       https://git.openjdk.org/jdk21u-dev/commit/e227f6aab16a4e4603723f66e8bce8f2c479f7fc
Stats:     118 lines in 2 files changed: 116 ins; 0 del; 2 mod

8210471: GZIPInputStream constructor could leak an un-end()ed Inflater

Backport-of: d9e7b7e7da98a0170d26301a4bbd61aad0127c6e

-------------

PR: https://git.openjdk.org/jdk21u-dev/pull/1725


More information about the jdk-updates-dev mailing list