JDK-8244667 : Shenandoah: SBC2Support::test_gc_state takes loop for wrong control
  • Type: Bug
  • Component: hotspot
  • Sub-Component: gc
  • Affected Version: 8-shenandoah,11-shenandoah,14,15
  • Priority: P4
  • Status: Resolved
  • Resolution: Fixed
  • Submitted: 2020-05-08
  • Updated: 2020-05-14
  • Resolved: 2020-05-08
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 15
15 b23Fixed
Related Reports
Relates :  
Description
When doing the refactoring in JDK-8244509, I accidentally made a change that was not semantic-preserving: get_loop is called on new ctrl from IfTrueNode, not the ctrl we have been passed. It went correctly in test_null and test_in_cset, but not in test_gc_state.

Candidate fix:

diff -r 730eb308516a src/hotspot/share/gc/shenandoah/c2/shenandoahSupport.cpp
--- a/src/hotspot/share/gc/shenandoah/c2/shenandoahSupport.cpp  Fri May 08 08:13:15 2020 -0400
+++ b/src/hotspot/share/gc/shenandoah/c2/shenandoahSupport.cpp  Fri May 08 19:24:50 2020 +0200
@@ -877,11 +877,11 @@
 
   IfNode* gc_state_iff  = new IfNode(old_ctrl, gc_state_bool, PROB_UNLIKELY(0.999), COUNT_UNKNOWN);
   ctrl                  = new IfTrueNode(gc_state_iff);
   test_fail_ctrl        = new IfFalseNode(gc_state_iff);
 
-  IdealLoopTree* loop = phase->get_loop(ctrl);
+  IdealLoopTree* loop = phase->get_loop(old_ctrl);
   phase->register_control(gc_state_iff,   loop, old_ctrl);
   phase->register_control(ctrl,           loop, gc_state_iff);
   phase->register_control(test_fail_ctrl, loop, gc_state_iff);
 
   phase->register_new_node(thread,        old_ctrl);

Comments
URL: https://hg.openjdk.java.net/jdk/jdk/rev/8cb6bb7de14c User: shade Date: 2020-05-08 21:18:09 +0000
08-05-2020

RFR: https://mail.openjdk.java.net/pipermail/shenandoah-dev/2020-May/012156.html
08-05-2020