Skip to content

Commit 306b166

Browse files
committed
8253033: CheckUnhandledOops check fails in ThreadSnapshot::initialize…
Reviewed-by: coleenp, dholmes
1 parent 5c0d985 commit 306b166

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

src/hotspot/share/services/threadService.cpp

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -877,14 +877,15 @@ void ThreadSnapshot::initialize(ThreadsList * t_list, JavaThread* thread) {
877877
_is_ext_suspended = thread->is_being_ext_suspended();
878878
_is_in_native = (thread->thread_state() == _thread_in_native);
879879

880+
Handle obj = ThreadService::get_current_contended_monitor(thread);
881+
880882
oop blocker_object = NULL;
881883
oop blocker_object_owner = NULL;
882884

883885
if (_thread_status == java_lang_Thread::BLOCKED_ON_MONITOR_ENTER ||
884886
_thread_status == java_lang_Thread::IN_OBJECT_WAIT ||
885887
_thread_status == java_lang_Thread::IN_OBJECT_WAIT_TIMED) {
886888

887-
Handle obj = ThreadService::get_current_contended_monitor(thread);
888889
if (obj() == NULL) {
889890
// monitor no longer exists; thread is not blocked
890891
_thread_status = java_lang_Thread::RUNNABLE;

0 commit comments

Comments
 (0)