8009166: [parfait] Null pointer deference in hotspot/src/share/vm/opto/type.cpp
authormorris
Sat, 16 Mar 2013 07:39:14 -0700
changeset 16361 00f328f6f285
parent 16360 412be73af451
child 16362 7b5c4f403e90
8009166: [parfait] Null pointer deference in hotspot/src/share/vm/opto/type.cpp Summary: add guarantee() to as_instance_type() Reviewed-by: kvn, twisti
hotspot/src/share/vm/opto/type.cpp
--- a/hotspot/src/share/vm/opto/type.cpp	Fri Mar 15 18:44:08 2013 -0700
+++ b/hotspot/src/share/vm/opto/type.cpp	Sat Mar 16 07:39:14 2013 -0700
@@ -4193,6 +4193,7 @@
   bool    xk = klass_is_exact();
   //return TypeInstPtr::make(TypePtr::NotNull, k, xk, NULL, 0);
   const TypeOopPtr* toop = TypeOopPtr::make_from_klass_raw(k);
+  guarantee(toop != NULL, "need type for given klass");
   toop = toop->cast_to_ptr_type(TypePtr::NotNull)->is_oopptr();
   return toop->cast_to_exactness(xk)->is_oopptr();
 }