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

String.indexOf() returns incorrect result on x86 with SSE4.2

    XMLWordPrintable

Details

    • Bug
    • Status: Resolved
    • P4
    • Resolution: Fixed
    • hs17, 6u10, 6u18, 6u20
    • hs17
    • hotspot
    • b12
    • x86
    • linux, linux_redhat_4.0, solaris, solaris_2.5.1, solaris_10, windows_7

    Backports

      Description

        % java -Xcomp Test
        IndexOf(1111111111111xx1x) = 15 in 1111111111111xx1111111111111xx1

        % cat Test.java
        public class Test {

          static int IndexOfTest(String str) {
            return str.indexOf("1111111111111xx1x");
          }

          public static void main(String args[]) {
            String str = "1111111111111xx1111111111111xx1x";
            str = str.substring(0, 31);
            int idx = IndexOfTest(str);
            System.out.println("IndexOf(" + "1111111111111xx1x" + ") = " + idx + " in " + str);
          }
        }

        Attachments

          Issue Links

            Activity

              People

                kvn Vladimir Kozlov
                kvn Vladimir Kozlov
                Votes:
                0 Vote for this issue
                Watchers:
                1 Start watching this issue

                Dates

                  Created:
                  Updated:
                  Resolved:
                  Imported:
                  Indexed: