提交 3b55e6e2 编写于 作者: M morris

8009166: [parfait] Null pointer deference in hotspot/src/share/vm/opto/type.cpp

Summary: add guarantee() to as_instance_type()
Reviewed-by: kvn, twisti
上级 edfc8d65
......@@ -4193,6 +4193,7 @@ const TypeOopPtr* TypeKlassPtr::as_instance_type() const {
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();
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册