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

RegionMatches1Tests fails if CompactStrings are disabled after JDK-8302163

XMLWordPrintable

    • b18
    • Verified

        After changes for JDK-8302163, if two UTF-16 strings come to compare with length that is close to Integer.MIN_VALUE, attempt to divide the length by UTF-16 symbol size will overflow the int type and cause wrong value of length to be passed to the next comparison step.
        This bug causes JCK test RegionMatches1Tests to fail on ARM32 platform where CompactStrings are disabled by default. This test also fails on other platforms with -XX:-CompactStrings.

        s2.regionMatches(8,s3,2,Integer.MIN_VALUE+1) = false

              avoitylov Aleksei Voitylov
              avoitylov Aleksei Voitylov
              Votes:
              0 Vote for this issue
              Watchers:
              8 Start watching this issue

                Created:
                Updated:
                Resolved: