JDK-8271589 : Fatal error with variable shift count integer rotate operation.
  • Type: Bug
  • Component: hotspot
  • Sub-Component: compiler
  • Affected Version: 16.0.1,17,18
  • Priority: P1
  • Status: Closed
  • Resolution: Fixed
  • OS: generic
  • CPU: generic
  • Submitted: 2021-07-31
  • Updated: 2022-02-03
  • Resolved: 2021-08-04
The Version table provides details related to the release that this issue/RFE will be addressed.

Unresolved : Release in which this issue/RFE will be addressed.
Resolved: Release in which this issue/RFE has been resolved.
Fixed : Release in which this issue/RFE has been fixed. The release containing this fix may be available for download as an Early Access Release or a General Availability Release.

To download the current JDK release, click here.
JDK 17 JDK 18
17.0.1Fixed 18 b10Fixed
Related Reports
Relates :  
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)


Comments
The adjusted test 'TestIntVectRotate.java' has been run during ATR18 with no failures found, hence this is Verified.
03-02-2022

[~jbhateja] JDK 16u is dead after we release JDK 17. No need to patch it. I will do backport into 17u.
12-08-2021

[~kvn] We also need to backport this to jdk16u. Your above comment mentioned about backport changes applied to jdk17u, do I need to create new backport PR for it?
12-08-2021

Fix Request for 17u. Backport changes applied cleanly. Low risk fix - affects Vector API only. Fix is tested in latest JDK (18). PR: https://git.openjdk.java.net/jdk/pull/4956
06-08-2021

Deferral Request for JDK 17 is approved retroactively.
05-08-2021

Deferral Request. Complex fix very late in JDK 17 release cycle. I prefer to test it first in JDK 18 and backport into JDK 17 update release. It is not new regression in JDK 17. It was introduced in JDK 16. Affects only Vector API.
05-08-2021

Changeset: 392fcc9d Author: Jatin Bhateja <jbhateja@openjdk.org> Date: 2021-08-04 17:49:17 +0000 URL: https://git.openjdk.java.net/jdk/commit/392fcc9df7e1547672f727e8fdc8de73ffdfe534
04-08-2021

Looks like this has been introduced by JDK-8248830. Please link related bugs when filing issues to keep track of the bug tail. This helps us when deciding what (not) to backport.
03-08-2021

ILW = compiler crash, problem with specific operation seen on platforms without variable vector shifts, no workaround = HMH = P1
02-08-2021

# A fatal error has been detected by the Java Runtime Environment: # # Internal Error (type.cpp:1125), pid=56471, tid=56493 # Error: ShouldNotReachHere() # # JRE version: OpenJDK Runtime Environment (16.0.1+9) (build 16.0.1+9-24) # Java VM: OpenJDK 64-Bit Server VM (16.0.1+9-24, mixed mode, sharing, compressed oops, compressed class ptrs, g1 gc, linux-amd64) # Problematic frame: # V [libjvm.so+0xd9a0c6] TypeInt::xmeet(Type const*) const+0x56 # # Core dump will be written. Default location: Core dumps may be processed with "/usr/share/apport/apport %p %s %c %d %P %E" (or dumping to /home/jatinbha/code/java/rotate/core.56471) # # An error report file with more information is saved as: # /home/jatinbha/code/java/rotate/hs_err_pid56471.log # # Compiler replay data is saved as: # /home/jatinbha/code/java/rotate/replay_pid56471.log # # If you would like to submit a bug report, please visit: # https://bugreport.java.com/bugreport/crash.jsp # Aborted (core dumped)
31-07-2021