fa3bfd
This patch fixes a compile-time type mismatch.  No upstream
fa3bfd
patch; this originated in Fedora and upstream has changed the
fa3bfd
underlying code in a different way.
fa3bfd
fa3bfd
diff -rup a/malloc/hooks.c b/malloc/hooks.c
fa3bfd
--- a/malloc/hooks.c	2017-08-11 14:20:36.000000000 -0400
fa3bfd
+++ b/malloc/hooks.c	2017-08-11 15:43:15.939831964 -0400
fa3bfd
@@ -240,10 +240,10 @@ top_check(void)
fa3bfd
 	(char*)t + chunksize(t) == mp_.sbrk_base + main_arena.system_mem)))
fa3bfd
     return 0;
fa3bfd
 
fa3bfd
-  mutex_unlock(&main_arena);
fa3bfd
+  mutex_unlock(&main_arena.mutex);
fa3bfd
   malloc_printerr (check_action, "malloc: top chunk is corrupt", t,
fa3bfd
 		   &main_arena);
fa3bfd
-  mutex_lock(&main_arena);
fa3bfd
+  mutex_lock(&main_arena.mutex);
fa3bfd
 
fa3bfd
   /* Try to set up a new top chunk. */
fa3bfd
   brk = MORECORE(0);