Skip to content

Commit

Permalink
8341020: Error handler crashes when Metaspace is not fully initialized
Browse files Browse the repository at this point in the history
Reviewed-by: kbarrett, jsjolen, stefank, dholmes
  • Loading branch information
shipilev committed Oct 18, 2024
1 parent f50bd0d commit 7f4ed50
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/hotspot/share/runtime/os.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1290,7 +1290,7 @@ void os::print_location(outputStream* st, intptr_t x, bool verbose) {
}

// Check if in metaspace and print types that have vptrs
if (Metaspace::contains(addr)) {
if (Metaspace::initialized() && Metaspace::contains(addr)) {
if (Klass::is_valid((Klass*)addr)) {
st->print_cr(INTPTR_FORMAT " is a pointer to class: ", p2i(addr));
((Klass*)addr)->print_on(st);
Expand Down

0 comments on commit 7f4ed50

Please sign in to comment.