Blame SOURCES/pr3573.patch

08a17a
# HG changeset patch
08a17a
# User roland
08a17a
# Date 1506520357 -7200
08a17a
#      Wed Sep 27 15:52:37 2017 +0200
08a17a
# Node ID c307975d0800f8da5cc8e82cd8f1fdadbd745357
08a17a
# Parent  ab0c101fa16e4cd97ac8ceff4f5ff72e2f4d5776
08a17a
[backport] fix TCK crash with shenandoah
08a17a
08a17a
diff --git a/src/share/vm/opto/shenandoahSupport.cpp b/src/share/vm/opto/shenandoahSupport.cpp
08a17a
--- openjdk/hotspot/src/share/vm/opto/shenandoahSupport.cpp
08a17a
+++ openjdk/hotspot/src/share/vm/opto/shenandoahSupport.cpp
08a17a
@@ -472,9 +472,11 @@
08a17a
   Node* input = in(Memory);
08a17a
   if (input->Opcode() == Op_ShenandoahWBMemProj) {
08a17a
     Node* wb = input->in(0);
08a17a
-    if (wb->is_top()) return NULL; // Dead path.
08a17a
+    const Type* in_type = phase->type(wb);
08a17a
+    // is_top() test not sufficient here: we can come here after CCP
08a17a
+    // in a dead branch of the graph that has not yet been removed.
08a17a
+    if (in_type == Type::TOP) return NULL; // Dead path.
08a17a
     assert(wb->Opcode() == Op_ShenandoahWriteBarrier, "expect write barrier");
08a17a
-    const Type* in_type = phase->type(wb);
08a17a
     if (is_independent(in_type, _type)) {
08a17a
       if (phase->is_IterGVN()) {
08a17a
         phase->is_IterGVN()->rehash_node_delayed(wb);