Re: RFR: 8321514: UTF16 string gets constructed incorrectly from codepoints if CompactStrings is not enabled [v3]

2023-12-14 Thread Roger Riggs
On Thu, 14 Dec 2023 12:03:11 GMT, Aleksei Voitylov wrote: > Thank you, Roger. Yes, I'll work on the 22 backport. See https://wiki.openjdk.org/display/SKARA/Backports Once the mainline is integrated, find the commit and add a "/backport jdk21" comment. Skara should do the rest (but read the di

Re: RFR: 8321514: UTF16 string gets constructed incorrectly from codepoints if CompactStrings is not enabled [v3]

2023-12-14 Thread Aleksei Voitylov
On Wed, 13 Dec 2023 11:39:19 GMT, Aleksei Voitylov wrote: >> Since JDK-8311906, if CompactStrings is not enabled, index is not considered >> when calling extractCodepoints from StringUTF16.toBytes(). Because of that >> the last elements of the source codepoints array are stripped from the >>

Re: RFR: 8321514: UTF16 string gets constructed incorrectly from codepoints if CompactStrings is not enabled [v3]

2023-12-13 Thread Roger Riggs
On Wed, 13 Dec 2023 11:39:19 GMT, Aleksei Voitylov wrote: >> Since JDK-8311906, if CompactStrings is not enabled, index is not considered >> when calling extractCodepoints from StringUTF16.toBytes(). Because of that >> the last elements of the source codepoints array are stripped from the >>

Re: RFR: 8321514: UTF16 string gets constructed incorrectly from codepoints if CompactStrings is not enabled [v3]

2023-12-13 Thread Roger Riggs
On Wed, 13 Dec 2023 11:39:29 GMT, Aleksei Voitylov wrote: > If you think it's worth it, I can go through some tests and add some more > -XX:-CompactStrings mode to java.lang.String tests here and there, lightly. > It's not the first time we hit this issue. Verifying the coverage of the tests

Re: RFR: 8321514: UTF16 string gets constructed incorrectly from codepoints if CompactStrings is not enabled [v3]

2023-12-13 Thread Roger Riggs
On Wed, 13 Dec 2023 11:39:19 GMT, Aleksei Voitylov wrote: >> Since JDK-8311906, if CompactStrings is not enabled, index is not considered >> when calling extractCodepoints from StringUTF16.toBytes(). Because of that >> the last elements of the source codepoints array are stripped from the >>

Re: RFR: 8321514: UTF16 string gets constructed incorrectly from codepoints if CompactStrings is not enabled [v3]

2023-12-13 Thread Aleksei Voitylov
On Wed, 13 Dec 2023 11:39:19 GMT, Aleksei Voitylov wrote: >> Since JDK-8311906, if CompactStrings is not enabled, index is not considered >> when calling extractCodepoints from StringUTF16.toBytes(). Because of that >> the last elements of the source codepoints array are stripped from the >>

Re: RFR: 8321514: UTF16 string gets constructed incorrectly from codepoints if CompactStrings is not enabled [v3]

2023-12-13 Thread Aleksei Voitylov
> Since JDK-8311906, if CompactStrings is not enabled, index is not considered > when calling extractCodepoints from StringUTF16.toBytes(). Because of that > the last elements of the source codepoints array are stripped from the > resulting UTF16 string, which fires in other places (e.g. during