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