--- old/src/hotspot/share/opto/node.cpp 2019-01-08 14:06:47.521376268 +0100 +++ new/src/hotspot/share/opto/node.cpp 2019-01-08 14:06:40.642433691 +0100 @@ -37,6 +37,7 @@ #include "opto/node.hpp" #include "opto/opcodes.hpp" #include "opto/regmask.hpp" +#include "opto/rootnode.hpp" #include "opto/type.hpp" #include "utilities/copy.hpp" #include "utilities/macros.hpp" @@ -1310,6 +1311,9 @@ while (nstack.size() > 0) { dead = nstack.pop(); + if (dead->Opcode() == Op_SafePoint) { + dead->as_SafePoint()->disconnect_from_root(igvn); + } if (dead->outcnt() > 0) { // Keep dead node on stack until all uses are processed. nstack.push(dead);