Files nptl~/.old_pthread_cond_broadcast.c.swp and nptl/.old_pthread_cond_broadcast.c.swp differ
diff -pruN nptl~/old_pthread_cond_broadcast.c nptl/old_pthread_cond_broadcast.c
--- nptl~/old_pthread_cond_broadcast.c	2010-04-14 17:19:37.003332000 +0200
+++ nptl/old_pthread_cond_broadcast.c	2010-04-14 17:21:40.086023000 +0200
@@ -24,6 +24,8 @@
 #include <shlib-compat.h>
 
 
+#include "old_pthread_cond_util.c"
+
 #if SHLIB_COMPAT(libpthread, GLIBC_2_0, GLIBC_2_3_2)
 int
 __pthread_cond_broadcast_2_0 (cond)
@@ -34,11 +36,11 @@ __pthread_cond_broadcast_2_0 (cond)
       pthread_cond_t *newcond;
 
 #if LLL_MUTEX_LOCK_INITIALIZER == 0
-      newcond = (pthread_cond_t *) calloc (sizeof (pthread_cond_t), 1);
+      newcond = (pthread_cond_t *) __myalloc (sizeof (pthread_cond_t));
       if (newcond == NULL)
 	return ENOMEM;
 #else
-      newcond = (pthread_cond_t *) malloc (sizeof (pthread_cond_t));
+      newcond = (pthread_cond_t *) __myalloc (sizeof (pthread_cond_t));
       if (newcond == NULL)
 	return ENOMEM;
 
@@ -48,7 +50,7 @@ __pthread_cond_broadcast_2_0 (cond)
 
       if (atomic_compare_and_exchange_bool_acq (&cond->cond, newcond, NULL))
 	/* Somebody else just initialized the condvar.  */
-	free (newcond);
+	__myrelease (newcond, sizeof(*newcond));
     }
 
   return __pthread_cond_broadcast (cond->cond);
diff -pruN nptl~/old_pthread_cond_destroy.c nptl/old_pthread_cond_destroy.c
--- nptl~/old_pthread_cond_destroy.c	2010-04-14 17:19:18.630078000 +0200
+++ nptl/old_pthread_cond_destroy.c	2010-04-14 17:22:19.725431000 +0200
@@ -22,13 +22,15 @@
 #include <shlib-compat.h>
 
 
+#include "old_pthread_cond_util.c"
+
 #if SHLIB_COMPAT(libpthread, GLIBC_2_0, GLIBC_2_3_2)
 int
 __pthread_cond_destroy_2_0 (cond)
      pthread_cond_2_0_t *cond;
 {
   /* Free the memory which was eventually allocated.  */
-  free (cond->cond);
+  __myrelease (cond->cond, sizeof(*cond->cond));
 
   return 0;
 }
diff -pruN nptl~/old_pthread_cond_signal.c nptl/old_pthread_cond_signal.c
--- nptl~/old_pthread_cond_signal.c	2010-04-14 17:19:37.271346000 +0200
+++ nptl/old_pthread_cond_signal.c	2010-04-14 17:23:04.186292000 +0200
@@ -24,6 +24,8 @@
 #include <shlib-compat.h>
 
 
+#include "old_pthread_cond_util.c"
+
 #if SHLIB_COMPAT(libpthread, GLIBC_2_0, GLIBC_2_3_2)
 int
 __pthread_cond_signal_2_0 (cond)
@@ -34,11 +36,11 @@ __pthread_cond_signal_2_0 (cond)
       pthread_cond_t *newcond;
 
 #if LLL_MUTEX_LOCK_INITIALIZER == 0
-      newcond = (pthread_cond_t *) calloc (sizeof (pthread_cond_t), 1);
+      newcond = (pthread_cond_t *) __myalloc (sizeof (pthread_cond_t));
       if (newcond == NULL)
 	return ENOMEM;
 #else
-      newcond = (pthread_cond_t *) malloc (sizeof (pthread_cond_t));
+      newcond = (pthread_cond_t *) __myalloc (sizeof (pthread_cond_t));
       if (newcond == NULL)
 	return ENOMEM;
 
@@ -48,7 +50,7 @@ __pthread_cond_signal_2_0 (cond)
 
       if (atomic_compare_and_exchange_bool_acq (&cond->cond, newcond, NULL))
 	/* Somebody else just initialized the condvar.  */
-	free (newcond);
+	__myrelease (newcond, sizeof(*newcond));
     }
 
   return __pthread_cond_signal (cond->cond);
diff -pruN nptl~/old_pthread_cond_timedwait.c nptl/old_pthread_cond_timedwait.c
--- nptl~/old_pthread_cond_timedwait.c	2010-04-14 17:19:19.672989000 +0200
+++ nptl/old_pthread_cond_timedwait.c	2010-04-14 17:23:34.695529000 +0200
@@ -24,6 +24,8 @@
 #include <shlib-compat.h>
 
 
+#include "old_pthread_cond_util.c"
+
 #if SHLIB_COMPAT(libpthread, GLIBC_2_0, GLIBC_2_3_2)
 int
 __pthread_cond_timedwait_2_0 (cond, mutex, abstime)
@@ -36,11 +38,11 @@ __pthread_cond_timedwait_2_0 (cond, mute
       pthread_cond_t *newcond;
 
 #if LLL_MUTEX_LOCK_INITIALIZER == 0
-      newcond = (pthread_cond_t *) calloc (sizeof (pthread_cond_t), 1);
+      newcond = (pthread_cond_t *) __myalloc (sizeof (pthread_cond_t));
       if (newcond == NULL)
 	return ENOMEM;
 #else
-      newcond = (pthread_cond_t *) malloc (sizeof (pthread_cond_t));
+      newcond = (pthread_cond_t *) __myalloc (sizeof (pthread_cond_t));
       if (newcond == NULL)
 	return ENOMEM;
 
@@ -50,7 +52,7 @@ __pthread_cond_timedwait_2_0 (cond, mute
 
       if (atomic_compare_and_exchange_bool_acq (&cond->cond, newcond, NULL))
 	/* Somebody else just initialized the condvar.  */
-	free (newcond);
+	__myrelease (newcond, sizeof(*newcond));
     }
 
   return __pthread_cond_timedwait (cond->cond, mutex, abstime);
diff -pruN nptl~/old_pthread_cond_util.c nptl/old_pthread_cond_util.c
--- nptl~/old_pthread_cond_util.c	1970-01-01 01:00:00.000000000 +0100
+++ nptl/old_pthread_cond_util.c	2010-04-14 17:27:39.314089000 +0200
@@ -0,0 +1,10 @@
+#include <sys/mman.h>
+
+static void *__myalloc(size_t s)
+{
+  return mmap(NULL, s, PROT_READ|PROT_WRITE, MAP_PRIVATE, -1, 0);
+}
+static void __myrelease(void *p, size_t s)
+{
+  mprotect(p, s, PROT_NONE);
+}
diff -pruN nptl~/old_pthread_cond_wait.c nptl/old_pthread_cond_wait.c
--- nptl~/old_pthread_cond_wait.c	2010-04-14 17:19:35.556521000 +0200
+++ nptl/old_pthread_cond_wait.c	2010-04-14 17:24:11.614123000 +0200
@@ -24,6 +24,8 @@
 #include <shlib-compat.h>
 
 
+#include "old_pthread_cond_util.c"
+
 #if SHLIB_COMPAT(libpthread, GLIBC_2_0, GLIBC_2_3_2)
 int
 __pthread_cond_wait_2_0 (cond, mutex)
@@ -35,11 +37,11 @@ __pthread_cond_wait_2_0 (cond, mutex)
       pthread_cond_t *newcond;
 
 #if LLL_MUTEX_LOCK_INITIALIZER == 0
-      newcond = (pthread_cond_t *) calloc (sizeof (pthread_cond_t), 1);
+      newcond = (pthread_cond_t *) __myalloc (sizeof (pthread_cond_t));
       if (newcond == NULL)
 	return ENOMEM;
 #else
-      newcond = (pthread_cond_t *) malloc (sizeof (pthread_cond_t));
+      newcond = (pthread_cond_t *) __myalloc (sizeof (pthread_cond_t));
       if (newcond == NULL)
 	return ENOMEM;
 
@@ -49,7 +51,7 @@ __pthread_cond_wait_2_0 (cond, mutex)
 
       if (atomic_compare_and_exchange_bool_acq (&cond->cond, newcond, NULL))
 	/* Somebody else just initialized the condvar.  */
-	free (newcond);
+	__myrelease (newcond, sizeof(*newcond));
     }
 
   return __pthread_cond_wait (cond->cond, mutex);
