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

MethodHandle inlining with long/double arguments is broken in C2

XMLWordPrintable

    • b107
    • Verified

        After the integration of Indify String Concatenation (JDK-8148483), compiler/jvmci/compilerToVM/GetNextStackFrameTest.java fails with the following stack trace:

        java.lang.StringIndexOutOfBoundsException: offset 87, count -1323521248, length 340
        at java.lang.String.checkBoundsOffCount(String.java:3107)
        at java.lang.StringLatin1.inflate(StringLatin1.java:528)
        at java.lang.String.getBytes(String.java:3002)
        at java.lang.AbstractStringBuilder.putStringAt(AbstractStringBuilder.java:1644)
        at java.lang.AbstractStringBuilder.append(AbstractStringBuilder.java:488)
        at java.lang.StringBuilder.append(StringBuilder.java:141)
        at java.lang.StringBuilder.append(StringBuilder.java:135)
        at java.lang.String$Concat/55860507.concat(Unknown Source)
        at jdk.vm.ci.hotspot.HotSpotStackFrameReference.toString(HotSpotStackFrameReference.java:90)
        at jdk.test.lib.Asserts.format(Asserts.java:443)

        It also fails with -XX:-OptimizeStringConcat:

        java.lang.ArrayStoreException
        at java.lang.System.arraycopy(Native Method)
        at java.lang.String.getBytes(String.java:3000)
        at java.lang.AbstractStringBuilder.putStringAt(AbstractStringBuilder.java:1644)
        at java.lang.AbstractStringBuilder.append(AbstractStringBuilder.java:488)
        at java.lang.StringBuilder.append(StringBuilder.java:141)
        at java.lang.StringBuilder.append(StringBuilder.java:135)
        at java.lang.String$Concat/931594624.concat(Unknown Source)
        at jdk.vm.ci.hotspot.HotSpotStackFrameReference.toString(HotSpotStackFrameReference.java:90)
        at jdk.test.lib.Asserts.format(Asserts.java:443)

        It does not fail with -Djava.lang.invoke.stringConcat=MH_SB_SIZED.

              thartmann Tobias Hartmann
              thartmann Tobias Hartmann
              Votes:
              0 Vote for this issue
              Watchers:
              5 Start watching this issue

                Created:
                Updated:
                Resolved: