diff src/share/vm/opto/subnode.cpp @ 10279:70120f47d403

8014189: JVM crash with SEGV in ConnectionGraph::record_for_escape_analysis() Summary: Add NULL checks and asserts for Type::make_ptr() returned value. Reviewed-by: twisti
author kvn
date Thu, 09 May 2013 17:28:04 -0700
parents cc32ccaaf47f
children c9ccd7b85f20
line wrap: on
line diff
--- a/src/share/vm/opto/subnode.cpp	Wed May 08 15:08:01 2013 -0700
+++ b/src/share/vm/opto/subnode.cpp	Thu May 09 17:28:04 2013 -0700
@@ -863,10 +863,11 @@
   const TypePtr *r1 = t2->make_ptr();
 
   // Undefined inputs makes for an undefined result
-  if( TypePtr::above_centerline(r0->_ptr) ||
-      TypePtr::above_centerline(r1->_ptr) )
+  if ((r0 == NULL) || (r1 == NULL) ||
+      TypePtr::above_centerline(r0->_ptr) ||
+      TypePtr::above_centerline(r1->_ptr)) {
     return Type::TOP;
-
+  }
   if (r0 == r1 && r0->singleton()) {
     // Equal pointer constants (klasses, nulls, etc.)
     return TypeInt::CC_EQ;