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