[PPC64] StringCoding.countPositives causes errors when the length is not a proper 32 bit int

XMLWordPrintable

    • b11
    • ppc

        We have seen failures on AIX while running java/util/zip/ZipFile/ZipFileSharedSourceTest.java. There were wrong ArrayIndexOutOfBoundsException like "Index 10 out of bounds for length 10".

        The issue disappeared when excluding a method:
        make run-test TEST=java/util/zip/ZipFile/ZipFileSharedSourceTest.java JTREG=VM_OPTIONS="-XX:CompileCommand=exclude,java.nio.charset.CharsetDecoder::decode"

        Or when disabling the intrinsic (usable as workaround):
        -XX:DisableIntrinsic=_countPositives

        We noticed that the current implementation requires the "len" argument to be a properly zero (or sign) extended 32 bit integer value. However, this assumption can break due to C2 compiled computations and optimizations.

              Assignee:
              Martin Doerr
              Reporter:
              Martin Doerr
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

                Created:
                Updated:
                Resolved: