hotspot/src/share/vm/opto/ifnode.cpp
changeset 34177 e19e45b065c6
parent 34164 a9e6034d7707
child 34181 663d662fdff0
--- a/hotspot/src/share/vm/opto/ifnode.cpp	Fri Nov 13 18:14:41 2015 +0300
+++ b/hotspot/src/share/vm/opto/ifnode.cpp	Mon Nov 16 08:03:24 2015 +0100
@@ -806,7 +806,11 @@
       // that the call stacks are equal for both JVMStates.
       JVMState* dom_caller = dom_unc->jvms()->caller();
       JVMState* caller = unc->jvms()->caller();
-      if (!dom_caller->same_calls_as(caller)) {
+      if ((dom_caller == NULL) != (caller == NULL)) {
+        // The current method must either be inlined into both dom_caller and
+        // caller or must not be inlined at all (top method). Bail out otherwise.
+        return false;
+      } else if (dom_caller != NULL && !dom_caller->same_calls_as(caller)) {
         return false;
       }
       // Check that the bci of the dominating uncommon trap dominates the bci