Skip to content
Permalink
Browse files
8276429: CodeHeapState::print_names() fails with "assert(klass->is_lo…
…ader_alive()) failed: must be alive"

Reviewed-by: kvn
  • Loading branch information
eastig authored and Vladimir Kozlov committed Nov 4, 2021
1 parent a6fa6ed commit 5acff75379a4ad0acfcfc6a64fcc4b588ef048c7
Showing with 4 additions and 4 deletions.
  1. +4 −4 src/hotspot/share/code/codeHeapState.cpp
@@ -1,5 +1,5 @@
/*
* Copyright (c) 2018, 2019, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2018, 2021, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2018, 2019 SAP SE. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
@@ -2335,11 +2335,11 @@ void CodeHeapState::print_names(outputStream* out, CodeHeap* heap) {
Symbol* methSig = method->signature();
const char* methSigS = (methSig == NULL) ? NULL : methSig->as_C_string();
methSigS = (methSigS == NULL) ? "<method signature unavailable>" : methSigS;

Klass* klass = method->method_holder();
assert(klass->is_loader_alive(), "must be alive");
assert(klass != nullptr, "No method holder");
const char* classNameS = (klass->name() == nullptr) ? "<class name unavailable>" : klass->external_name();

ast->print("%s.", klass->external_name());
ast->print("%s.", classNameS);
ast->print("%s", methNameS);
ast->print("%s", methSigS);
} else {

1 comment on commit 5acff75

@openjdk-notifier
Copy link

@openjdk-notifier openjdk-notifier bot commented on 5acff75 Nov 4, 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.