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

AArch64: fix failures in jtreg ArraysEqCmpTest

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: P4 P4
    • 11
    • 10
    • hotspot
    • b20
    • aarch64
    • linux

        For char/byte array, every word can hold multiple elements. If array's size is smaller or equal with one word, then MacroAssembler::arrays_equals will goto SHORT path for optimization. For example, when there are two byte arrays a[1] and b[2], if their values and nearby memory are all set to 0, without my patch, arrays_equals will return true. But in fact, array a has only one element and array b has two, they are not equal.

         

        This causes three failures in Jtreg ArraysEqCmpTest.


        java/util/Arrays/ArraysEqCmpTest.java
        Total tests run: 81, Failures: 3, Skips: 0

        test ArraysEqCmpTest.testArray(byte[]): failure
        test ArraysEqCmpTest.testArray(unsigned byte[]): failure
        test ArraysEqCmpTest.testArray(char[]): failure

              zyao Zhongwei Yao
              zyao Zhongwei Yao
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

                Created:
                Updated:
                Resolved: