8180511: Null pointer dereference in Matcher::ReduceInst()

Mon, 22 May 2017 09:17:32 +0200

author
thartmann
date
Mon, 22 May 2017 09:17:32 +0200
changeset 8770
241128a2c3ce
parent 8769
cef572e3f5a6
child 8771
0e17cbcda516

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 file | annotate | diff | comparison | revisions
     1.1 --- a/src/share/vm/opto/matcher.cpp	Mon May 22 09:16:46 2017 +0200
     1.2 +++ b/src/share/vm/opto/matcher.cpp	Mon May 22 09:17:32 2017 +0200
     1.3 @@ -1657,6 +1657,7 @@
     1.4  
     1.5    // Build the object to represent this state & prepare for recursive calls
     1.6    MachNode *mach = s->MachNodeGenerator( rule, C );
     1.7 +  guarantee(mach != NULL, "Missing MachNode");
     1.8    mach->_opnds[0] = s->MachOperGenerator( _reduceOp[rule], C );
     1.9    assert( mach->_opnds[0] != NULL, "Missing result operand" );
    1.10    Node *leaf = s->_leaf;

mercurial