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

java/lang/StringBuilder/HugeCapacity.java fails without Compact Strings

    XMLWordPrintable

    Details

    • Subcomponent:
    • Resolved In Build:
      b09

      Backports

        Description

        $ CONF=linux-x86_64-server-fastdebug make run-test TEST=java/lang/StringBuilder/HugeCapacity.java TEST_VM_OPTS=-XX:-CompactStrings

        ...

        STDERR:
        java.lang.OutOfMemoryError: Required length exceeds implementation limit
        at java.base/java.lang.AbstractStringBuilder.newCapacity(AbstractStringBuilder.java:259)
        at java.base/java.lang.AbstractStringBuilder.ensureCapacityInternal(AbstractStringBuilder.java:229)
        at java.base/java.lang.AbstractStringBuilder.ensureCapacity(AbstractStringBuilder.java:213)
        at java.base/java.lang.StringBuilder.ensureCapacity(StringBuilder.java:87)
        at HugeCapacity.testLatin1(HugeCapacity.java:49)
        at HugeCapacity.main(HugeCapacity.java:37)
        at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:78)
        at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
        at java.base/java.lang.reflect.Method.invoke(Method.java:566)
        at com.sun.javatest.regtest.agent.MainWrapper$MainThread.run(MainWrapper.java:127)
        at java.base/java.lang.Thread.run(Thread.java:831)
        java.lang.RuntimeException: 1 tests failed
        at HugeCapacity.main(HugeCapacity.java:42)
        at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:78)
        at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
        at java.base/java.lang.reflect.Method.invoke(Method.java:566)
        at com.sun.javatest.regtest.agent.MainWrapper$MainThread.run(MainWrapper.java:127)
        at java.base/java.lang.Thread.run(Thread.java:831)

          Attachments

            Issue Links

              Activity

                People

                Assignee:
                shade Aleksey Shipilev
                Reporter:
                shade Aleksey Shipilev
                Votes:
                0 Vote for this issue
                Watchers:
                3 Start watching this issue

                  Dates

                  Created:
                  Updated:
                  Resolved: