changeset 4359:96ef09c26978

8009166: [parfait] Null pointer deference in hotspot/src/share/vm/opto/type.cpp Summary: add guarantee() to as_instance_type() Reviewed-by: kvn, twisti
author morris
date Sat, 16 Mar 2013 07:39:14 -0700
parents f3d486462d36
children 8b4ce9870fd6
files src/share/vm/opto/type.cpp
diffstat 1 files changed, 1 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/src/share/vm/opto/type.cpp	Fri Mar 15 18:44:08 2013 -0700
+++ b/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();
 }