[packages/glibc] - rel 9; update branch fixes; gracefuly handle incompatible locale files

arekm arekm at pld-linux.org
Sat Oct 17 22:39:09 CEST 2015


commit 6cd5942331b2ba2e10e5422377347fc57e1cfeab
Author: Arkadiusz Miśkiewicz <arekm at maven.pl>
Date:   Sat Oct 17 22:39:02 2015 +0200

    - rel 9; update branch fixes; gracefuly handle incompatible locale files

 glibc-git.patch             | 81 +++++++++++++++++++++++++++++++++++++++++----
 glibc-graceful-locale.patch | 39 ++++++++++++++++++++++
 glibc.spec                  | 10 +++++-
 3 files changed, 123 insertions(+), 7 deletions(-)
---
diff --git a/glibc.spec b/glibc.spec
index 369a722..7ba9816 100644
--- a/glibc.spec
+++ b/glibc.spec
@@ -41,7 +41,7 @@ Summary(tr.UTF-8):	GNU libc
 Summary(uk.UTF-8):	GNU libc версії
 Name:		glibc
 Version:	%{core_version}
-Release:	8
+Release:	9
 Epoch:		6
 License:	LGPL v2.1+
 Group:		Libraries
@@ -88,6 +88,13 @@ Patch27:	%{name}-locale-C.patch.xz
 Patch28:	%{name}-locale-C-pld.patch
 Patch29:	%{name}-arm-alignment-fix.patch
 Patch30:	glibc-rh1124987.patch
+# Our glibc-localedb-src package is allowing state that is considered:
+# "It is a fundamental system misconfiguration issue not to have upgraded
+# the binary locale data from one release to another."
+# Same problem with glibc-localedb-all package - it and glibc are not
+# atomically upgraded causing post scripts to have problems.
+# See https://sourceware.org/ml/libc-alpha/2015-09/msg00656.html for discussion.
+Patch31:	glibc-graceful-locale.patch
 
 Patch38:	1055_all_glibc-resolv-dynamic.patch
 URL:		http://www.gnu.org/software/libc/
@@ -989,6 +996,7 @@ exit 1
 %patch28 -p1
 %patch29 -p1
 %patch30 -p1
+%patch31 -p1
 
 %patch38 -p1
 
diff --git a/glibc-git.patch b/glibc-git.patch
index 4684794..ca31638 100644
--- a/glibc-git.patch
+++ b/glibc-git.patch
@@ -1,8 +1,18 @@
 diff --git a/ChangeLog b/ChangeLog
-index cb9124e..491d5c7 100644
+index cb9124e..d0d2f56 100644
 --- a/ChangeLog
 +++ b/ChangeLog
-@@ -1,3 +1,130 @@
+@@ -1,3 +1,140 @@
++2015-10-15  Florian Weimer  <fweimer at redhat.com>
++
++	[BZ #18928]
++	* sysdeps/generic/ldsodefs.h (struct rtld_global_ro): Remove
++	_dl_pointer_guard member.
++	* elf/rtld.c (_rtld_global_ro): Remove _dl_pointer_guard
++	initializer.
++	(security_init): Always set up pointer guard.
++	(process_envvars): Do not process LD_POINTER_GUARD.
++
 +2015-10-09  Carlos O'Donell  <carlos at redhat.com>
 +
 +	[BZ #18589]
@@ -134,10 +144,10 @@ index cb9124e..491d5c7 100644
  
  	* version.h (RELEASE): Set to "stable".
 diff --git a/NEWS b/NEWS
-index 4c31de7..9b10bff 100644
+index 4c31de7..fa6f58d 100644
 --- a/NEWS
 +++ b/NEWS
-@@ -5,6 +5,12 @@ See the end for copying conditions.
+@@ -5,6 +5,15 @@ See the end for copying conditions.
  Please send GNU C library bug reports via <http://sourceware.org/bugzilla/>
  using `glibc' in the "product" field.
  

@@ -145,12 +155,15 @@ index 4c31de7..9b10bff 100644
 +
 +* The following bugs are resolved with this release:
 +
-+  18589, 18778, 18781, 18787, 18796, 18870, 18887, 18921, 18969.
++  18589, 18778, 18781, 18787, 18796, 18870, 18887, 18921, 18928, 18969.
++
++* The LD_POINTER_GUARD environment variable can no longer be used to
++  disable the pointer guard feature.  It is always enabled.
 +

  Version 2.22
  
  * The following bugs are resolved with this release:
-@@ -84,7 +90,7 @@ Version 2.22
+@@ -84,7 +93,7 @@ Version 2.22
    release.  Use of this header will trigger a deprecation warning.
    Application developers should update their code to use <regex.h> instead.
  
@@ -235,6 +248,48 @@ index 9105277..c897247 100644
      }
    assert (idx == nloaded);
  
+diff --git a/elf/rtld.c b/elf/rtld.c
+index 69873c2..07e741c 100644
+--- a/elf/rtld.c
++++ b/elf/rtld.c
+@@ -162,7 +162,6 @@ struct rtld_global_ro _rtld_global_ro attribute_relro =
+     ._dl_hwcap_mask = HWCAP_IMPORTANT,
+     ._dl_lazy = 1,
+     ._dl_fpu_control = _FPU_DEFAULT,
+-    ._dl_pointer_guard = 1,
+     ._dl_pagesize = EXEC_PAGESIZE,
+     ._dl_inhibit_cache = 0,
+ 
+@@ -709,15 +708,12 @@ security_init (void)
+ #endif
+ 
+   /* Set up the pointer guard as well, if necessary.  */
+-  if (GLRO(dl_pointer_guard))
+-    {
+-      uintptr_t pointer_chk_guard = _dl_setup_pointer_guard (_dl_random,
+-							     stack_chk_guard);
++  uintptr_t pointer_chk_guard
++    = _dl_setup_pointer_guard (_dl_random, stack_chk_guard);
+ #ifdef THREAD_SET_POINTER_GUARD
+-      THREAD_SET_POINTER_GUARD (pointer_chk_guard);
++  THREAD_SET_POINTER_GUARD (pointer_chk_guard);
+ #endif
+-      __pointer_chk_guard_local = pointer_chk_guard;
+-    }
++  __pointer_chk_guard_local = pointer_chk_guard;
+ 
+   /* We do not need the _dl_random value anymore.  The less
+      information we leave behind, the better, so clear the
+@@ -2471,9 +2467,6 @@ process_envvars (enum mode *modep)
+ 	      GLRO(dl_use_load_bias) = envline[14] == '1' ? -1 : 0;
+ 	      break;
+ 	    }
+-
+-	  if (memcmp (envline, "POINTER_GUARD", 13) == 0)
+-	    GLRO(dl_pointer_guard) = envline[14] != '0';
+ 	  break;
+ 
+ 	case 14:
 diff --git a/elf/tst-nodelete2.c b/elf/tst-nodelete2.c
 new file mode 100644
 index 0000000..388e8af
@@ -904,6 +959,20 @@ index d5a1115..bea5aa2 100644
        res = 1;
      }
    else
+diff --git a/sysdeps/generic/ldsodefs.h b/sysdeps/generic/ldsodefs.h
+index 7a0fe8d..78e3a97 100644
+--- a/sysdeps/generic/ldsodefs.h
++++ b/sysdeps/generic/ldsodefs.h
+@@ -592,9 +592,6 @@ struct rtld_global_ro
+   /* List of auditing interfaces.  */
+   struct audit_ifaces *_dl_audit;
+   unsigned int _dl_naudit;
+-
+-  /* 0 if internal pointer values should not be guarded, 1 if they should.  */
+-  EXTERN int _dl_pointer_guard;
+ };
+ # define __rtld_global_attribute__
+ # if IS_IN (rtld)
 diff --git a/sysdeps/hppa/dl-symaddr.c b/sysdeps/hppa/dl-symaddr.c
 index b707c19..89d8baf 100644
 --- a/sysdeps/hppa/dl-symaddr.c
diff --git a/glibc-graceful-locale.patch b/glibc-graceful-locale.patch
new file mode 100644
index 0000000..3e97c16
--- /dev/null
+++ b/glibc-graceful-locale.patch
@@ -0,0 +1,39 @@
+From: ludo at gnu dot org (Ludovic =?utf-8?Q?Court=C3=A8s?=)
+To: libc-alpha at sourceware dot org
+Subject: [PATCH] Gracefully handle incompatible locale data
+Date: Tue, 22 Sep 2015 17:27:55 +0200
+
+With libc 2.22 people are starting to realize that libc does not
+guarantee that it can load locale data built with another libc version,
+but they learn it the hard way:
+
+  loadlocale.c:130: _nl_intern_locale_data: Assertion `cnt < (sizeof (_nl_v=
+alue_type_LC_COLLATE) / sizeof (_nl_value_type_LC_COLLATE[0]))' failed.
+
+This patch changes such conditions to return EINVAL instead of aborting.
+
+WDYT?
+
+Thanks,
+Ludo=E2=80=99.
+
+2015-10-22  Ludovic Court=C3=A8s  <ludo at gnu.org>
+
+	* locale/loadlocale.c (_nl_intern_locale_data): Change assertion
+	on CNT to a conditional jump to 'puntdata'.
+
+
+--- glibc-2.22/locale/loadlocale.c~	2015-08-05 08:42:21.000000000 +0200
++++ glibc-2.22/locale/loadlocale.c	2015-10-17 22:29:26.612455638 +0200
+@@ -122,8 +122,9 @@ _nl_intern_locale_data (int category, co
+ 	{
+ #define CATTEST(cat) \
+ 	case LC_##cat:							      \
+-	  assert (cnt < (sizeof (_nl_value_type_LC_##cat)		      \
+-			 / sizeof (_nl_value_type_LC_##cat[0])));	      \
++	  if (cnt >= (sizeof (_nl_value_type_LC_##cat)		      \
++			 / sizeof (_nl_value_type_LC_##cat[0])))	      \
++		goto puntdata; \
+ 	  break
+ 	  CATTEST (NUMERIC);
+ 	  CATTEST (TIME);
================================================================

---- gitweb:

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



More information about the pld-cvs-commit mailing list