-
Notifications
You must be signed in to change notification settings - Fork 77
8260927: StringBuilder::insert is incorrect without Compact Strings #143
Conversation
👋 Welcome back shade! A progress list of the required criteria for merging this PR into |
Webrevs
|
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.
Looks good, thanks for fixing this.
Should we add an explicit run with -CompactStrings to the Insert.java test? That'd have caught this issue sooner - perhaps already by the GA testing.
@shipilev 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 no new commits pushed to the ➡️ To integrate this PR with the above commit message to the |
Yes, I thought about the same. Added and re-checked that it catches the failure. (I also added |
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.
Good
Thanks. GHA are green, /integrate |
Discovered it with ARM32 tier1 tests, which runs with -CompactStrings by default. But the bug is actually generic:
I believe this is a regression from JDK-8254082.
When coder is
UTF16
(which it guaranteed to be withoutCompactStrings
), thensrcPos
inbyte[]
array has to be adjusted bycoder
as well.Additional testing:
tier1
default, passestier1
,-XX:-CompactStrings
, passes modulo two testbugs (JDK-8260933, JDK-8260934)tier2
default, passestier2
,-XX:-CompactStrings
, passesProgress
Issue
Reviewers
Download
$ git fetch https://git.openjdk.java.net/jdk16 pull/143/head:pull/143
$ git checkout pull/143