Skip to content

Commit

Permalink
8275049: [ZGC] missing null check in ZNMethod::log_register
Browse files Browse the repository at this point in the history
Reviewed-by: nradomski, eosterlund, pliden
  • Loading branch information
TheRealMDoerr committed Oct 13, 2021
1 parent ab34cce commit cf82867
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/hotspot/share/gc/z/zNMethod.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -126,8 +126,10 @@ void ZNMethod::log_register(const nmethod* nm) {
oop* const begin = nm->oops_begin();
oop* const end = nm->oops_end();
for (oop* p = begin; p < end; p++) {
const oop o = Atomic::load(p); // C1 PatchingStub may replace it concurrently.
const char* external_name = (o == nullptr) ? "N/A" : o->klass()->external_name();
log_oops.print(" Oop[" SIZE_FORMAT "] " PTR_FORMAT " (%s)",
(p - begin), p2i(*p), (*p)->klass()->external_name());
(p - begin), p2i(o), external_name);
}
}

Expand Down

3 comments on commit cf82867

@openjdk-notifier
Copy link

Choose a reason for hiding this comment

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

@TheRealMDoerr
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 jdk17u

@openjdk
Copy link

@openjdk openjdk bot commented on cf82867 Oct 15, 2021

Choose a reason for hiding this comment

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

@TheRealMDoerr @TheRealMDoerr the backport was successfully created on the branch TheRealMDoerr-backport-cf828673 in my personal fork of openjdk/jdk17u. To create a pull request with this backport targeting openjdk/jdk17u: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 cf828673 from the openjdk/jdk repository.

The commit being backported was authored by Martin Doerr on 13 Oct 2021 and was reviewed by Niklas Radomski, Erik Österlund and Per Liden.

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/jdk17u:

$ git fetch https://github.com/openjdk-bots/jdk17u TheRealMDoerr-backport-cf828673:TheRealMDoerr-backport-cf828673
$ git checkout TheRealMDoerr-backport-cf828673
# make changes
$ git add paths/to/changed/files
$ git commit --message 'Describe additional changes made'
$ git push https://github.com/openjdk-bots/jdk17u TheRealMDoerr-backport-cf828673

Please sign in to comment.