25845f
commit 05598a0907cad1350962e89b781215209a785d92
25845f
Author: Patsy Franklin <pfrankli@redhat.com>
25845f
Date:   Tue Jun 26 10:35:03 2018 -0400
25845f
25845f
    In sem_open.c,  pad was not initialized when __HAVE_64B_ATOMICS was
25845f
    true.  On some arches this caused valgrind to warn about uninitialized
25845f
    bytes when the struct was written to the file system.
25845f
    
25845f
    This patch moves the initialization of pad outside of the
25845f
    conditional.
25845f
25845f
    Reviewed-by: Carlos O'Donell <carlos@redhat.com>
25845f
25845f
diff -Nrup a/nptl/sem_open.c b/nptl/sem_open.c
25845f
--- a/nptl/sem_open.c	2018-06-20 10:27:01.110844222 -0400
25845f
+++ b/nptl/sem_open.c	2018-06-27 11:15:33.677892273 -0400
25845f
@@ -313,6 +313,9 @@ sem_open (const char *name, int oflag, .
25845f
       sem.newsem.value = value << SEM_VALUE_SHIFT;
25845f
       sem.newsem.nwaiters = 0;
25845f
 #endif
25845f
+      /* pad is used as a mutex on pre-v9 sparc and ignored otherwise.  */
25845f
+      sem.newsem.pad = 0;
25845f
+
25845f
       /* This always is a shared semaphore.  */
25845f
       sem.newsem.private = LLL_SHARED;
25845f