RFR: JDK-8320570 NegativeArraySizeException decoding >1G UTF8 bytes with non-ascii characters [v2]
Jim Laskey
jlaskey at openjdk.org
Wed Dec 6 11:47:13 UTC 2023
On Tue, 5 Dec 2023 20:44:54 GMT, Roger Riggs <rriggs at openjdk.org> wrote:
>> Jim Laskey has updated the pull request incrementally with two additional commits since the last revision:
>>
>> - Bump up memory
>> - Cotrrect NegativeSize.java
>
> test/jdk/java/lang/String/CompactString/NegativeSize.java line 30:
>
>> 28: * @test
>> 29: * @bug 8077559
>> 30: * @summary Tests Compact String for negative size.
>
> It might be useful to require the larger memory; to avoid getting run when there's insufficient memory available.
>
> * @requires os.maxMemory >= 4G
Updated
> test/jdk/java/lang/String/CompactString/NegativeSize.java line 63:
>
>> 61: System.out.println(inStr.substring(1_200_000_000));
>> 62: } catch (OutOfMemoryError ex) {
>> 63: System.out.println("Succeeded with OutOfMemoryError");
>
> It might be good to check that it is the expected OOME whose message starts with `UTF16 String size is `.
> No just any "Java heap memory" OOME.
Updated
-------------
PR Review Comment: https://git.openjdk.org/jdk/pull/16974#discussion_r1417154205
PR Review Comment: https://git.openjdk.org/jdk/pull/16974#discussion_r1417154093
More information about the core-libs-dev
mailing list