Skip to content

Conversation

@jyma22
Copy link
Contributor

@jyma22 jyma22 commented Sep 23, 2025

Hi all,

This pull request contains a backport of commit c9a469a from the openjdk/jdk repository.

The commit being backported was authored by David Holmes on Mar 30 2022 and was reviewed by Kim Barrett, Aleksey Shipilev, and Stefan Karlsson.

Testing: jtreg tier 1-3 as sanity test

Thanks!


Progress

  • Change must not contain extraneous whitespace
  • JDK-8283784 needs maintainer approval
  • Commit message must refer to an issue

Issue

  • JDK-8283784: java_lang_String::as_platform_dependent_str stores to oop in native state (Bug - P4 - Approved)

Reviewing

Using git

Checkout this PR locally:
$ git fetch https://git.openjdk.org/jdk17u-dev.git pull/3988/head:pull/3988
$ git checkout pull/3988

Update a local copy of the PR:
$ git checkout pull/3988
$ git pull https://git.openjdk.org/jdk17u-dev.git pull/3988/head

Using Skara CLI tools

Checkout this PR locally:
$ git pr checkout 3988

View PR using the GUI difftool:
$ git pr show -t 3988

Using diff file

Download this PR as a diff file:
https://git.openjdk.org/jdk17u-dev/pull/3988.diff

Using Webrev

Link to Webrev Comment

@bridgekeeper bridgekeeper bot added the oca Needs verification of OCA signatory status label Sep 23, 2025
@bridgekeeper
Copy link

bridgekeeper bot commented Sep 23, 2025

Hi @jyma22, welcome to this OpenJDK project and thanks for contributing!

We do not recognize you as Contributor and need to ensure you have signed the Oracle Contributor Agreement (OCA). If you have not signed the OCA, please follow the instructions. Please fill in your GitHub username in the "Username" field of the application. Once you have signed the OCA, please let us know by writing /signed in a comment in this pull request.

If you already are an OpenJDK Author, Committer or Reviewer, please click here to open a new issue so that we can record that fact. Please use "Add GitHub user jyma22" as summary for the issue.

If you are contributing this work on behalf of your employer and your employer has signed the OCA, please let us know by writing /covered in a comment in this pull request.

@openjdk
Copy link

openjdk bot commented Sep 23, 2025

@jyma22 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:

8283784: java_lang_String::as_platform_dependent_str stores to oop in native state

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 202 new commits pushed to the master branch:

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.

As you do not have Committer status in this project an existing Committer must agree to sponsor your change.

➡️ To flag this PR as ready for integration with the above commit message, type /integrate in a new comment. (Afterwards, your sponsor types /sponsor in a new comment to perform the integration).

@openjdk
Copy link

openjdk bot commented Sep 23, 2025

⚠️ @jyma22 This pull request contains merges that bring in commits not present in the target repository. Since this is not a "merge style" pull request, these changes will be squashed when this pull request in integrated. If this is your intention, then please ignore this message. If you want to preserve the commit structure, you must change the title of this pull request to Merge <project>:<branch> where <project> is the name of another project in the OpenJDK organization (for example Merge jdk:master).

@jyma22
Copy link
Contributor Author

jyma22 commented Sep 23, 2025

/signed

@bridgekeeper bridgekeeper bot added the oca-verify Needs verification of OCA signatory status label Sep 23, 2025
@bridgekeeper
Copy link

bridgekeeper bot commented Sep 23, 2025

Thank you! Please allow for up to two weeks to process your OCA, although it is usually done within one to two business days. Also, please note that pull requests that are pending an OCA check will not usually be evaluated, so your patience is appreciated!

@jyma22 jyma22 changed the title 8283784: java_lang_String::as_platform_dependent_str stores to oop in native state Backport c9a469a4591002e7f51317a8494a2df902db5bfa Sep 24, 2025
@openjdk openjdk bot changed the title Backport c9a469a4591002e7f51317a8494a2df902db5bfa 8283784: java_lang_String::as_platform_dependent_str stores to oop in native state Sep 24, 2025
@openjdk
Copy link

openjdk bot commented Sep 24, 2025

This backport pull request has now been updated with issue from the original commit.

@openjdk openjdk bot added backport Port of a pull request already in a different code base clean Identical backport; no merge resolution required labels Sep 24, 2025
@bridgekeeper bridgekeeper bot removed oca Needs verification of OCA signatory status oca-verify Needs verification of OCA signatory status labels Oct 29, 2025
@jyma22
Copy link
Contributor Author

jyma22 commented Nov 17, 2025

/approval request adjusts the block scope so that JNIHandles::destroy_local is called once we are back in VM, and so no longer safepoint-safe

@openjdk
Copy link

openjdk bot commented Nov 17, 2025

@jyma22
8283784: The approval request has been created successfully.

@openjdk openjdk bot added the approval Requires approval; will be removed when approval is received label Nov 17, 2025
@jyma22 jyma22 marked this pull request as ready for review November 17, 2025 22:15
@openjdk openjdk bot added the rfr Pull request is ready for review label Nov 17, 2025
@mlbridge
Copy link

mlbridge bot commented Nov 17, 2025

Webrevs

@GoeLin
Copy link
Member

GoeLin commented Nov 19, 2025

HI @jyma22
please read https://wiki.openjdk.org/display/JDKUpdates/How+to+contribute+or+backport+a+fix and give a fix request comment with the required information.

@openjdk
Copy link

openjdk bot commented Nov 19, 2025

⚠️ @jyma22 This change is now ready for you to apply for maintainer approval. This can be done directly in each associated issue or by using the /approval command.

@openjdk openjdk bot removed the approval Requires approval; will be removed when approval is received label Nov 19, 2025
@jyma22
Copy link
Contributor Author

jyma22 commented Nov 19, 2025

Fix Request 17u

Backprting this patch eliminates the critical JNIHandles safepoint safety issue. The change adjusts block scope to ensure JNIHandles::destroy_local is called when back in VM state, which is a targeted fix that doesn't affect core functionality.
Path applies cleanly to 17u.
Included test passes. Ran tier1-3 as sanity check with no regressions observed.

@jyma22
Copy link
Contributor Author

jyma22 commented Nov 26, 2025

/approval request Backprting this patch eliminates the critical JNIHandles safepoint safety issue. The change adjusts block scope to ensure JNIHandles::destroy_local is called when back in VM state, which is a targeted fix that doesn't affect core functionality.
Path applies cleanly to 17u.
Included test passes. Ran tier1-3 as sanity check with no regressions observed.

@openjdk
Copy link

openjdk bot commented Nov 26, 2025

@jyma22
8283784: The approval request has been updated successfully.

@openjdk openjdk bot added the approval Requires approval; will be removed when approval is received label Nov 26, 2025
@openjdk openjdk bot added ready Pull request is ready to be integrated and removed approval Requires approval; will be removed when approval is received labels Dec 5, 2025
@jyma22
Copy link
Contributor Author

jyma22 commented Dec 5, 2025

/integrate

@openjdk openjdk bot added the sponsor Pull request is ready to be sponsored label Dec 5, 2025
@openjdk
Copy link

openjdk bot commented Dec 5, 2025

@jyma22
Your change (at version 0e1af44) is now ready to be sponsored by a Committer.

@phohensee
Copy link
Member

/sponsor

@openjdk
Copy link

openjdk bot commented Dec 7, 2025

Going to push as commit 5014504.
Since your change was applied there have been 207 commits pushed to the master branch:

Your commit was automatically rebased without conflicts.

@openjdk openjdk bot added the integrated Pull request has been integrated label Dec 7, 2025
@openjdk openjdk bot closed this Dec 7, 2025
@openjdk openjdk bot removed ready Pull request is ready to be integrated rfr Pull request is ready for review sponsor Pull request is ready to be sponsored labels Dec 7, 2025
@openjdk
Copy link

openjdk bot commented Dec 7, 2025

@phohensee @jyma22 Pushed as commit 5014504.

💡 You may see a message that your pull request was closed with unmerged commits. This can be safely ignored.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

backport Port of a pull request already in a different code base clean Identical backport; no merge resolution required integrated Pull request has been integrated

Development

Successfully merging this pull request may close these issues.

3 participants