mirror of
https://sourceware.org/git/glibc.git
synced 2024-11-22 04:50:07 +00:00
In sem_open.c, pad was not initialized when __HAVE_64B_ATOMICS was
true. On some arches this caused valgrind to warn about uninitialized bytes when the struct was written to the file system. This patch moves the initialization of pad outside of the conditional. Reviewed-by: Carlos O'Donell <carlos@redhat.com>
This commit is contained in:
parent
06ab719d30
commit
05598a0907
@ -1,3 +1,8 @@
|
||||
2018-06-26 Patsy Franklin <pfrankli@redhat.com>
|
||||
|
||||
* nptl/sem_open.c [!__HAVE_64B_ATOMICS] (sem_open): Don't update pad.
|
||||
(sem_open): Set sem.newsem.pad to zero for valgrind.
|
||||
|
||||
2018-06-26 Adhemerval Zanella <adhemerval.zanella@linaro.org>
|
||||
|
||||
[BZ #20251]
|
||||
|
@ -215,10 +215,11 @@ sem_open (const char *name, int oflag, ...)
|
||||
sem.newsem.data = value;
|
||||
#else
|
||||
sem.newsem.value = value << SEM_VALUE_SHIFT;
|
||||
/* pad is used as a mutex on pre-v9 sparc and ignored otherwise. */
|
||||
sem.newsem.pad = 0;
|
||||
sem.newsem.nwaiters = 0;
|
||||
#endif
|
||||
/* pad is used as a mutex on pre-v9 sparc and ignored otherwise. */
|
||||
sem.newsem.pad = 0;
|
||||
|
||||
/* This always is a shared semaphore. */
|
||||
sem.newsem.private = FUTEX_SHARED;
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user