Mon, 22 May 2017 09:18:12 +0200
8180576: Null pointer dereference in Matcher::xform()
Summary: Fixed a missing null check on n->in(0) found by Parfait.
Reviewed-by: kvn
src/share/vm/opto/matcher.cpp | file | annotate | diff | comparison | revisions |
1.1 --- a/src/share/vm/opto/matcher.cpp Mon May 22 09:17:32 2017 +0200 1.2 +++ b/src/share/vm/opto/matcher.cpp Mon May 22 09:18:12 2017 +0200 1.3 @@ -1020,7 +1020,7 @@ 1.4 if (C->failing()) return NULL; 1.5 if (m == NULL) { Matcher::soft_match_failure(); return NULL; } 1.6 } else { // Nothing the matcher cares about 1.7 - if( n->is_Proj() && n->in(0)->is_Multi()) { // Projections? 1.8 + if (n->is_Proj() && n->in(0) != NULL && n->in(0)->is_Multi()) { // Projections? 1.9 // Convert to machine-dependent projection 1.10 m = n->in(0)->as_Multi()->match( n->as_Proj(), this ); 1.11 #ifdef ASSERT