-
Notifications
You must be signed in to change notification settings - Fork 5.7k
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
8282194: C1: Missing side effects of dynamic constant linkage #7557
Conversation
👋 Welcome back vlivanov! A progress list of the required criteria for merging this PR into |
Forgot to mention that the problem is not specific to dynamic constants. It turns out all non-String constants are affected, because their linkage involves class loading. Custom class loaders may produce (provide no guarantees) side effects which are noticeable by an application, but not necessarily preserved across a patched constant in C1-generated code. Filed JDK-8282218 to cover such cases. |
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.
Good.
@iwanowww 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 29 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 |
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. Is it worth adding a regression test?
Thanks for the reviews, Vladimir and Tobias.
Strictly speaking, /integrate |
Going to push as commit 9332071.
Your commit was automatically rebased without conflicts. |
After JDK-8280473, C1 handles unresolved dynamic constants by performing
constant resolution at runtime and then putting the constant value into the
generated code by patching it. But it treats the not-yet-resolved constant as a
pure value, dynamic constants are produced by user-defined bootstrap methods
and there are no guarantees that they don't have any side effects.
Proposed fix conservatively kills the whole memory state after any unresolved
dynamic constant.
Testing:
Progress
Issue
Reviewers
Reviewing
Using
git
Checkout this PR locally:
$ git fetch https://git.openjdk.java.net/jdk pull/7557/head:pull/7557
$ git checkout pull/7557
Update a local copy of the PR:
$ git checkout pull/7557
$ git pull https://git.openjdk.java.net/jdk pull/7557/head
Using Skara CLI tools
Checkout this PR locally:
$ git pr checkout 7557
View PR using the GUI difftool:
$ git pr show -t 7557
Using diff file
Download this PR as a diff file:
https://git.openjdk.java.net/jdk/pull/7557.diff