8180576: Null pointer dereference in Matcher::xform()
Summary: Fixed a missing null check on n->in(0) found by Parfait.
Reviewed-by: kvn
--- a/hotspot/src/share/vm/opto/matcher.cpp Mon May 22 09:17:32 2017 +0200
+++ b/hotspot/src/share/vm/opto/matcher.cpp Mon May 22 09:18:12 2017 +0200
@@ -1000,7 +1000,7 @@
if (C->failing()) return NULL;
if (m == NULL) { Matcher::soft_match_failure(); return NULL; }
} 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
m = n->in(0)->as_Multi()->match( n->as_Proj(), this );
#ifdef ASSERT