Skip to content

Commit

Permalink
8322511: [11u] JfrCheckpointThreadClosure::do_thread crashes when fet…
Browse files Browse the repository at this point in the history
…ching thread_id

Reviewed-by: phh
  • Loading branch information
jia-wei-tang authored and Paul Hohensee committed Mar 11, 2024
1 parent c8ca55b commit 29f300e
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -101,7 +101,7 @@ void JfrCheckpointThreadClosure::do_thread(Thread* t) {
if (t->is_Java_thread()) {
JavaThread* const jt = (JavaThread*)t;
_writer.write(jt->name());
_writer.write(java_lang_Thread::thread_id(jt->threadObj()));
_writer.write(jt->threadObj() != NULL ? java_lang_Thread::thread_id(jt->threadObj()) : 0);
_writer.write(JfrThreadGroup::thread_group_id(jt, _curthread));
// since we are iterating threads during a safepoint, also issue notification
JfrJavaEventWriter::notify(jt);
Expand Down

0 comments on commit 29f300e

Please sign in to comment.