--- old/src/hotspot/share/runtime/thread.cpp 2020-02-03 17:39:41.000000000 -0500 +++ new/src/hotspot/share/runtime/thread.cpp 2020-02-03 17:39:41.000000000 -0500 @@ -4678,7 +4678,12 @@ DO_JAVA_THREADS(t_list, p) { if (!p->can_call_java()) continue; - address pending = (address)p->current_pending_monitor(); + // This current_pending_monitor() call site only uses the returned + // ObjectMonitor* for matching purposes and does not try to fetch + // the object reference so this ObjectMonitorHandle is not strictly + // necessary. + ObjectMonitorHandle omh; + address pending = (address)p->current_pending_monitor(&omh); if (pending == monitor) { // found a match if (i < count) result->append(p); // save the first count matches i++;