# HG changeset patch # User jbachorik # Date 1428068435 -7200 # Node ID dc351997b749842813c739b2d624296803e2190d # Parent 2d8a6a2ee2794748c915e985bf7643e993c71acf 8074368: ThreadMXBean.getThreadInfo() corrupts memory when called with empty array for thread ids Reviewed-by: mchung diff -r 2d8a6a2ee279 -r dc351997b749 hotspot/src/share/vm/services/management.cpp --- a/hotspot/src/share/vm/services/management.cpp Tue Apr 07 20:18:28 2015 -0700 +++ b/hotspot/src/share/vm/services/management.cpp Fri Apr 03 15:40:35 2015 +0200 @@ -1109,6 +1109,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.