-
Notifications
You must be signed in to change notification settings - Fork 5.8k
JDK-8303069: Memory leak in CompilerOracle::parse_from_line #13060
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
Conversation
👋 Welcome back dafedafe! A progress list of the required criteria for merging this PR into |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good to me.
@dafedafe 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:
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 27 new commits pushed to the
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. As you do not have Committer status in this project an existing Committer must agree to sponsor your change. Possible candidates are the reviewers of this PR (@TobiHartmann, @jcking) but any other Committer may sponsor as well. ➡️ To flag this PR as ready for integration with the above commit message, type |
Thanks a lot @TobiHartmann @jcking for your reviews! |
/integrate |
/sponsor |
Going to push as commit 384a8b8.
Your commit was automatically rebased without conflicts. |
@TobiHartmann @dafedafe Pushed as commit 384a8b8. 💡 You may see a message that your pull request was closed with unmerged commits. This can be safely ignored. |
A memory leak has been detected using lsan when running the
compiler/blackhole/BlackholeExperimentalUnlockTest.java
test.This happens when parsing the blackhole CompileCommand. There is a check for the
-XX:+UnlockExperimentalVMOptions
flag being enabled when blackhole is used. If this flag is not set, a warning gets printed and the CompileCommand is not taken.Unfortunately this happens in
register_commands
where commands are supposed to be added to a list. In this case we bail out and the option is neither added nor deleted.jdk/src/hotspot/share/compiler/compilerOracle.cpp
Lines 310 to 313 in f629152
So, this changes deletes the
matcher
object before returning. This is done inregister_commands
(the callee) mainly because a couple of other similar checks are also done in this function.The other option would have been to move the check to the caller (the only one for this case) before
register_command
:jdk/src/hotspot/share/compiler/compilerOracle.cpp
Lines 915 to 917 in f629152
but it seemed less appropriate (no other similar checks).
Letting it handle like other experimental flags (code below) is not an option either since in this case we have to do with a
CompileCommand
.jdk/src/hotspot/share/runtime/flags/jvmFlag.cpp
Lines 112 to 118 in f629152
Progress
Issue
Reviewers
Reviewing
Using
git
Checkout this PR locally:
$ git fetch https://git.openjdk.org/jdk pull/13060/head:pull/13060
$ git checkout pull/13060
Update a local copy of the PR:
$ git checkout pull/13060
$ git pull https://git.openjdk.org/jdk pull/13060/head
Using Skara CLI tools
Checkout this PR locally:
$ git pr checkout 13060
View PR using the GUI difftool:
$ git pr show -t 13060
Using diff file
Download this PR as a diff file:
https://git.openjdk.org/jdk/pull/13060.diff