Skip to content
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

8284620: CodeBuffer may leak _overflow_arena #8172

Closed

Conversation

zhengyu123
Copy link
Contributor

@zhengyu123 zhengyu123 commented Apr 9, 2022

CodeBuffer is declared as StackObj, but it also has ResourceObj style new operator, to complicate thing further more, it has _overflow_arena that is C Heap allocated.

When Stack allocated CodeBuffer owns _overflow_arena, it works fine, because its destructor frees _overflow_arena. But if resource allocated CodeBuffer owns _overflow_arena, the arena is leaked, because its destructor is never called.

Test:

  • hotspot_compiler on Linux x86_64

Progress

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

Issue

Reviewers

Reviewing

Using git

Checkout this PR locally:
$ git fetch https://git.openjdk.java.net/jdk pull/8172/head:pull/8172
$ git checkout pull/8172

Update a local copy of the PR:
$ git checkout pull/8172
$ git pull https://git.openjdk.java.net/jdk pull/8172/head

Using Skara CLI tools

Checkout this PR locally:
$ git pr checkout 8172

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

Using diff file

Download this PR as a diff file:
https://git.openjdk.java.net/jdk/pull/8172.diff

@bridgekeeper
Copy link

bridgekeeper bot commented Apr 9, 2022

👋 Welcome back zgu! 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 added the rfr Pull request is ready for review label Apr 9, 2022
@openjdk
Copy link

openjdk bot commented Apr 9, 2022

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

  • hotspot-compiler

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 hotspot-compiler hotspot-compiler-dev@openjdk.org label Apr 9, 2022
@mlbridge
Copy link

mlbridge bot commented Apr 9, 2022

Webrevs

Copy link
Member

@TobiHartmann TobiHartmann left a comment

Choose a reason for hiding this comment

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

Looks reasonable to me. Another review would be good.

@openjdk
Copy link

openjdk bot commented Apr 11, 2022

@zhengyu123 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:

8284620: CodeBuffer may leak _overflow_arena

Reviewed-by: thartmann, kvn

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

  • abfd2f9: 8283710: JVMTI: Use BitSet for object marking
  • 7edd186: 8283507: Create a regression test for RFE 4287690
  • 74835f7: 8283719: java/util/logging/CheckZombieLockTest.java failing intermittently
  • 205cfb8: 8284093: Memory leak: X11SD_DisposeXImage should also free obdata
  • f4edb59: 8284567: Collapse identical catch branches in java.base
  • 40ddb75: 8284641: Doc errors in sun.security.ssl.SSLSessionContextImpl
  • 8ebea44: 8270090: C2: LCM may prioritize CheckCastPP nodes over projections
  • 755bfcb: 8284581: Serial: Remove unused GenCollectedHeap::collect_locked
  • 0c04bf8: 8284198: Undo JDK-8261137: Optimization of Box nodes in uncommon_trap
  • eb3ead9: 8284036: Make ConcurrentHashMap.CollectionView a sealed hierarchy
  • ... and 26 more: https://git.openjdk.java.net/jdk/compare/ec73c61d8fe5de15a42fc14aaf8ebe3ac9ffcae5...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 ready Pull request is ready to be integrated label Apr 11, 2022
@zhengyu123
Copy link
Contributor Author

Thanks, @TobiHartmann

Copy link
Contributor

@vnkozlov vnkozlov left a comment

Choose a reason for hiding this comment

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

Good.

@zhengyu123
Copy link
Contributor Author

Thanks, @vnkozlov

@zhengyu123
Copy link
Contributor Author

/integrate

@openjdk
Copy link

openjdk bot commented Apr 11, 2022

Going to push as commit 4d45c3e.
Since your change was applied there have been 41 commits pushed to the master branch:

Your commit was automatically rebased without conflicts.

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

openjdk bot commented Apr 11, 2022

@zhengyu123 Pushed as commit 4d45c3e.

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
hotspot-compiler hotspot-compiler-dev@openjdk.org integrated Pull request has been integrated
Development

Successfully merging this pull request may close these issues.

3 participants