Skip to content

Conversation

@jaikiran
Copy link
Member

@jaikiran jaikiran commented Feb 14, 2025

Can I please get a review of this change which proposes to properly close the Inflater instance used in jdk.internal.jimage.decompressor.ZipDecompressor.decompress() method? This addresses https://bugs.openjdk.org/browse/JDK-8349909.

As noted in that issue, in the exceptional case in the decompress() method, the Inflater instance isn't currently being closed. The commit in this PR uses a try/finally block to end() the Inflater instance.

Unlike some other places within the JDK, the code in jdk.internal.jimage.decompressor.ZipDecompressor is expected to maintain Java 8 (API) compatibility, so this part of the code cannot use the newly introduced Inflater.close() method and thus cannot use the try-with-resources statement too.

No new tests have been added given the nature of this change. A noreg label has been added to the JBS issue. Existing tests in tier1, tier2 and tier3 continue to pass with this change.


Progress

  • Change must be properly reviewed (1 review required, with at least 1 Reviewer)
  • Change must not contain extraneous whitespace
  • Commit message must refer to an issue

Issue

  • JDK-8349909: jdk.internal.jimage.decompressor.ZipDecompressor does not close the Inflater in exceptional cases (Bug - P4)

Reviewers

Reviewing

Using git

Checkout this PR locally:
$ git fetch https://git.openjdk.org/jdk.git pull/23626/head:pull/23626
$ git checkout pull/23626

Update a local copy of the PR:
$ git checkout pull/23626
$ git pull https://git.openjdk.org/jdk.git pull/23626/head

Using Skara CLI tools

Checkout this PR locally:
$ git pr checkout 23626

View PR using the GUI difftool:
$ git pr show -t 23626

Using diff file

Download this PR as a diff file:
https://git.openjdk.org/jdk/pull/23626.diff

Using Webrev

Link to Webrev Comment

@bridgekeeper
Copy link

bridgekeeper bot commented Feb 14, 2025

👋 Welcome back jpai! A progress list of the required criteria for merging this PR into master will be added to the body of your pull request. There are additional pull request commands available for use with this pull request.

@openjdk
Copy link

openjdk bot commented Feb 14, 2025

@jaikiran This change now passes all automated pre-integration checks.

ℹ️ This project also has non-automated pre-integration requirements. Please see the file CONTRIBUTING.md for details.

After integration, the commit message for the final commit will be:

8349909: jdk.internal.jimage.decompressor.ZipDecompressor does not close the Inflater in exceptional cases

Reviewed-by: lancea, alanb

You can use pull request commands such as /summary, /contributor and /issue to adjust it as needed.

At the time when this comment was updated there had been 18 new commits pushed to the master branch:

  • f1258f9: 8349755: Fix corner case issues in async UL
  • b1b4828: 8350086: Inline hot Method accessors for faster task selection
  • 5e9d72e: 8350094: Linux gcc 13.2.0 build fails when ubsan is enabled
  • 2192723: 8350162: ProblemList compiler/tiered/Level2RecompilationTest.java
  • 7d11418: 8350147: Replace example in KEM class with the one from JEP 452
  • 5cf1132: 8350098: jpackage test lib erroneously will run methods without @test annotation as tests
  • 6234536: 8349915: CTW: Lots of level 3 compiles are done at level 2 after JDK-8348570
  • b6443f6: 8348347: Cleanup JavaThread subclass support in SA
  • ba6c965: 8348595: GenShen: Fix generational free-memory no-progress check
  • 3832240: 8348594: Shenandoah: Do not penalize for degeneration when not the fault of triggering heuristic
  • ... and 8 more: https://git.openjdk.org/jdk/compare/ff52859d2ad65b97c56dd19323213a0d07be47ae...master

As there are no conflicts, your changes will automatically be rebased on top of these commits when integrating. If you prefer to avoid this automatic rebasing, please check the documentation for the /integrate command for further details.

➡️ To integrate this PR with the above commit message to the master branch, type /integrate in a new comment.

@openjdk openjdk bot added the rfr Pull request is ready for review label Feb 14, 2025
@openjdk
Copy link

openjdk bot commented Feb 14, 2025

@jaikiran The following label will be automatically applied to this pull request:

  • core-libs

When this pull request is ready to be reviewed, an "RFR" email will be sent to the corresponding mailing list. If you would like to change these labels, use the /label pull request command.

@openjdk openjdk bot added the core-libs core-libs-dev@openjdk.org label Feb 14, 2025
@mlbridge
Copy link

mlbridge bot commented Feb 14, 2025

Webrevs

@openjdk openjdk bot added the ready Pull request is ready to be integrated label Feb 14, 2025
Copy link
Member Author

@jaikiran jaikiran left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you Lance for the review. tier testing with this change has completed without any related failures.

Alan @AlanBateman, would it be OK to integrate this one?

Copy link
Contributor

@AlanBateman AlanBateman left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks fine although I assume we've never had any reports of an exception here.

@jaikiran
Copy link
Member Author

Looks fine although I assume we've never had any reports of an exception here.

Right - given the nature of this tool, I doubt it would ever be an issue in practice.

Thank you for the review. I'll go ahead and integrate this now.

@jaikiran
Copy link
Member Author

/integrate

@openjdk
Copy link

openjdk bot commented Feb 17, 2025

Going to push as commit 071c8f5.
Since your change was applied there have been 18 commits pushed to the master branch:

  • f1258f9: 8349755: Fix corner case issues in async UL
  • b1b4828: 8350086: Inline hot Method accessors for faster task selection
  • 5e9d72e: 8350094: Linux gcc 13.2.0 build fails when ubsan is enabled
  • 2192723: 8350162: ProblemList compiler/tiered/Level2RecompilationTest.java
  • 7d11418: 8350147: Replace example in KEM class with the one from JEP 452
  • 5cf1132: 8350098: jpackage test lib erroneously will run methods without @test annotation as tests
  • 6234536: 8349915: CTW: Lots of level 3 compiles are done at level 2 after JDK-8348570
  • b6443f6: 8348347: Cleanup JavaThread subclass support in SA
  • ba6c965: 8348595: GenShen: Fix generational free-memory no-progress check
  • 3832240: 8348594: Shenandoah: Do not penalize for degeneration when not the fault of triggering heuristic
  • ... and 8 more: https://git.openjdk.org/jdk/compare/ff52859d2ad65b97c56dd19323213a0d07be47ae...master

Your commit was automatically rebased without conflicts.

@openjdk openjdk bot added the integrated Pull request has been integrated label Feb 17, 2025
@openjdk openjdk bot closed this Feb 17, 2025
@openjdk openjdk bot removed ready Pull request is ready to be integrated rfr Pull request is ready for review labels Feb 17, 2025
@openjdk
Copy link

openjdk bot commented Feb 17, 2025

@jaikiran Pushed as commit 071c8f5.

💡 You may see a message that your pull request was closed with unmerged commits. This can be safely ignored.

@jaikiran jaikiran deleted the 8349909 branch February 17, 2025 11:06
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

core-libs core-libs-dev@openjdk.org integrated Pull request has been integrated

Development

Successfully merging this pull request may close these issues.

3 participants