Uploaded image for project: 'JDK'
  1. JDK
  2. JDK-8253285

Some java/util/StringJoiner tests do not explicitly specify required -XX:+CompactStrings

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: P4
    • Resolution: Fixed
    • Affects Version/s: 15, 16
    • Fix Version/s: 16
    • Component/s: core-libs
    • Labels:
      None
    • Subcomponent:
    • Resolved In Build:
      b17

      Description

      test/jdk/java/util/StringJoiner/MergeTest
      test/jdk/java/util/StringJoiner/StringJoinerTest
      do not explicitly specify required -XX:+CompactStrings, as these tests perform MAX_ARRAY_LENGTH large String array computations, which without CompactStrings will fail.
      eg.
      14:09:02 test MergeTest.OOM(): failure
      14:09:02 java.lang.OutOfMemoryError: UTF16 String size is 2147483639, should be less than 1073741823
      14:09:02 at java.base/java.lang.StringUTF16.newBytesFor(StringUTF16.java:50)
      14:09:02 at java.base/java.lang.String.repeat(String.java:3967)
      14:09:02 at MergeTest.OOM(MergeTest.java:175)

      Hotspot defaults to +CompactStrings, however not every VM necessarily does, for example Eclipse OpenJ9 defaults to -CompactStrings.

        Attachments

          Issue Links

            Activity

              People

              Assignee:
              aleonard Andrew Leonard
              Reporter:
              aleonard Andrew Leonard
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

                Dates

                Created:
                Updated:
                Resolved: