Skip to content
Permalink
Browse files
8275049: [ZGC] missing null check in ZNMethod::log_register
Backport-of: cf828673a9b76fd3f26db9a3f714166861a65c9e
  • Loading branch information
TheRealMDoerr committed Oct 18, 2021
1 parent 451611f commit 8cb963440d90d77a5b6c5ff3a3128f5f3a58c9af
Showing 1 changed file with 3 additions and 1 deletion.
@@ -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);
}
}

1 comment on commit 8cb9634

@openjdk-notifier
Copy link

@openjdk-notifier openjdk-notifier bot commented on 8cb9634 Oct 18, 2021

Choose a reason for hiding this comment

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

Please sign in to comment.