-
Notifications
You must be signed in to change notification settings - Fork 223
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
8331735: UpcallLinker::on_exit races with GC when copying frame anchor #3434
Conversation
👋 Welcome back andrew! A progress list of the required criteria for merging this PR into |
@gnu-andrew 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 1 new commit pushed to the
Please see this link for an up-to-date comparison between the source branch of this pull request and the ➡️ To integrate this PR with the above commit message to the |
This backport pull request has now been updated with issues from the original commit. |
/issue remove 8343144 |
@gnu-andrew |
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.
Thanks for contributing this backport. Looks good to me.
|
Thanks Martin. /approval request Partial backport of a fix for a race condition in the FFM API. Can lead to crashes when the FFM code manipulates a frame anchor in native mode, which the GC does not expect to happen. Fix is to move the frame anchor copying to Java mode, where the GC will wait for the thread to get to a safepoint. Risk to other code is low as the UpcallLinker is only used by FFM, which is in incubation in 17u. |
@gnu-andrew |
/approval request Partial backport of a fix for a race condition in the FFM API. Can lead to crashes when the FFM code manipulates a frame anchor in native mode, which the GC does not expect to happen. Fix is to move the frame anchor copying to Java mode, where the GC will wait for the thread to get to a safepoint. Risk to other code is low as the UpcallLinker is only used by FFM, which is in incubation in 17u. Patch has been reviewed by Martin Balao. |
@gnu-andrew |
/integrate |
Going to push as commit 8ea7310.
Your commit was automatically rebased without conflicts. |
@gnu-andrew Pushed as commit 8ea7310. 💡 You may see a message that your pull request was closed with unmerged commits. This can be safely ignored. |
Partial backport of a fix for a race condition in code adapted from JavaCallWrapper for the FFM API. This is more visible in 22 and later, where FFM is fully supported and the OpenType implementation using HarfBuzz has been ported to use it.
However, the copy in the native state seems to have been introduced as far back as JDK-8269240 in 17 when the JavaCallWrapper code was ported to what was then universalUpcallHandler.cpp. That fix to
::on_exit
is included here.The other hunk in the 24 and 21u versions is omitted as the
::on_entry
method has not been modified by JDK-8272526 which is what moved the thread exception handling to native code.Progress
Issues
Reviewers
Reviewing
Using
git
Checkout this PR locally:
$ git fetch https://git.openjdk.org/jdk17u-dev.git pull/3434/head:pull/3434
$ git checkout pull/3434
Update a local copy of the PR:
$ git checkout pull/3434
$ git pull https://git.openjdk.org/jdk17u-dev.git pull/3434/head
Using Skara CLI tools
Checkout this PR locally:
$ git pr checkout 3434
View PR using the GUI difftool:
$ git pr show -t 3434
Using diff file
Download this PR as a diff file:
https://git.openjdk.org/jdk17u-dev/pull/3434.diff
Using Webrev
Link to Webrev Comment