Skip to content

Commit a4a5c7f

Browse files
jia-wei-tangDamonFool
authored andcommitted
8276125: RunThese24H.java SIGSEGV in JfrThreadGroup::thread_group_id
Reviewed-by: mgronlun Backport-of: a885aab696777c99c8c4c5d9a46afc5fe0a4fe47
1 parent f6e6eef commit a4a5c7f

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

src/hotspot/share/jfr/recorder/checkpoint/types/jfrThreadGroup.cpp

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -150,8 +150,12 @@ int JfrThreadGroupsHelper::populate_thread_group_hierarchy(const JavaThread* jt,
150150
assert(current != NULL, "invariant");
151151
assert(_thread_group_hierarchy != NULL, "invariant");
152152

153+
oop thread_oop = jt->threadObj();
154+
if (thread_oop == NULL) {
155+
return 0;
156+
}
153157
// immediate thread group
154-
Handle thread_group_handle(current, java_lang_Thread::threadGroup(jt->threadObj()));
158+
Handle thread_group_handle(current, java_lang_Thread::threadGroup(thread_oop));
155159
if (thread_group_handle == NULL) {
156160
return 0;
157161
}

0 commit comments

Comments
 (0)