8014189: JVM crash with SEGV in ConnectionGraph::record_for_escape_analysis()

Add NULL checks and asserts for Type::make_ptr() returned value.

Reviewed-by: twisti
This commit is contained in:
Vladimir Kozlov 2013-05-09 17:28:04 -07:00
parent b4977e887a
commit d7176bf7f8
9 changed files with 44 additions and 19 deletions

View file

@ -1398,6 +1398,21 @@ const TypeLong* Node::find_long_type() const {
return NULL;
}
/**
* Return a ptr type for nodes which should have it.
*/
const TypePtr* Node::get_ptr_type() const {
const TypePtr* tp = this->bottom_type()->make_ptr();
#ifdef ASSERT
if (tp == NULL) {
this->dump(1);
assert((tp != NULL), "unexpected node type");
}
#endif
return tp;
}
// Get a double constant from a ConstNode.
// Returns the constant if it is a double ConstNode
jdouble Node::getd() const {