-
Notifications
You must be signed in to change notification settings - Fork 5.8k
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
8320886: Unsafe_SetMemory0 is not guarded #16848
Conversation
👋 Welcome back jvernee! A progress list of the required criteria for merging this PR into |
@JornVernee please check what I have done for #16760 Maybe there is something we can pull in already on your PR here re it |
@JornVernee 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. |
@franz1981 I can not interact with PRs that have the OCA label. Once you have signed the OCA, and it is verified (label is removed), I can take a look. |
@JornVernee Fair point, in theory I work for Red Hair so it should be sorted out, let me ask @theRealAph about it First contribution ever, so forgive the naive comment |
@franz1981 No problem. I wasn't sure whether you worked for Red Hat or not. In that case, it should be enough to post a comment with I will stick to the policy of waiting until the OCA label is removed though :) |
I can tell you that @franz1981 is a Red Hat employee, and we have signed the OCA for everyone here. |
#16760 Looks more performance focused, so I think that should be addressed separately. |
I'm looking into the crash on mac P.S. the issue seems to be some missing cases in |
Webrevs
|
@JornVernee is there some "new" usage of this method such that it needs guarding? I find it interesting that in the 3+ months that the fix for JDK-8191278 was developed and reviewed, the need to include |
This function is now exposed (indirectly) through the new I went through the original review thread starting here: https://mail.openjdk.org/pipermail/hotspot-dev/2019-February/037058.html but I don't see a reference to |
@@ -969,7 +970,7 @@ address Assembler::locate_operand(address inst, WhichOperand which) { | |||
assert(which == call32_operand, "jcc has no disp32 or imm"); | |||
return ip; | |||
default: | |||
ShouldNotReachHere(); | |||
fatal("not handled: 0x0F%2X", 0xFF & *(ip-1)); |
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.
I've improved the error reporting a bit here to print out the problematic instruction. I was only able to reproduce the crash through GHA.
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 fix seems fine.
Thanks
@JornVernee 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 214 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 |
/label add hotspot-runtime |
@JornVernee |
/integrate |
Going to push as commit ce4b257.
Your commit was automatically rebased without conflicts. |
@JornVernee Pushed as commit ce4b257. 💡 You may see a message that your pull request was closed with unmerged commits. This can be safely ignored. |
/backport jdk22 |
@JornVernee the backport was successfully created on the branch backport-JornVernee-ce4b257f in my personal fork of openjdk/jdk22. To create a pull request with this backport targeting openjdk/jdk22:master, 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/jdk22:
|
See JBS issue.
Guard the memory access done in Unsafe_SetMemory0 to prevent a SIGBUS error from crashing the VM when a truncated memory mapped file is accessed.
Testing: local
InternalErrorTest
, Tier 1-5Progress
Issue
Reviewers
Reviewing
Using
git
Checkout this PR locally:
$ git fetch https://git.openjdk.org/jdk.git pull/16848/head:pull/16848
$ git checkout pull/16848
Update a local copy of the PR:
$ git checkout pull/16848
$ git pull https://git.openjdk.org/jdk.git pull/16848/head
Using Skara CLI tools
Checkout this PR locally:
$ git pr checkout 16848
View PR using the GUI difftool:
$ git pr show -t 16848
Using diff file
Download this PR as a diff file:
https://git.openjdk.org/jdk/pull/16848.diff
Webrev
Link to Webrev Comment