diff -r 1647ed87bf1e -r 58f842703bc5 src/hotspot/share/gc/z/zHeap.cpp --- a/src/hotspot/share/gc/z/zHeap.cpp Mon Nov 25 14:56:15 2019 +0100 +++ b/src/hotspot/share/gc/z/zHeap.cpp Mon Nov 25 14:57:03 2019 +0100 @@ -352,12 +352,12 @@ ZRendezvousClosure cl; Handshake::execute(&cl); + // Unblock resurrection of weak/phantom references + ZResurrection::unblock(); + // Purge stale metadata and nmethods that were unlinked _unload.purge(); - // Unblock resurrection of weak/phantom references - ZResurrection::unblock(); - // Enqueue Soft/Weak/Final/PhantomReferences. Note that this // must be done after unblocking resurrection. Otherwise the // Finalizer thread could call Reference.get() on the Finalizers