mirror of
https://github.com/openjdk/jdk.git
synced 2026-03-19 04:13:07 +00:00
8358645: Access violation in ThreadsSMRSupport::print_info_on during thread dump
Reviewed-by: fbredberg, shade, dcubed
This commit is contained in:
parent
20e0055e20
commit
334683e634
@ -1168,9 +1168,10 @@ void ThreadsSMRSupport::print_info_on(const Thread* thread, outputStream* st) {
|
||||
// The count is only interesting if we have a _threads_list_ptr.
|
||||
st->print(", _nested_threads_hazard_ptr_cnt=%u", thread->_nested_threads_hazard_ptr_cnt);
|
||||
}
|
||||
if (SafepointSynchronize::is_at_safepoint() || Thread::current() == thread) {
|
||||
// It is only safe to walk the list if we're at a safepoint or the
|
||||
// calling thread is walking its own list.
|
||||
if ((SafepointSynchronize::is_at_safepoint() && thread->is_Java_thread()) ||
|
||||
Thread::current() == thread) {
|
||||
// It is only safe to walk the list if we're at a safepoint and processing a JavaThread,
|
||||
// or the calling thread is walking its own list.
|
||||
SafeThreadsListPtr* current = thread->_threads_list_ptr;
|
||||
if (current != nullptr) {
|
||||
// Skip the top nesting level as it is always printed above.
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user