Skip to content

8315135: Memory leak in the native implementation of Pack200.Unpacker.unpack() #361

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
wants to merge 1 commit into from

Conversation

simonis
Copy link
Member

@simonis simonis commented Aug 30, 2023

Hi all,

This pull request contains a backport of commit b77c161e from the openjdk/jdk11u-dev repository.

The commit being backported was authored by Volker Simonis on 30 Aug 2023 and was reviewed by Christoph Langer and Thomas Stuefe.

The backport applies cleanly except for the usual 11/8 directory shuffling and the following cosmetic context change in jni.cpp:

> --- a/jdk/src/share/native/com/sun/java/util/jar/pack/jni.cpp
> +++ b/jdk/src/share/native/com/sun/java/util/jar/pack/jni.cpp
58c58
<    CHECK_EXCEPTION_RETURN_VALUE(uPtr, 0);
---
>    CHECK_EXCEPTION_RETURN_VALUE(uPtr, NULL);

Thanks!


Progress

  • Change must not contain extraneous whitespace
  • Commit message must refer to an issue

Issue

  • JDK-8315135: Memory leak in the native implementation of Pack200.Unpacker.unpack() (Bug - P3)

Reviewers

Reviewing

Using git

Checkout this PR locally:
$ git fetch https://git.openjdk.org/jdk8u-dev.git pull/361/head:pull/361
$ git checkout pull/361

Update a local copy of the PR:
$ git checkout pull/361
$ git pull https://git.openjdk.org/jdk8u-dev.git pull/361/head

Using Skara CLI tools

Checkout this PR locally:
$ git pr checkout 361

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

Using diff file

Download this PR as a diff file:
https://git.openjdk.org/jdk8u-dev/pull/361.diff

Webrev

Link to Webrev Comment

@bridgekeeper
Copy link

bridgekeeper bot commented Aug 30, 2023

👋 Welcome back simonis! 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 openjdk bot changed the title Backport b77c161e7509aa3b09ebf3e6b2b1490c0667bbdc 8315135: Memory leak in the native implementation of Pack200.Unpacker.unpack() Aug 30, 2023
@openjdk
Copy link

openjdk bot commented Aug 30, 2023

This backport pull request has now been updated with issue from the original commit.

@openjdk openjdk bot added backport rfr Pull request is ready for review labels Aug 30, 2023
@mlbridge
Copy link

mlbridge bot commented Aug 30, 2023

Webrevs

@simonis
Copy link
Member Author

simonis commented Aug 31, 2023

/clean

@openjdk openjdk bot added the clean label Aug 31, 2023
@openjdk
Copy link

openjdk bot commented Aug 31, 2023

@simonis This backport pull request is now marked as clean

@openjdk
Copy link

openjdk bot commented Aug 31, 2023

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

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

8315135: Memory leak in the native implementation of Pack200.Unpacker.unpack()

Reviewed-by: andrew

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 2 new commits pushed to the master branch:

  • 33db95b: 8315280: Bump update version of OpenJDK: 8u402
  • bbc068f: 8206179: com/sun/management/OperatingSystemMXBean/GetCommittedVirtualMemorySize.java fails with Committed virtual memory size illegal value

Please see this link for an up-to-date comparison between the source branch of this pull request and the master branch.
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 ready Pull request is ready to be integrated label Aug 31, 2023
Copy link
Member

@gnu-andrew gnu-andrew left a comment

Choose a reason for hiding this comment

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

Backport looks ok (though not clean due to the context difference)

@simonis
Copy link
Member Author

simonis commented Sep 1, 2023

Thanks @gnu-andrew! Regarding the "clean" label, I was a little confused by the following line in the OpenJDK Backports Wiki:

A backport commit is considered clean if the changes in the original commit are identical to the changes in the backport commit. Note that only the changes have to be identical, not the changed lines.

And I actually still don't fully understand what exactly "Note that only the changes have to be identical, not the changed lines" means?

@simonis
Copy link
Member Author

simonis commented Sep 1, 2023

/integrate

@openjdk
Copy link

openjdk bot commented Sep 1, 2023

Going to push as commit 6632d0a.
Since your change was applied there have been 2 commits pushed to the master branch:

  • 33db95b: 8315280: Bump update version of OpenJDK: 8u402
  • bbc068f: 8206179: com/sun/management/OperatingSystemMXBean/GetCommittedVirtualMemorySize.java fails with Committed virtual memory size illegal value

Your commit was automatically rebased without conflicts.

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

openjdk bot commented Sep 1, 2023

@simonis Pushed as commit 6632d0a.

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

@gnu-andrew
Copy link
Member

gnu-andrew commented Sep 1, 2023

Thanks @gnu-andrew! Regarding the "clean" label, I was a little confused by the following line in the OpenJDK Backports Wiki:

A backport commit is considered clean if the changes in the original commit are identical to the changes in the backport commit. Note that only the changes have to be identical, not the changed lines.

And I actually still don't fully understand what exactly "Note that only the changes have to be identical, not the changed lines" means?

It's the first time I've seen that myself and I agree it's confusing. I think the intention may be to imply that it's clean if you make the same code changes even if they are in a different place in the file or even a different file. To me, that would be going a bit far.

The approach I've always used, even before we used GitHub and Skara, is that a backport is clean if it can be automated by tools i.e. if you apply the shuffle script, and then run patch, and it applies, it is clean. If you have to open a file and apply any hunks manually, that is not clean.

Even the former can be problematic if patch fuzzes the change into the wrong place, so I would be cautious even in those cases. That's why I actually quite like that 8u doesn't automatically add clean and patches do get a once over from a real human :) As someone has to approve anyway, I don't think it's really much extra work.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
backport clean integrated Pull request has been integrated
Development

Successfully merging this pull request may close these issues.

2 participants