Skip to content
This repository was archived by the owner on Aug 27, 2022. It is now read-only.
/ lanai Public archive

Commit a809ff0

Browse files
committedJun 3, 2020
8246434: Threads::print_on_error assumes that the heap has been set up
Reviewed-by: dholmes
1 parent b5678a4 commit a809ff0

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed
 

‎src/hotspot/share/runtime/thread.cpp

+4-2
Original file line numberDiff line numberDiff line change
@@ -4840,8 +4840,10 @@ void Threads::print_on_error(outputStream* st, Thread* current, char* buf,
48404840
print_on_error(VMThread::vm_thread(), st, current, buf, buflen, &found_current);
48414841
print_on_error(WatcherThread::watcher_thread(), st, current, buf, buflen, &found_current);
48424842

4843-
PrintOnErrorClosure print_closure(st, current, buf, buflen, &found_current);
4844-
Universe::heap()->gc_threads_do(&print_closure);
4843+
if (Universe::heap() != NULL) {
4844+
PrintOnErrorClosure print_closure(st, current, buf, buflen, &found_current);
4845+
Universe::heap()->gc_threads_do(&print_closure);
4846+
}
48454847

48464848
if (!found_current) {
48474849
st->cr();

0 commit comments

Comments
 (0)
This repository has been archived.