Mercurial > hg > graal-jvmci-8
diff src/share/vm/opto/type.cpp @ 8760: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 | 203f64878aab |
children | 6f3fd5150b67 |
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(); }