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

Amend TestLoadIndexedMismatch test to target intrinsic directly

XMLWordPrintable

    • b10

        When backporting JDK-8313402 to 17u, I realized the new regression test actually enters via `StringUTF16.charAt`, which has the `checkIndex` call:

        ```
            public static char charAt(byte[] value, int index) {
                checkIndex(index, value);
                return getChar(value, index);
            }
        ```

        As seen in JDK-8313402 investigation, the shape of that `checkIndex` triggers the issue. In JDK 17, the relevant change to `checkIndex` is missing, and so regression test passes even without a fix. Which means, IMO, that before JDK 18 the issue is hidden by the absence of JDK-8268698.

        If we amend the test to enter straight via `StringUTF16.getChar`, the regression test for JDK-8313402 starts to fail in 17u, and gets fixed by JDK-8313402.

              shade Aleksey Shipilev
              shade Aleksey Shipilev
              Votes:
              0 Vote for this issue
              Watchers:
              4 Start watching this issue

                Created:
                Updated:
                Resolved: