-
Notifications
You must be signed in to change notification settings - Fork 5.6k
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
8333722: Fix CompilerDirectives for non-compiler JVM variants #19578
8333722: Fix CompilerDirectives for non-compiler JVM variants #19578
Conversation
👋 Welcome back simonis! A progress list of the required criteria for merging this PR into |
@simonis 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 17 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. ➡️ To integrate this PR with the above commit message to the |
I fixed the typo in the bug's synopsis. The easiest way to update this PR to match is: |
/issue JDK-8333722 |
Thanks @dcubed-ojdk ! |
@simonis This issue is referenced in the PR title - it will now be updated. |
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.
Okay.
Thanks @vnkozlov ! |
/integrate |
Going to push as commit 5f9d3e3.
Your commit was automatically rebased without conflicts. |
/backport jdk:jdk23 |
@simonis the backport was successfully created on the branch backport-simonis-5f9d3e3a-jdk23 in my personal fork of openjdk/jdk. To create a pull request with this backport targeting openjdk/jdk:jdk23, just click the following link: The title of the pull request is automatically filled in correctly and below you find a suggestion for the pull request body:
If you need to update the source branch of the pull then run the following commands in a local clone of your personal fork of openjdk/jdk:
|
DirectivesStack::getMatchingDirective()
relies on the fact that the default directives set is always enabled. And that's indeed the case for normal builds with C1 and C2 compilers (seeDirectivesStack::init()
incompilerDirectives.cpp
):However, if we're building a JVM configuration without compilers (e.g.
--with-jvm-variants=core
), this is not the case andDirectivesStack::getMatchingDirective()
will return the base directive set without incrementing the reference count of its directive:If this directive set will be released, it will delete the corresponding base directive and subsequent usages of the base directive will lead to a segmentation fault.
After JDK-8329421: Native methods can not be selectively printed which replaced the call to
by
in
sharedRuntime.cpp
this issue is now triggered at JVM startup for non-compiler configurations when native wrappers are generated (see #18567 (comment)).The fix is trivial. Just increment the reference count of a compiler directive in
DirectivesStack::getMatchingDirective()
if it is the base directive, even if it is not enabled.Progress
Issue
Reviewers
Reviewing
Using
git
Checkout this PR locally:
$ git fetch https://git.openjdk.org/jdk.git pull/19578/head:pull/19578
$ git checkout pull/19578
Update a local copy of the PR:
$ git checkout pull/19578
$ git pull https://git.openjdk.org/jdk.git pull/19578/head
Using Skara CLI tools
Checkout this PR locally:
$ git pr checkout 19578
View PR using the GUI difftool:
$ git pr show -t 19578
Using diff file
Download this PR as a diff file:
https://git.openjdk.org/jdk/pull/19578.diff
Webrev
Link to Webrev Comment