JDK-8238851 : Shenandoah: C1: Resolve into registers of correct type
  • Type: Bug
  • Component: hotspot
  • Sub-Component: gc
  • Affected Version: 8-shenandoah,11-shenandoah,14,15
  • Priority: P2
  • Status: Closed
  • Resolution: Fixed
  • Submitted: 2020-02-11
  • Updated: 2022-02-24
  • Resolved: 2020-02-12
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 14 JDK 15
14.0.2Fixed 15 b10Fixed
Related Reports
Duplicate :  
Relates :  
Description
Take recent jdk/jdk, apply this patch:

diff -r b585d773ea0f src/hotspot/cpu/x86/c1_LIRAssembler_x86.cpp
--- a/src/hotspot/cpu/x86/c1_LIRAssembler_x86.cpp       Mon Feb 10 06:18:46 2020 +0100
+++ b/src/hotspot/cpu/x86/c1_LIRAssembler_x86.cpp       Tue Feb 11 09:32:11 2020 +0100
@@ -852,11 +852,11 @@
       return;
     }
 #endif
     assert(src->is_single_cpu(), "must match");
     if (src->type() == T_OBJECT) {
-      __ verify_oop(src->as_register());
+      __ verify_oop(src->as_register(), "reg2reg 1");
     }
     move_regs(src->as_register(), dest->as_register());
 
   } else if (dest->is_double_cpu()) {
 #ifdef _LP64

...then run this in any folder (Maven project is not required!):

$ export JAVA_HOME=...
$ export PATH=$JAVA_HOME/bin:$PATH
$ MAVEN_OPTS="-XX:+UnlockExperimentalVMOptions -XX:+UnlockDiagnosticVMOptions -XX:+UseShenandoahGC -XX:+VerifyOops" mvn verify

# A fatal error has been detected by the Java Runtime Environment:
#
#  Internal Error (/home/shade/trunks/jdk-jdk/src/hotspot/cpu/x86/macroAssembler_x86.cpp:883), pid=13783, tid=13799
#  fatal error: DEBUG MESSAGE: verify_oop: rax: reg2reg 1
#

Comments
[~shade] / [~rkennke], could you please confirm that the defect is fixed in jdk15 w/ the fix? if it's so, please close/verify this bug as 'verified'
15-07-2020

14u seems to fail CTW runs without JDK-8239081 backported as well.
13-03-2020

Fix Request (14u) This fixes compilation problem with Shenandoah that reproduces with +VerifyOops. Patch applies cleanly to 14u. Patched JDK passes hotspot_gc_shenandoah. Patch is fully contained in Shenandoah code, so risk for other parts of VM is low.
03-03-2020

URL: https://hg.openjdk.java.net/jdk/jdk/rev/732ab9ad5958 User: rkennke Date: 2020-02-12 14:37:59 +0000
12-02-2020

In ShBSC1::ensure_in_register() we are blindly creating registers of type T_OBJECT, even though in some cases we actually need T_ADDRESS. This blows up when we verify oop registers: when the argument is of type T_OBJECT we perform extra checks that fail when the value in register is not actually an object.
11-02-2020