Skip to content

Commit 29f300e

Browse files
jia-wei-tangPaul Hohensee
authored andcommitted
8322511: [11u] JfrCheckpointThreadClosure::do_thread crashes when fetching thread_id
Reviewed-by: phh
1 parent c8ca55b commit 29f300e

File tree

1 file changed

+1
-1
lines changed
  • src/hotspot/share/jfr/recorder/checkpoint/types

1 file changed

+1
-1
lines changed

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -101,7 +101,7 @@ void JfrCheckpointThreadClosure::do_thread(Thread* t) {
101101
if (t->is_Java_thread()) {
102102
JavaThread* const jt = (JavaThread*)t;
103103
_writer.write(jt->name());
104-
_writer.write(java_lang_Thread::thread_id(jt->threadObj()));
104+
_writer.write(jt->threadObj() != NULL ? java_lang_Thread::thread_id(jt->threadObj()) : 0);
105105
_writer.write(JfrThreadGroup::thread_group_id(jt, _curthread));
106106
// since we are iterating threads during a safepoint, also issue notification
107107
JfrJavaEventWriter::notify(jt);

0 commit comments

Comments
 (0)