Integrated: 8322018: Test java/lang/String/CompactString/MaxSizeUTF16String.java fails with -Xcomp

Roger Riggs rriggs at openjdk.org
Fri Dec 15 16:16:48 UTC 2023


On Wed, 13 Dec 2023 21:38:43 GMT, Roger Riggs <rriggs at openjdk.org> wrote:

> The test java/lang/String/CompactString/MaxSizeUTF16String.java fails when run with -Xcomp.
> 
> Both the java implementation and the intrinsic for StringUTF16.toBytes() allocate memory for a copy of the string.
> The java implementation of `toBytes()` throws an exception with a message in terms of length of the string.
> The intrinsic uses a generic message when allocating a byte array that is too large for the implementation.
> 
> Test should accept either message on the OOME exception, the message is an implementation detail and should reflect the cause of the error and not be confused with a general out of java heap message.

This pull request has now been integrated.

Changeset: 6311dabe
Author:    Roger Riggs <rriggs at openjdk.org>
URL:       https://git.openjdk.org/jdk/commit/6311dabe68762749e4317cfa5e13005318bdceac
Stats:     19 lines in 1 file changed: 14 ins; 0 del; 5 mod

8322018: Test java/lang/String/CompactString/MaxSizeUTF16String.java fails with -Xcomp

Reviewed-by: jpai

-------------

PR: https://git.openjdk.org/jdk/pull/17095


More information about the core-libs-dev mailing list