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

Fatal error with variable shift count integer rotate operation.

    XMLWordPrintable

Details

    • b10
    • generic
    • generic
    • Verified

    Backports

      Description

        Following test case results into a fatal error.

          public static final int LEN = 128;
          public static void rleft(int [] arr, int [] res, int shift) {
            for(int i = 0 ; i < LEN ; i++) {
               res[i] = Integer.rotateRight(arr[i], arr[i]);
            }
          }

        Problem exists since JDK-16 onwards.
        java -version
        openjdk version "16.0.1" 2021-04-20
        OpenJDK Runtime Environment (build 16.0.1+9-24)
        OpenJDK 64-Bit Server VM (build 16.0.1+9-24, mixed mode, sharing)

        Attachments

          Issue Links

            Activity

              People

                jbhateja Jatin Bhateja
                jbhateja Jatin Bhateja
                Votes:
                0 Vote for this issue
                Watchers:
                6 Start watching this issue

                Dates

                  Created:
                  Updated:
                  Resolved: