提交 4f8e2c59 编写于 作者: T thartmann

8180576: Null pointer dereference in Matcher::xform()

Summary: Fixed a missing null check on n->in(0) found by Parfait.
Reviewed-by: kvn
上级 f116f099
...@@ -1020,7 +1020,7 @@ Node *Matcher::xform( Node *n, int max_stack ) { ...@@ -1020,7 +1020,7 @@ Node *Matcher::xform( Node *n, int max_stack ) {
if (C->failing()) return NULL; if (C->failing()) return NULL;
if (m == NULL) { Matcher::soft_match_failure(); return NULL; } if (m == NULL) { Matcher::soft_match_failure(); return NULL; }
} else { // Nothing the matcher cares about } else { // Nothing the matcher cares about
if( n->is_Proj() && n->in(0)->is_Multi()) { // Projections? if (n->is_Proj() && n->in(0) != NULL && n->in(0)->is_Multi()) { // Projections?
// Convert to machine-dependent projection // Convert to machine-dependent projection
m = n->in(0)->as_Multi()->match( n->as_Proj(), this ); m = n->in(0)->as_Multi()->match( n->as_Proj(), this );
#ifdef ASSERT #ifdef ASSERT
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册