changeset 45242:6106f1ba1a95

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
author thartmann
date Mon, 22 May 2017 09:17:32 +0200
parents dec8c0efd17b
children a66cea8a8f83
files hotspot/src/share/vm/opto/matcher.cpp
diffstat 1 files changed, 1 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/hotspot/src/share/vm/opto/matcher.cpp	Mon May 22 09:16:46 2017 +0200
+++ b/hotspot/src/share/vm/opto/matcher.cpp	Mon May 22 09:17:32 2017 +0200
@@ -1645,6 +1645,7 @@
 
   // Build the object to represent this state & prepare for recursive calls
   MachNode *mach = s->MachNodeGenerator(rule);
+  guarantee(mach != NULL, "Missing MachNode");
   mach->_opnds[0] = s->MachOperGenerator(_reduceOp[rule]);
   assert( mach->_opnds[0] != NULL, "Missing result operand" );
   Node *leaf = s->_leaf;