Skip to content
This repository has been archived by the owner. It is now read-only.
Permalink
Browse files
8246434: Threads::print_on_error assumes that the heap has been set up
Reviewed-by: dholmes
  • Loading branch information
stefank committed Jun 3, 2020
1 parent b5678a4 commit a809ff0e3fcda815229fcdc8c44ce3bb2e71480c
Showing with 4 additions and 2 deletions.
  1. +4 −2 src/hotspot/share/runtime/thread.cpp
@@ -4840,8 +4840,10 @@ void Threads::print_on_error(outputStream* st, Thread* current, char* buf,
print_on_error(VMThread::vm_thread(), st, current, buf, buflen, &found_current);
print_on_error(WatcherThread::watcher_thread(), st, current, buf, buflen, &found_current);

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

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

0 comments on commit a809ff0

Please sign in to comment.