JDK-8228406 : Superfluous change in chaitin.hpp
  • Type: Bug
  • Component: hotspot
  • Sub-Component: compiler
  • Affected Version: 8-aarch64
  • Priority: P4
  • Status: Resolved
  • Resolution: Fixed
  • Submitted: 2019-07-18
  • Updated: 2021-02-01
  • Resolved: 2019-07-24
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 8 Other
8-aarch64Fixed openjdk8u292Fixed
Related Reports
Relates :  
Description
Continuing to scrub aarch64-port changes against 8u upstream. Here is a funny bit in chaitin.hpp:
  https://builds.shipilev.net/patch-openjdk-jdk8-aarch64/hotspot/src/share/vm/opto/chaitin.hpp.sdiff.html

I think this is what happened:
 1. Change A got in: 
     http://hg.openjdk.java.net/aarch64-port/jdk8u-shenandoah/hotspot/rev/c53f2cffc0f4#l10.6
 2. Change A got backed out:
     http://hg.openjdk.java.net/aarch64-port/jdk8u-shenandoah/hotspot/rev/5d458891a9ae#l10.6
 3. Merge happened, and Ed chose the wrong side of it for that particular block:
     http://hg.openjdk.java.net/aarch64-port/jdk8u-shenandoah/hotspot/rev/69403274d781#l236.51

Fix is trivial, just revert it back:

diff -r f255fe444394 src/share/vm/opto/chaitin.hpp
--- a/src/share/vm/opto/chaitin.hpp     Thu Jul 18 17:11:19 2019 +0200
+++ b/src/share/vm/opto/chaitin.hpp     Fri Jul 19 00:08:53 2019 +0200
@@ -322,8 +322,5 @@
 
   uint live_range_id(const Node *node) const {
-    if (node->_idx >= size())
-      return 0;
-    else
-      return _names.at(node->_idx);
+    return _names.at(node->_idx);
   }
 
Comments
Pushed: https://hg.openjdk.java.net/aarch64-port/jdk8u-shenandoah/hotspot/rev/664c1baf2f2e
24-07-2019