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

AArch64: String.compareTo() can read memory after string

    XMLWordPrintable

Details

    • 11
    • b22
    • aarch64
    • linux

    Backports

      Description

        There is a bug in stub code of AArch64 String.compareTo() intrinsics. It can be reproduced by below Java code and VM options.

        public class Test {
          public static void main(String[] args) {
            String str1 = "/home/pengfei/backup/Android/projects/ActionBarSherlock/tree/master/actionbarsherlock/res/";
            String str2 = "/home/pengfei/backup/Android/projects/ActionBarSherlock/tree/master/actionbarsherlock/res/\u6d4b\u8bd5.png";
            System.out.println(str1.compareTo(str2));
          }
        }

        // $ java -Xint Test
        // -6
        // $ java -Xcomp -XX:-TieredCompilation -XX:-Inline Test
        // -27979

        Attachments

          Issue Links

            Activity

              People

                dpochepk Dmitrij Pochepko
                pli Pengfei Li
                Votes:
                1 Vote for this issue
                Watchers:
                5 Start watching this issue

                Dates

                  Created:
                  Updated:
                  Resolved: