mirror of
https://github.com/openjdk/jdk.git
synced 2026-02-08 09:35:16 +00:00
8212207: runtime/InternalApi/ThreadCpuTimesDeadlock.java crashes with SEGV in pthread_getcpuclockid+0x0
Skip non-JavaThreads that have not reached a minimal initialization point - setting their stack size Reviewed-by: kbarrett, stuefe
This commit is contained in:
parent
cb861252d7
commit
2bcaf34726
@ -1645,6 +1645,12 @@ void ThreadTimesClosure::do_thread(Thread* thread) {
|
||||
return;
|
||||
}
|
||||
|
||||
// NonJavaThread instances may not be fully initialized yet, so we need to
|
||||
// skip any that aren't - check for zero stack_size()
|
||||
if (!thread->is_Java_thread() && thread->stack_size() == 0) {
|
||||
return;
|
||||
}
|
||||
|
||||
if (_count >= _names_len || _count >= _times_len) {
|
||||
// skip if the result array is not big enough
|
||||
return;
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user