Skip to content

Commit 7f4ed50

Browse files
committed
8341020: Error handler crashes when Metaspace is not fully initialized
Reviewed-by: kbarrett, jsjolen, stefank, dholmes
1 parent f50bd0d commit 7f4ed50

File tree

1 file changed

+1
-1
lines changed
  • src/hotspot/share/runtime

1 file changed

+1
-1
lines changed

src/hotspot/share/runtime/os.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1290,7 +1290,7 @@ void os::print_location(outputStream* st, intptr_t x, bool verbose) {
12901290
}
12911291

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

0 commit comments

Comments
 (0)