diff -r 9baa91bc7567 -r fc6cfe40e32a src/hotspot/share/opto/macro.cpp --- a/src/hotspot/share/opto/macro.cpp Fri Jul 13 11:21:55 2018 +0800 +++ b/src/hotspot/share/opto/macro.cpp Thu Jul 12 16:31:28 2018 +0200 @@ -2154,6 +2154,7 @@ Node* mem = alock->in(TypeFunc::Memory); Node* ctrl = alock->in(TypeFunc::Control); + guarantee(ctrl != NULL, "missing control projection, cannot replace_node() with NULL"); extract_call_projections(alock); // There are 2 projections from the lock. The lock node will @@ -2188,8 +2189,7 @@ } // Seach for MemBarReleaseLock node and delete it also. - if (alock->is_Unlock() && ctrl != NULL && ctrl->is_Proj() && - ctrl->in(0)->is_MemBar()) { + if (alock->is_Unlock() && ctrl->is_Proj() && ctrl->in(0)->is_MemBar()) { MemBarNode* membar = ctrl->in(0)->as_MemBar(); assert(membar->Opcode() == Op_MemBarReleaseLock && mem->is_Proj() && membar == mem->in(0), "");