[packages/glibc] - rel 2; few fixes from git

arekm arekm at pld-linux.org
Thu Sep 18 15:32:17 CEST 2014


commit dac4060dff0b01310c8dbd58b71682dfafbc9861
Author: Arkadiusz Miśkiewicz <arekm at maven.pl>
Date:   Thu Sep 18 15:32:07 2014 +0200

    - rel 2; few fixes from git

 glibc-git.patch | 136 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++
 glibc.spec      |  11 +++--
 2 files changed, 143 insertions(+), 4 deletions(-)
---
diff --git a/glibc.spec b/glibc.spec
index 6a0a107..4cde171 100644
--- a/glibc.spec
+++ b/glibc.spec
@@ -8,7 +8,7 @@
 # - math/{test-fenv,test-tgmath,test-float,test-ifloat}, debug/backtrace-tst(SEGV)  fail on alpha
 #
 # Conditional build:
-# min_kernel	(default is 2.6.16)
+# min_kernel	(default is 2.6.32)
 %bcond_without	memusage	# don't build memusage utility
 %bcond_without	selinux		# without SELinux support (in nscd)
 %bcond_with	tests		# perform "make test"
@@ -35,7 +35,7 @@ Summary(tr.UTF-8):	GNU libc
 Summary(uk.UTF-8):	GNU libc версії
 Name:		glibc
 Version:	%{core_version}
-Release:	1
+Release:	2
 Epoch:		6
 License:	LGPL v2.1+
 Group:		Libraries
@@ -51,6 +51,7 @@ Source6:	%{name}-localedb-gen
 Source7:	%{name}-LD-path.c
 Source8:	nscd.upstart
 Source9:	nscd.tmpfiles
+Patch0:		%{name}-git.patch
 # against GNU TP (libc domain)
 #Patch1:		%{name}-pl.po-update.patch
 Patch2:		%{name}-pld.patch
@@ -935,10 +936,12 @@ Narzędzie do profilowania zużycia pamięci.
 %prep
 %setup -q
 
-%if "%{min_kernel}" < "2.6.16"
-echo "Minimal supported kernel is 2.6.16" >&2
+%if "%{min_kernel}" < "2.6.32"
+echo "Minimal supported kernel is 2.6.32" >&2
 exit 1
 %endif
+
+%patch0 -p1
 %patch2 -p1
 %patch3 -p0
 %patch4 -p1
diff --git a/glibc-git.patch b/glibc-git.patch
new file mode 100644
index 0000000..a55596e
--- /dev/null
+++ b/glibc-git.patch
@@ -0,0 +1,136 @@
+commit 58b930ae216bfa98cd60212b954b07b9963d6d04
+Author: Siddhesh Poyarekar <siddhesh at redhat.com>
+Date:   Wed Sep 10 21:51:50 2014 +0530
+
+    Return failure in getnetgrent only when all netgroups have been searched (#17363)
+    
+    The netgroups lookup code fails when one of the groups in the search
+    tree is empty.  In such a case it only returns the leaves of the tree
+    after the blank netgroup.  This is because the line parser returns a
+    NOTFOUND status when the netgroup exists but is empty.  The
+    __getnetgrent_internal implementation needs to be fixed to try
+    remaining groups if the current group is entry.  This patch implements
+    this fix.  Tested on x86_64.
+    
+    	[BZ #17363]
+    	* inet/getnetgrent_r.c (__internal_getnetgrent_r): Try next
+    	group if the current group is empty.
+
+diff --git a/inet/getnetgrent_r.c b/inet/getnetgrent_r.c
+index f6d064d..e101537 100644
+--- a/inet/getnetgrent_r.c
++++ b/inet/getnetgrent_r.c
+@@ -297,7 +297,10 @@ __internal_getnetgrent_r (char **hostp, char **userp, char **domainp,
+     {
+       status = DL_CALL_FCT (*fct, (datap, buffer, buflen, &errno));
+ 
+-      if (status == NSS_STATUS_RETURN)
++      if (status == NSS_STATUS_RETURN
++	  /* The service returned a NOTFOUND, but there are more groups that we
++	     need to resolve before we give up.  */
++	  || (status == NSS_STATUS_NOTFOUND && datap->needed_groups != NULL))
+ 	{
+ 	  /* This was the last one for this group.  Look at next group
+ 	     if available.  */
+commit 984c0ea97f649c869130a1ff099098e2b6f70aad
+Author: Tim Lammens <tim.lammens at gmail.com>
+Date:   Thu Sep 11 10:35:54 2014 +0530
+
+    Fix memory leak in libio/wfileops.c do_ftell_wide [BZ #17370]
+
+diff --git a/libio/wfileops.c b/libio/wfileops.c
+index f123add..ebc06e8 100644
+--- a/libio/wfileops.c
++++ b/libio/wfileops.c
+@@ -711,6 +711,7 @@ do_ftell_wide (_IO_FILE *fp)
+ 		return WEOF;
+ 
+ 	      offset += outstop - out;
++	      free (out);
+ 	    }
+ 
+ 	  /* We don't trust _IO_read_end to represent the current file offset
+commit 52ffbdf25a1100986f4ae27bb0febbe5a722ab25
+Author: Florian Weimer <fweimer at redhat.com>
+Date:   Wed Sep 10 20:29:15 2014 +0200
+
+    malloc: additional unlink hardening for non-small bins [BZ #17344]
+    
+    Turn two asserts into a conditional call to malloc_printerr.  The
+    memory locations are accessed later anyway, so the performance
+    impact is minor.
+
+diff --git a/malloc/malloc.c b/malloc/malloc.c
+index 6ee3840..6cbe9f3 100644
+--- a/malloc/malloc.c
++++ b/malloc/malloc.c
+@@ -1418,8 +1418,10 @@ typedef struct malloc_chunk *mbinptr;
+         BK->fd = FD;							      \
+         if (!in_smallbin_range (P->size)				      \
+             && __builtin_expect (P->fd_nextsize != NULL, 0)) {		      \
+-            assert (P->fd_nextsize->bk_nextsize == P);			      \
+-            assert (P->bk_nextsize->fd_nextsize == P);			      \
++	    if (__builtin_expect (P->fd_nextsize->bk_nextsize != P, 0)	      \
++		|| __builtin_expect (P->bk_nextsize->fd_nextsize != P, 0))    \
++	      malloc_printerr (check_action,				      \
++			       "corrupted double-linked list (not small)", P);\
+             if (FD->fd_nextsize == NULL) {				      \
+                 if (P->fd_nextsize == P)				      \
+                   FD->fd_nextsize = FD->bk_nextsize = FD;		      \
+commit a7b872687073decdcc7effc2289877d69058aca9
+Author: Andreas Schwab <schwab at linux-m68k.org>
+Date:   Sat Sep 13 10:10:29 2014 +0200
+
+    Handle zero prefix length in getifaddrs (BZ #17371)
+
+diff --git a/sysdeps/unix/sysv/linux/ifaddrs.c b/sysdeps/unix/sysv/linux/ifaddrs.c
+index 2c04e17..a47b2ed 100644
+--- a/sysdeps/unix/sysv/linux/ifaddrs.c
++++ b/sysdeps/unix/sysv/linux/ifaddrs.c
+@@ -770,20 +770,17 @@ getifaddrs_internal (struct ifaddrs **ifap)
+ 
+ 		  if (cp != NULL)
+ 		    {
+-		      char c;
+ 		      unsigned int preflen;
+ 
+-		      if ((max_prefixlen > 0) &&
+-			  (ifam->ifa_prefixlen > max_prefixlen))
++		      if (ifam->ifa_prefixlen > max_prefixlen)
+ 			preflen = max_prefixlen;
+ 		      else
+ 			preflen = ifam->ifa_prefixlen;
+ 
+-		      for (i = 0; i < ((preflen - 1) / 8); i++)
++		      for (i = 0; i < preflen / 8; i++)
+ 			*cp++ = 0xff;
+-		      c = 0xff;
+-		      c <<= ((128 - preflen) % 8);
+-		      *cp = c;
++		      if (preflen % 8)
++			*cp = 0xff << (8 - preflen % 8);
+ 		    }
+ 		}
+ 	    }
+commit 545583d664b64ff234b99aca0d85e99c8a55808f
+Author: Siddhesh Poyarekar <siddhesh at redhat.com>
+Date:   Tue Sep 16 14:20:45 2014 +0530
+
+    Fix memory leak in error path of do_ftell_wide (BZ #17370)
+
+diff --git a/libio/wfileops.c b/libio/wfileops.c
+index ebc06e8..c5ec5f7 100644
+--- a/libio/wfileops.c
++++ b/libio/wfileops.c
+@@ -708,7 +708,10 @@ do_ftell_wide (_IO_FILE *fp)
+ 		 sequences must be complete since they are accepted as
+ 		 wchar_t; if not, then that is an error.  */
+ 	      if (__glibc_unlikely (status != __codecvt_ok))
+-		return WEOF;
++		{
++		  free (out);
++		  return WEOF;
++		}
+ 
+ 	      offset += outstop - out;
+ 	      free (out);
================================================================

---- gitweb:

http://git.pld-linux.org/gitweb.cgi/packages/glibc.git/commitdiff/dac4060dff0b01310c8dbd58b71682dfafbc9861



More information about the pld-cvs-commit mailing list