JDK-8303069: Memory leak in CompilerOracle::parse_from_line#13060
JDK-8303069: Memory leak in CompilerOracle::parse_from_line#13060dafedafe wants to merge 1 commit intoopenjdk:masterfrom
Conversation
|
👋 Welcome back dafedafe! A progress list of the required criteria for merging this PR into |
|
@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.javatest.This happens when parsing the blackhole CompileCommand. There is a check for the
-XX:+UnlockExperimentalVMOptionsflag 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_commandswhere 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
matcherobject 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
gitCheckout this PR locally:
$ git fetch https://git.openjdk.org/jdk pull/13060/head:pull/13060$ git checkout pull/13060Update a local copy of the PR:
$ git checkout pull/13060$ git pull https://git.openjdk.org/jdk pull/13060/headUsing Skara CLI tools
Checkout this PR locally:
$ git pr checkout 13060View PR using the GUI difftool:
$ git pr show -t 13060Using diff file
Download this PR as a diff file:
https://git.openjdk.org/jdk/pull/13060.diff