From f116f0999e2ce5710b1a368e47cf81a1ca3561ec Mon Sep 17 00:00:00 2001 From: thartmann Date: Mon, 22 May 2017 09:17:32 +0200 Subject: [PATCH] 8180511: Null pointer dereference in Matcher::ReduceInst() Summary: Fixed a missing null check on the return value of MachNodeGenerator() found by Parfait. Reviewed-by: kvn --- src/share/vm/opto/matcher.cpp | 1 + 1 file changed, 1 insertion(+) diff --git a/src/share/vm/opto/matcher.cpp b/src/share/vm/opto/matcher.cpp index f4097b35e..c01785a8d 100644 --- a/src/share/vm/opto/matcher.cpp +++ b/src/share/vm/opto/matcher.cpp @@ -1657,6 +1657,7 @@ MachNode *Matcher::ReduceInst( State *s, int rule, Node *&mem ) { // Build the object to represent this state & prepare for recursive calls MachNode *mach = s->MachNodeGenerator( rule, C ); + guarantee(mach != NULL, "Missing MachNode"); mach->_opnds[0] = s->MachOperGenerator( _reduceOp[rule], C ); assert( mach->_opnds[0] != NULL, "Missing result operand" ); Node *leaf = s->_leaf; -- GitLab