-
Notifications
You must be signed in to change notification settings - Fork 6.1k
8369946: Bytecode rewriting causes Java heap corruption on PPC #27867
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
8369946: Bytecode rewriting causes Java heap corruption on PPC #27867
Conversation
|
👋 Welcome back mdoerr! A progress list of the required criteria for merging this PR into |
|
@TheRealMDoerr 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 50 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 |
|
@TheRealMDoerr The following label will be automatically applied to this pull request:
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. |
Webrevs
|
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.
Hi Martin,
nasty bug this is. Thanks for doing the fixing on ppc. And great work by Justin finding it!
I see that we've missed porting previous fixes to ppc that prevent reordering of the bytecode load with loads from ResolvedFieldEntry and -MethodEntry (JDK-8248219 and JDK-8327647). Now this is done in load_field_or_method_entry().
The change is good. The comment could be improved a little bit.
Thanks, Richard.
Co-authored-by: Richard Reingruber <[email protected]>
|
Thanks for the reviews! I'll start working on backports. |
|
Going to push as commit 6bf3581.
Your commit was automatically rebased without conflicts. |
|
@TheRealMDoerr Pushed as commit 6bf3581. 💡 You may see a message that your pull request was closed with unmerged commits. This can be safely ignored. |
Like the aarch64 fix (#27748).
PPC64 has additional requirements:
fast_invokevfinalwhich usesResolvedMethodEntry.I've refactored
load_field_entryandload_method_entryinto a common function and added support for rewritten "fast" Bytecodes. I'm usingisyncinstructions because we already have a control dependency (via Bytecode dispatch).The
isyncinstruction is relatively cheap in comparison to other memory barriers, but still introduces some performance loss. SPEC jvm98 with -Xint shows about 5% regression incompresssub-benchmark. The other sub-benchmarks are not significantly impacted. However, switching offRewriteBytecodeswould cause a much higher performance loss.Note: I had also ported the
verify_field_offsetcheck and used it in the fastdebug and product build for testing, but couldn't catch any issue. Not included in this PR. I'm not planning to contribute it.Progress
Issue
Reviewers
Reviewing
Using
gitCheckout this PR locally:
$ git fetch https://git.openjdk.org/jdk.git pull/27867/head:pull/27867$ git checkout pull/27867Update a local copy of the PR:
$ git checkout pull/27867$ git pull https://git.openjdk.org/jdk.git pull/27867/headUsing Skara CLI tools
Checkout this PR locally:
$ git pr checkout 27867View PR using the GUI difftool:
$ git pr show -t 27867Using diff file
Download this PR as a diff file:
https://git.openjdk.org/jdk/pull/27867.diff
Using Webrev
Link to Webrev Comment