mirror of
https://github.com/openjdk/jdk.git
synced 2026-02-13 11:55:38 +00:00
8074368: ThreadMXBean.getThreadInfo() corrupts memory when called with empty array for thread ids
Reviewed-by: mchung
This commit is contained in:
parent
89256b01cb
commit
ed433c58a0
@ -1109,6 +1109,8 @@ static void do_thread_dump(ThreadDumpResult* dump_result,
|
||||
bool with_locked_monitors,
|
||||
bool with_locked_synchronizers,
|
||||
TRAPS) {
|
||||
// no need to actually perform thread dump if no TIDs are specified
|
||||
if (num_threads == 0) return;
|
||||
|
||||
// First get an array of threadObj handles.
|
||||
// A JavaThread may terminate before we get the stack trace.
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user