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
8271732: Regression in StringBuilder.charAt bounds checking #5086
Conversation
|
Webrevs
|
This looks okay but surprised there wasn't a jtreg test that would have caught this before integration, maybe we should add a test as part of this change.
@cl4es This change now passes all automated pre-integration checks. 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 9 new commits pushed to the
Please see this link for an up-to-date comparison between the source branch of this pull request and the
|
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.
Would you want to also test non-Latin1, just in case?
/integrate |
Going to push as commit a15b659.
Your commit was automatically rebased without conflicts. |
In #4738 we removed the
checkIndex(value, count)
call inASB.charAt
to avoid potentially getting two bounds checks in the UTF-16 case. Problem is this optimization cause a regression sinceStringUTF16.charAt(..)
checksindex
against the length of thevalue
array and notcount
.A correct fix that still maintain the possible performance advantage reported by #4738 is to reinstate the
checkIndex(value, count)
and callStringUTF16.getChar
instead ofcharAt
.Progress
Issue
Reviewers
Reviewing
Using
git
Checkout this PR locally:
$ git fetch https://git.openjdk.java.net/jdk pull/5086/head:pull/5086
$ git checkout pull/5086
Update a local copy of the PR:
$ git checkout pull/5086
$ git pull https://git.openjdk.java.net/jdk pull/5086/head
Using Skara CLI tools
Checkout this PR locally:
$ git pr checkout 5086
View PR using the GUI difftool:
$ git pr show -t 5086
Using diff file
Download this PR as a diff file:
https://git.openjdk.java.net/jdk/pull/5086.diff