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

3 comments on commit 29f300e

@openjdk-notifier
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@jia-wei-tang
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

/backport jdk8u-dev

@openjdk
Copy link

@openjdk openjdk bot commented on 29f300e Apr 23, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@jia-wei-tang the backport was successfully created on the branch backport-jia-wei-tang-29f300eb in my personal fork of openjdk/jdk8u-dev. To create a pull request with this backport targeting openjdk/jdk8u-dev:master, just click the following link:

➡️ Create pull request

The title of the pull request is automatically filled in correctly and below you find a suggestion for the pull request body:

Hi all,

This pull request contains a backport of commit 29f300eb from the openjdk/jdk11u-dev repository.

The commit being backported was authored by Jiawei Tang on 11 Mar 2024 and was reviewed by Paul Hohensee.

Thanks!

If you need to update the source branch of the pull then run the following commands in a local clone of your personal fork of openjdk/jdk8u-dev:

$ git fetch https://github.com/openjdk-bots/jdk8u-dev.git backport-jia-wei-tang-29f300eb:backport-jia-wei-tang-29f300eb
$ git checkout backport-jia-wei-tang-29f300eb
# make changes
$ git add paths/to/changed/files
$ git commit --message 'Describe additional changes made'
$ git push https://github.com/openjdk-bots/jdk8u-dev.git backport-jia-wei-tang-29f300eb

Please sign in to comment.