On Wed, 13 Dec 2023 21:38:43 GMT, Roger Riggs <rri...@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.

The update to the definition introduces a new `@run` with `-Xcomp` so as to 
explicitly control the test run instead of relying on external test launch 
mechanisms to pass around the `-Xcomp`. That then means that the introduction 
of `@requires vm.flagless`, in this change, is fine.
The change in the test logic itself looks reasonable to me based on what's 
explained in the PR description.

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

Marked as reviewed by jpai (Reviewer).

PR Review: https://git.openjdk.org/jdk/pull/17095#pullrequestreview-1781459943

Reply via email to