forked from pool/glibc
Accepting request 407107 from home:Andreas_Schwab:Factory
- strncat-avoid-array-bounds-warning.patch: Avoid array-bounds warning for stncat on i586 (BZ #20260) - Update glibc.keyring - Unset MALLOC_CHECK_ during testsuite run - nsswitch.conf: Add fallback to files for passwd and group to prepare for libnsl removal. - nis-initgroups-status.patch: Return proper status from _nss_nis_initgroups_dyn (bsc#984269, BZ #20262) - robust-mutex-deadlock.patch: Fix generic __lll_robust_timedlock_wait to check for timeout (bsc#985170, BZ #20263) OBS-URL: https://build.opensuse.org/request/show/407107 OBS-URL: https://build.opensuse.org/package/show/Base:System/glibc?expand=0&rev=442
This commit is contained in:
parent
ba646d627b
commit
e794ddb00b
@ -1,3 +1,25 @@
|
||||
-------------------------------------------------------------------
|
||||
Wed Jun 29 12:50:21 UTC 2016 - schwab@suse.de
|
||||
|
||||
- strncat-avoid-array-bounds-warning.patch: Avoid array-bounds warning for
|
||||
stncat on i586 (BZ #20260)
|
||||
- Update glibc.keyring
|
||||
- Unset MALLOC_CHECK_ during testsuite run
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Thu Jun 23 07:41:06 UTC 2016 - schwab@suse.de
|
||||
|
||||
- nsswitch.conf: Add fallback to files for passwd and group to prepare for
|
||||
libnsl removal.
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Wed Jun 22 09:08:02 UTC 2016 - schwab@suse.de
|
||||
|
||||
- nis-initgroups-status.patch: Return proper status from
|
||||
_nss_nis_initgroups_dyn (bsc#984269, BZ #20262)
|
||||
- robust-mutex-deadlock.patch: Fix generic __lll_robust_timedlock_wait to
|
||||
check for timeout (bsc#985170, BZ #20263)
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Thu Jun 9 09:17:10 UTC 2016 - schwab@suse.de
|
||||
|
||||
|
@ -120,7 +120,7 @@ Source: http://ftp.gnu.org/pub/gnu/glibc/glibc-%{version}.tar.xz
|
||||
%if !%{build_snapshot}
|
||||
Source1: http://ftp.gnu.org/pub/gnu/glibc/glibc-%{version}.tar.xz.sig
|
||||
%endif
|
||||
Source2: glibc.keyring
|
||||
Source2: http://savannah.gnu.org/project/memberlist-gpgkeys.php?group=libc&download=1#/glibc.keyring
|
||||
Source3: noversion.tar.bz2
|
||||
Source4: manpages.tar.bz2
|
||||
Source5: nsswitch.conf
|
||||
@ -310,6 +310,12 @@ Patch1055: 0056-Fix-strfmon_l-Use-specified-locale-for-number-format.patch
|
||||
Patch1056: clntudp-call-alloca.patch
|
||||
# PATCH-FIX-UPSTREAM Fix nscd assertion failure in gc (BZ #19755)
|
||||
Patch1057: nscd-gc-crash.patch
|
||||
# PATCH-FIX-UPSTREAM Return proper status from _nss_nis_initgroups_dyn (BZ #20262)
|
||||
Patch1058: nis-initgroups-status.patch
|
||||
# PATCH-FIX-UPSTREAM Fix generic __lll_robust_timedlock_wait to check for timeout (BZ #20263)
|
||||
Patch1059: robust-mutex-deadlock.patch
|
||||
# PATCH-FIX-UPSTREAM Avoid array-bounds warning for strncat on i586 (BZ #20260)
|
||||
Patch1060: strncat-avoid-array-bounds-warning.patch
|
||||
|
||||
###
|
||||
# Patches awaiting upstream approval
|
||||
@ -590,6 +596,9 @@ rm nscd/s-stamp
|
||||
%patch1055 -p1
|
||||
%patch1056 -p1
|
||||
%patch1057 -p1
|
||||
%patch1058 -p1
|
||||
%patch1059 -p1
|
||||
%patch1060 -p1
|
||||
|
||||
%patch2000 -p1
|
||||
%patch2001 -p1
|
||||
@ -857,6 +866,8 @@ popd
|
||||
export SUSE_ASNEEDED=0
|
||||
# Increase timeout
|
||||
export TIMEOUTFACTOR=16
|
||||
# The testsuite does its own malloc checking
|
||||
unset MALLOC_CHECK_
|
||||
make -C cc-base -k check || {
|
||||
cd cc-base
|
||||
o=$-
|
||||
|
@ -1,3 +1,25 @@
|
||||
-------------------------------------------------------------------
|
||||
Wed Jun 29 12:50:21 UTC 2016 - schwab@suse.de
|
||||
|
||||
- strncat-avoid-array-bounds-warning.patch: Avoid array-bounds warning for
|
||||
stncat on i586 (BZ #20260)
|
||||
- Update glibc.keyring
|
||||
- Unset MALLOC_CHECK_ during testsuite run
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Thu Jun 23 07:41:06 UTC 2016 - schwab@suse.de
|
||||
|
||||
- nsswitch.conf: Add fallback to files for passwd and group to prepare for
|
||||
libnsl removal.
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Wed Jun 22 09:08:02 UTC 2016 - schwab@suse.de
|
||||
|
||||
- nis-initgroups-status.patch: Return proper status from
|
||||
_nss_nis_initgroups_dyn (bsc#984269, BZ #20262)
|
||||
- robust-mutex-deadlock.patch: Fix generic __lll_robust_timedlock_wait to
|
||||
check for timeout (bsc#985170, BZ #20263)
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Thu Jun 9 09:17:10 UTC 2016 - schwab@suse.de
|
||||
|
||||
|
@ -119,7 +119,7 @@ Source: http://ftp.gnu.org/pub/gnu/glibc/glibc-%{version}.tar.xz
|
||||
%if !%{build_snapshot}
|
||||
Source1: http://ftp.gnu.org/pub/gnu/glibc/glibc-%{version}.tar.xz.sig
|
||||
%endif
|
||||
Source2: glibc.keyring
|
||||
Source2: http://savannah.gnu.org/project/memberlist-gpgkeys.php?group=libc&download=1#/glibc.keyring
|
||||
Source3: noversion.tar.bz2
|
||||
Source4: manpages.tar.bz2
|
||||
Source5: nsswitch.conf
|
||||
@ -309,6 +309,12 @@ Patch1055: 0056-Fix-strfmon_l-Use-specified-locale-for-number-format.patch
|
||||
Patch1056: clntudp-call-alloca.patch
|
||||
# PATCH-FIX-UPSTREAM Fix nscd assertion failure in gc (BZ #19755)
|
||||
Patch1057: nscd-gc-crash.patch
|
||||
# PATCH-FIX-UPSTREAM Return proper status from _nss_nis_initgroups_dyn (BZ #20262)
|
||||
Patch1058: nis-initgroups-status.patch
|
||||
# PATCH-FIX-UPSTREAM Fix generic __lll_robust_timedlock_wait to check for timeout (BZ #20263)
|
||||
Patch1059: robust-mutex-deadlock.patch
|
||||
# PATCH-FIX-UPSTREAM Avoid array-bounds warning for strncat on i586 (BZ #20260)
|
||||
Patch1060: strncat-avoid-array-bounds-warning.patch
|
||||
|
||||
###
|
||||
# Patches awaiting upstream approval
|
||||
@ -590,6 +596,9 @@ rm nscd/s-stamp
|
||||
%patch1055 -p1
|
||||
%patch1056 -p1
|
||||
%patch1057 -p1
|
||||
%patch1058 -p1
|
||||
%patch1059 -p1
|
||||
%patch1060 -p1
|
||||
|
||||
%patch2000 -p1
|
||||
%patch2001 -p1
|
||||
@ -857,6 +866,8 @@ popd
|
||||
export SUSE_ASNEEDED=0
|
||||
# Increase timeout
|
||||
export TIMEOUTFACTOR=16
|
||||
# The testsuite does its own malloc checking
|
||||
unset MALLOC_CHECK_
|
||||
make -C cc-base -k check || {
|
||||
cd cc-base
|
||||
o=$-
|
||||
|
@ -1,3 +1,25 @@
|
||||
-------------------------------------------------------------------
|
||||
Wed Jun 29 12:50:21 UTC 2016 - schwab@suse.de
|
||||
|
||||
- strncat-avoid-array-bounds-warning.patch: Avoid array-bounds warning for
|
||||
stncat on i586 (BZ #20260)
|
||||
- Update glibc.keyring
|
||||
- Unset MALLOC_CHECK_ during testsuite run
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Thu Jun 23 07:41:06 UTC 2016 - schwab@suse.de
|
||||
|
||||
- nsswitch.conf: Add fallback to files for passwd and group to prepare for
|
||||
libnsl removal.
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Wed Jun 22 09:08:02 UTC 2016 - schwab@suse.de
|
||||
|
||||
- nis-initgroups-status.patch: Return proper status from
|
||||
_nss_nis_initgroups_dyn (bsc#984269, BZ #20262)
|
||||
- robust-mutex-deadlock.patch: Fix generic __lll_robust_timedlock_wait to
|
||||
check for timeout (bsc#985170, BZ #20263)
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Thu Jun 9 09:17:10 UTC 2016 - schwab@suse.de
|
||||
|
||||
|
BIN
glibc.keyring
BIN
glibc.keyring
Binary file not shown.
13
glibc.spec
13
glibc.spec
@ -120,7 +120,7 @@ Source: http://ftp.gnu.org/pub/gnu/glibc/glibc-%{version}.tar.xz
|
||||
%if !%{build_snapshot}
|
||||
Source1: http://ftp.gnu.org/pub/gnu/glibc/glibc-%{version}.tar.xz.sig
|
||||
%endif
|
||||
Source2: glibc.keyring
|
||||
Source2: http://savannah.gnu.org/project/memberlist-gpgkeys.php?group=libc&download=1#/glibc.keyring
|
||||
Source3: noversion.tar.bz2
|
||||
Source4: manpages.tar.bz2
|
||||
Source5: nsswitch.conf
|
||||
@ -310,6 +310,12 @@ Patch1055: 0056-Fix-strfmon_l-Use-specified-locale-for-number-format.patch
|
||||
Patch1056: clntudp-call-alloca.patch
|
||||
# PATCH-FIX-UPSTREAM Fix nscd assertion failure in gc (BZ #19755)
|
||||
Patch1057: nscd-gc-crash.patch
|
||||
# PATCH-FIX-UPSTREAM Return proper status from _nss_nis_initgroups_dyn (BZ #20262)
|
||||
Patch1058: nis-initgroups-status.patch
|
||||
# PATCH-FIX-UPSTREAM Fix generic __lll_robust_timedlock_wait to check for timeout (BZ #20263)
|
||||
Patch1059: robust-mutex-deadlock.patch
|
||||
# PATCH-FIX-UPSTREAM Avoid array-bounds warning for strncat on i586 (BZ #20260)
|
||||
Patch1060: strncat-avoid-array-bounds-warning.patch
|
||||
|
||||
###
|
||||
# Patches awaiting upstream approval
|
||||
@ -590,6 +596,9 @@ rm nscd/s-stamp
|
||||
%patch1055 -p1
|
||||
%patch1056 -p1
|
||||
%patch1057 -p1
|
||||
%patch1058 -p1
|
||||
%patch1059 -p1
|
||||
%patch1060 -p1
|
||||
|
||||
%patch2000 -p1
|
||||
%patch2001 -p1
|
||||
@ -857,6 +866,8 @@ popd
|
||||
export SUSE_ASNEEDED=0
|
||||
# Increase timeout
|
||||
export TIMEOUTFACTOR=16
|
||||
# The testsuite does its own malloc checking
|
||||
unset MALLOC_CHECK_
|
||||
make -C cc-base -k check || {
|
||||
cd cc-base
|
||||
o=$-
|
||||
|
53
nis-initgroups-status.patch
Normal file
53
nis-initgroups-status.patch
Normal file
@ -0,0 +1,53 @@
|
||||
[BZ #20262]
|
||||
* nis/nss_nis/nis-initgroups.c (_nss_nis_initgroups_dyn): Return
|
||||
NSS_STATUS_SUCCESS when done. Return NSS_STATUS_TRYAGAIN when out
|
||||
of memory.
|
||||
|
||||
Index: glibc-2.23/nis/nss_nis/nis-initgroups.c
|
||||
===================================================================
|
||||
--- glibc-2.23.orig/nis/nss_nis/nis-initgroups.c
|
||||
+++ glibc-2.23/nis/nss_nis/nis-initgroups.c
|
||||
@@ -266,7 +266,7 @@ _nss_nis_initgroups_dyn (const char *use
|
||||
|
||||
tmpbuf = __alloca (buflen);
|
||||
|
||||
- do
|
||||
+ while (1)
|
||||
{
|
||||
while ((status =
|
||||
internal_getgrent_r (&grpbuf, tmpbuf, buflen, errnop,
|
||||
@@ -275,8 +275,11 @@ _nss_nis_initgroups_dyn (const char *use
|
||||
tmpbuf = extend_alloca (tmpbuf, buflen, 2 * buflen);
|
||||
|
||||
if (status != NSS_STATUS_SUCCESS)
|
||||
- goto done;
|
||||
-
|
||||
+ {
|
||||
+ if (status == NSS_STATUS_NOTFOUND)
|
||||
+ status = NSS_STATUS_SUCCESS;
|
||||
+ goto done;
|
||||
+ }
|
||||
|
||||
g = &grpbuf;
|
||||
if (g->gr_gid != group)
|
||||
@@ -304,7 +307,11 @@ _nss_nis_initgroups_dyn (const char *use
|
||||
|
||||
newgroups = realloc (groups, newsize * sizeof (*groups));
|
||||
if (newgroups == NULL)
|
||||
- goto done;
|
||||
+ {
|
||||
+ status = NSS_STATUS_TRYAGAIN;
|
||||
+ *errnop = errno;
|
||||
+ goto done;
|
||||
+ }
|
||||
*groupsp = groups = newgroups;
|
||||
*size = newsize;
|
||||
}
|
||||
@@ -316,7 +323,6 @@ _nss_nis_initgroups_dyn (const char *use
|
||||
}
|
||||
}
|
||||
}
|
||||
- while (status == NSS_STATUS_SUCCESS);
|
||||
|
||||
done:
|
||||
while (intern.start != NULL)
|
@ -26,8 +26,8 @@
|
||||
# shadow: files nis
|
||||
# group: files nis
|
||||
|
||||
passwd: compat
|
||||
group: compat
|
||||
passwd: compat [NOTFOUND=return] files
|
||||
group: compat [NOTFOUND=return] files
|
||||
|
||||
hosts: files dns
|
||||
networks: files dns
|
||||
|
152
robust-mutex-deadlock.patch
Normal file
152
robust-mutex-deadlock.patch
Normal file
@ -0,0 +1,152 @@
|
||||
[BZ #20263]
|
||||
* nptl/lowlevelrobustlock.c (__lll_robust_timedlock_wait)
|
||||
[__ASSUME_FUTEX_CLOCK_REALTIME]: Check for timeout from
|
||||
lll_futex_timed_wait_bitset.
|
||||
* nptl/tst-robust10.c: New test.
|
||||
* nptl/Makefile (tests): Add tst-robust10.
|
||||
|
||||
Index: glibc-2.23/nptl/Makefile
|
||||
===================================================================
|
||||
--- glibc-2.23.orig/nptl/Makefile
|
||||
+++ glibc-2.23/nptl/Makefile
|
||||
@@ -288,7 +288,7 @@ tests = tst-typesizes \
|
||||
tst-initializers1 $(addprefix tst-initializers1-,\
|
||||
c89 gnu89 c99 gnu99 c11 gnu11) \
|
||||
tst-bad-schedattr \
|
||||
- tst-thread_local1 tst-mutex-errorcheck
|
||||
+ tst-thread_local1 tst-mutex-errorcheck tst-robust10
|
||||
xtests = tst-setuid1 tst-setuid1-static tst-setuid2 \
|
||||
tst-mutexpp1 tst-mutexpp6 tst-mutexpp10
|
||||
test-srcs = tst-oddstacklimit
|
||||
Index: glibc-2.23/nptl/lowlevelrobustlock.c
|
||||
===================================================================
|
||||
--- glibc-2.23.orig/nptl/lowlevelrobustlock.c
|
||||
+++ glibc-2.23/nptl/lowlevelrobustlock.c
|
||||
@@ -118,8 +118,10 @@ __lll_robust_timedlock_wait (int *futex,
|
||||
|| !defined lll_futex_timed_wait_bitset)
|
||||
lll_futex_timed_wait (futex, newval, &rt, private);
|
||||
#else
|
||||
- lll_futex_timed_wait_bitset (futex, newval, abstime,
|
||||
- FUTEX_CLOCK_REALTIME, private);
|
||||
+ int err = lll_futex_timed_wait_bitset (futex, newval, abstime,
|
||||
+ FUTEX_CLOCK_REALTIME, private);
|
||||
+ if (err == -ETIMEDOUT)
|
||||
+ return -err;
|
||||
#endif
|
||||
|
||||
try:
|
||||
Index: glibc-2.23/nptl/tst-robust10.c
|
||||
===================================================================
|
||||
--- /dev/null
|
||||
+++ glibc-2.23/nptl/tst-robust10.c
|
||||
@@ -0,0 +1,110 @@
|
||||
+/* Test that pthread_mutex_timedlock properly times out.
|
||||
+ Copyright (C) 2016 Free Software Foundation, Inc.
|
||||
+ This file is part of the GNU C Library.
|
||||
+
|
||||
+ The GNU C Library is free software; you can redistribute it and/or
|
||||
+ modify it under the terms of the GNU Lesser General Public
|
||||
+ License as published by the Free Software Foundation; either
|
||||
+ version 2.1 of the License, or (at your option) any later version.
|
||||
+
|
||||
+ The GNU C Library is distributed in the hope that it will be useful,
|
||||
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
+ Lesser General Public License for more details.
|
||||
+
|
||||
+ You should have received a copy of the GNU Lesser General Public
|
||||
+ License along with the GNU C Library; if not, see
|
||||
+ <http://www.gnu.org/licenses/>. */
|
||||
+
|
||||
+#include <pthread.h>
|
||||
+#include <stdio.h>
|
||||
+#include <stdlib.h>
|
||||
+#include <string.h>
|
||||
+#include <errno.h>
|
||||
+
|
||||
+pthread_mutex_t mutex;
|
||||
+
|
||||
+static void *
|
||||
+thr (void *arg)
|
||||
+{
|
||||
+ struct timespec abstime;
|
||||
+ clock_gettime (CLOCK_REALTIME, &abstime);
|
||||
+ abstime.tv_sec += 1;
|
||||
+ int ret = pthread_mutex_timedlock (&mutex, &abstime);
|
||||
+ if (ret == 0)
|
||||
+ {
|
||||
+ puts ("mutex_timedlock didn't fail");
|
||||
+ exit (1);
|
||||
+ }
|
||||
+ if (ret != ETIMEDOUT)
|
||||
+ {
|
||||
+ printf ("mutex_timedlock failed: %s\n", strerror (ret));
|
||||
+ exit (1);
|
||||
+ }
|
||||
+
|
||||
+ return 0;
|
||||
+}
|
||||
+
|
||||
+static int
|
||||
+do_test (void)
|
||||
+{
|
||||
+ pthread_t pt;
|
||||
+ pthread_mutexattr_t ma;
|
||||
+
|
||||
+ if (pthread_mutexattr_init (&ma) != 0)
|
||||
+ {
|
||||
+ puts ("mutexattr_init failed");
|
||||
+ return 0;
|
||||
+ }
|
||||
+ if (pthread_mutexattr_setrobust_np (&ma, PTHREAD_MUTEX_ROBUST_NP) != 0)
|
||||
+ {
|
||||
+ puts ("mutexattr_setrobust failed");
|
||||
+ return 1;
|
||||
+ }
|
||||
+ if (pthread_mutex_init (&mutex, &ma))
|
||||
+ {
|
||||
+ puts ("mutex_init failed");
|
||||
+ return 1;
|
||||
+ }
|
||||
+
|
||||
+ if (pthread_mutexattr_destroy (&ma))
|
||||
+ {
|
||||
+ puts ("mutexattr_destroy failed");
|
||||
+ return 1;
|
||||
+ }
|
||||
+
|
||||
+ if (pthread_mutex_lock (&mutex))
|
||||
+ {
|
||||
+ puts ("mutex_lock failed");
|
||||
+ return 1;
|
||||
+ }
|
||||
+
|
||||
+ if (pthread_create (&pt, NULL, thr, NULL))
|
||||
+ {
|
||||
+ puts ("pthread_create failed");
|
||||
+ return 1;
|
||||
+ }
|
||||
+
|
||||
+ if (pthread_join (pt, NULL))
|
||||
+ {
|
||||
+ puts ("pthread_join failed");
|
||||
+ return 1;
|
||||
+ }
|
||||
+
|
||||
+ if (pthread_mutex_unlock (&mutex))
|
||||
+ {
|
||||
+ puts ("mutex_unlock failed");
|
||||
+ return 1;
|
||||
+ }
|
||||
+
|
||||
+ if (pthread_mutex_destroy (&mutex))
|
||||
+ {
|
||||
+ puts ("mutex_destroy failed");
|
||||
+ return 1;
|
||||
+ }
|
||||
+
|
||||
+ return 0;
|
||||
+}
|
||||
+
|
||||
+#define TEST_FUNCTION do_test ()
|
||||
+#include "../test-skeleton.c"
|
31
strncat-avoid-array-bounds-warning.patch
Normal file
31
strncat-avoid-array-bounds-warning.patch
Normal file
@ -0,0 +1,31 @@
|
||||
Subject: [PATCH] Avoid array-bounds warning for strncat on i586
|
||||
|
||||
[BZ #20260]
|
||||
* sysdeps/x86/bits/string.h (__strncat_g) [!__i686__]: Compute the
|
||||
address before the beginning of the string as an integer to avoid
|
||||
array-bounds warning.
|
||||
|
||||
diff --git a/sysdeps/x86/bits/string.h b/sysdeps/x86/bits/string.h
|
||||
index 8dfce05..805d33f 100644
|
||||
--- a/sysdeps/x86/bits/string.h
|
||||
+++ b/sysdeps/x86/bits/string.h
|
||||
@@ -1089,7 +1089,6 @@ __strncat_g (char *__dest, const char __src[], size_t __n)
|
||||
: "g" (__n), "0" (0), "1" (__tmp), "2" (__src), "3" (0xffffffff)
|
||||
: "memory", "cc");
|
||||
# else
|
||||
- --__tmp;
|
||||
__asm__ __volatile__
|
||||
("1:\n\t"
|
||||
"cmpb $0,1(%1)\n\t"
|
||||
@@ -1108,7 +1107,7 @@ __strncat_g (char *__dest, const char __src[], size_t __n)
|
||||
"3:\n\t"
|
||||
"movb $0,(%1)"
|
||||
: "=&q" (__dummy), "=&r" (__tmp), "=&r" (__src), "=&r" (__n)
|
||||
- : "1" (__tmp), "2" (__src), "3" (__n)
|
||||
+ : "1" ((unsigned long) __tmp - 1), "2" (__src), "3" (__n)
|
||||
: "memory", "cc");
|
||||
#endif
|
||||
return __dest;
|
||||
--
|
||||
2.9.0
|
||||
|
Loading…
Reference in New Issue
Block a user