RFR: 8356152: String.concat can throw StringIndexOutOfBoundsException [v2]
Jaikiran Pai
jpai at openjdk.org
Mon May 5 13:53:48 UTC 2025
On Mon, 5 May 2025 13:36:05 GMT, Raffaello Giulietti <rgiulietti at openjdk.org> wrote:
>> A fix to throw `OutOfMemoryError`, as done in releases ≤ 23.
>
> Raffaello Giulietti has updated the pull request incrementally with one additional commit since the last revision:
>
> Simplified test slightly.
test/jdk/java/lang/String/concat/HugeConcatTest.java line 29:
> 27: * @summary Check that huge concatenations throw OutOfMemoryError
> 28: * @run junit/othervm -Xmx6G -XX:+CompactStrings -Dcompact=true HugeConcatTest
> 29: * @run junit/othervm -Xmx6G -XX:-CompactStrings -Dcompact=false HugeConcatTest
Hello Raffaello, some other tests that require such large heap sizes use a:
`@requires os.maxMemory > 6G`
to prevent failure to launch `java`. I think we should add it here too.
-------------
PR Review Comment: https://git.openjdk.org/jdk/pull/25038#discussion_r2073491401
More information about the core-libs-dev
mailing list