changeset 51432:0fb45c3b185e

8205648: fix for 8205195 breaks secondary error handling Summary: Only grab Threads_lock in VMError::controlled_crash() when we don't already own it. Reviewed-by: sspitsyn, stuefe
author dcubed
date Tue, 26 Jun 2018 14:15:49 -0400
parents 07365663f130
children f9ae777f71ee
files src/hotspot/share/utilities/vmError.cpp
diffstat 1 files changed, 1 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/src/hotspot/share/utilities/vmError.cpp	Tue Jun 26 14:14:29 2018 -0300
+++ b/src/hotspot/share/utilities/vmError.cpp	Tue Jun 26 14:15:49 2018 -0400
@@ -1703,7 +1703,7 @@
   // from racing with Threads::add() or Threads::remove() as we
   // generate the hs_err_pid file. This makes our ErrorHandling tests
   // more stable.
-  MutexLockerEx ml(Threads_lock, Mutex::_no_safepoint_check_flag);
+  MutexLockerEx ml(Threads_lock->owned_by_self() ? NULL : Threads_lock, Mutex::_no_safepoint_check_flag);
 
   switch (how) {
     case  1: vmassert(str == NULL, "expected null"); break;