Bug #163 SMP ++local: Remove duplicate call to CmiDestroyLocks to fix double free... 03/503/4
authorYanhuaSun <sun51@illinois.edu>
Mon, 9 Feb 2015 17:23:26 +0000 (11:23 -0600)
committerGerrit Code Review <gerrit2@charm.cs.uiuc.edu>
Mon, 9 Feb 2015 19:25:55 +0000 (13:25 -0600)
Change-Id: I08df3721e9e03336b81dac57811227ea11e41243

src/arch/net/machine.c
src/arch/netlrts/machine.c
src/arch/util/machine-smp.c
src/arch/verbs/machine.c

index 72666f19dce3bb8a90d1c74211fb885aeaa42404..ada1db83c05c72c4b8e6a33a5cd8d7957d41ecbc 100644 (file)
@@ -409,7 +409,6 @@ static void KillOnAllSigs(int sigNo)
   }
 #endif
   
-  CmiDestroyLocks();
 
   if (sigNo==SIGSEGV) {
      sig="segmentation violation";
index b0d82b4e6125e5e4349ec20368e8ca639c486a09..b95f82d312bff3de4bed1612f1d2e8b4856ba47e 100644 (file)
@@ -366,7 +366,6 @@ static void KillOnAllSigs(int sigNo)
   }
 #endif
   
-  CmiDestroyLocks();
 
   if (sigNo==SIGSEGV) {
      sig="segmentation violation";
index 155381c2460b4846bd940aa7f2eb124eca14701f..166bbee07b813b2fc965299c355e7c4d0d8dd6bd 100644 (file)
@@ -249,6 +249,7 @@ static void CmiStartThreads(char **argv)
 static void CmiDestroyLocks()
 {
   CloseHandle(comm_mutex);
+  comm_mutex = 0;
   CloseHandle(CmiMemLock_lock);
   CmiMemLock_lock = 0;
   CloseHandle(barrier_mutex);
@@ -522,6 +523,7 @@ static void CmiStartThreads(char **argv)
 static void CmiDestroyLocks()
 {
   CmiDestroyLock(comm_mutex);
+  comm_mutex = 0;
   CmiDestroyLock(CmiMemLock_lock);
   CmiMemLock_lock = 0;
   pthread_mutex_destroy(&barrier_mutex);
index 0e622f6b29ef6a8f8e8b45583b27311ece319715..920d4ba067e7a03864616788d09498bd38780e26 100644 (file)
@@ -370,8 +370,6 @@ static void KillOnAllSigs(int sigNo)
   }
 #endif
   
-  CmiDestroyLocks();
-
   if (sigNo==SIGSEGV) {
      sig="segmentation violation";
      suggestion="Try running with '++debug', or linking with '-memory paranoid' (memory paranoid requires '+netpoll' at runtime).";