-
Notifications
You must be signed in to change notification settings - Fork 6.2k
8349183: [BACKOUT] Optimization for StringBuilder append boolean & null #23420
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
Conversation
|
👋 Welcome back jpai! A progress list of the required criteria for merging this PR into |
|
@jaikiran 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 |
|
@jaikiran The following labels 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 lists. If you would like to change these labels, use the /label pull request command. |
Webrevs
|
|
This concurrency problem also exists in the UTF16 scenario, so why only change to Latin1 here? |
Do you mean there are additional commits that have been done in the JDK which introduce a similar issue related to array writes beyond their limit that need to be backed out? |
|
@wenshao this re-instates the An alternative to this backout would be to add |
| putChar(val, index + 4, c5); | ||
| public static int putCharsAt(byte[] value, int i, char c1, char c2, char c3, char c4) { | ||
| int end = i + 4; | ||
| checkBoundsBeginEnd(i, end, value); |
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.
We have this explicit check for null and true, false has another bound check. This backout version should be safe.
liach
left a comment
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.
Also for append(char): it uses putCharSB which does a check and calls unchecked putChar. putCharsAt is always checked.
|
Thank you Claes and Chen for the reviews. tier1, tier2 and tier3 testing is nearing completion without any failures. Could one of you approve that it's OK to integrate this trivial backout without waiting for 24 hours (the review process allows it https://openjdk.org/guide/#trivial-changes)? I will be integrating this as soon as the tier testing completes. |
|
Can you wait for me for a while? I am looking for other solutions that do not require a fallback. |
The updated fix/change (if any) doesn't have to be rushed and you can take longer to work on it with additional help and reviews from others. Once this backout is integrated into mainline, it will be backported to jdk24 (which is to be released in a few days). The risk of waiting for an additional/different fix is higher compared to a backout. So we intend to go ahead with the backout. |
|
#23423 |
A backout is always considered a trivial change. See https://openjdk.org/guide/#backing-out-a-change |
|
/issue add JDK-8349239 |
|
@jaikiran |
|
Don't rush to roll back, the current rollback solution still has problems |
|
Thank you all for the help on this one. /integrate |
|
The problem still exists, we need to complete another PR #23427 |
Can I please get a review of this change which backs out the commit that was introduced for https://bugs.openjdk.org/browse/JDK-8333893?
The comment in the PR review of that issue #19626 (comment) explains what the issue is with the change that was integrated. Furthermore, one part of that original change introduced a few internal methods. These internal methods were then used in few other places within the JDK through https://bugs.openjdk.org/browse/JDK-8343650. As a result, this backout PR also reverts the change that was done in JDK-8343650.
The backout was done as follows, using
git revertagainst the 2 relevant commits:The revert of
5890d9438bbde88b89070052926a2eafe13d7b42wasn't clean and I had to resolve a trivial conflict inStringLatin1.java.tier1, tier2 and tier3 testing is currently in progress with this change. Once this is integrated into mainline, a corresponding backport will be done to
jdk24branch with the requisite approvals.Progress
Issues
Reviewers
Reviewers without OpenJDK IDs
Reviewing
Using
gitCheckout this PR locally:
$ git fetch https://git.openjdk.org/jdk.git pull/23420/head:pull/23420$ git checkout pull/23420Update a local copy of the PR:
$ git checkout pull/23420$ git pull https://git.openjdk.org/jdk.git pull/23420/headUsing Skara CLI tools
Checkout this PR locally:
$ git pr checkout 23420View PR using the GUI difftool:
$ git pr show -t 23420Using diff file
Download this PR as a diff file:
https://git.openjdk.org/jdk/pull/23420.diff
Using Webrev
Link to Webrev Comment