# HG changeset patch # User jbachorik # Date 1428068435 -7200 # Node ID eba0866f93796b93f7591b96519d91c9d0b06bea # Parent bf95d7ddba60912bda62bb11ef8e65a97802f575 8074368: ThreadMXBean.getThreadInfo() corrupts memory when called with empty array for thread ids Reviewed-by: mchung diff -r bf95d7ddba60 -r eba0866f9379 src/share/vm/services/management.cpp --- a/src/share/vm/services/management.cpp Mon Oct 12 19:31:16 2015 +0200 +++ b/src/share/vm/services/management.cpp Fri Apr 03 15:40:35 2015 +0200 @@ -1107,6 +1107,8 @@ 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.