summary refs log tree commit diff
path: root/gnu/packages/patches
diff options
context:
space:
mode:
authorLudovic Courtès <ludo@gnu.org>2015-10-03 12:19:23 +0200
committerLudovic Courtès <ludo@gnu.org>2015-10-03 14:36:07 +0200
commit2ae71b746bd7265735cb50b2dd93a09ef45f9f38 (patch)
treec21d45750c08601e24ba09744ed51410e8cb2aed /gnu/packages/patches
parent997f86e96b003462751e4bde4397aec34090dc48 (diff)
downloadguix-2ae71b746bd7265735cb50b2dd93a09ef45f9f38.tar.gz
gnu: glibc: Do not abort when incompatible locale data is found.
* gnu/packages/patches/glibc-locale-incompatibility.patch: New file.
* gnu/packages/base.scm (glibc)[source]: Use it.
* gnu-system.am (dist_patch_DATA): Add it.
Diffstat (limited to 'gnu/packages/patches')
-rw-r--r--gnu/packages/patches/glibc-locale-incompatibility.patch23
1 files changed, 23 insertions, 0 deletions
diff --git a/gnu/packages/patches/glibc-locale-incompatibility.patch b/gnu/packages/patches/glibc-locale-incompatibility.patch
new file mode 100644
index 0000000000..baf30a79a7
--- /dev/null
+++ b/gnu/packages/patches/glibc-locale-incompatibility.patch
@@ -0,0 +1,23 @@
+This patch avoids an assertion failure when incompatible locale data
+is encountered:
+
+  https://sourceware.org/ml/libc-alpha/2015-09/msg00575.html
+
+--- glibc-2.22/locale/loadlocale.c	2015-09-22 17:16:02.321981548 +0200
++++ glibc-2.22/locale/loadlocale.c	2015-09-22 17:17:34.814659064 +0200
+@@ -120,10 +120,11 @@
+ 	 _nl_value_type_LC_XYZ array.  There are all pointers.  */
+       switch (category)
+ 	{
+-#define CATTEST(cat) \
+-	case LC_##cat:							      \
+-	  assert (cnt < (sizeof (_nl_value_type_LC_##cat)		      \
+-			 / sizeof (_nl_value_type_LC_##cat[0])));	      \
++#define CATTEST(cat)						\
++	case LC_##cat:						\
++	  if (cnt >= (sizeof (_nl_value_type_LC_##cat)		\
++		      / sizeof (_nl_value_type_LC_##cat[0])))	\
++	    goto puntdata;					\
+ 	  break
+ 	  CATTEST (NUMERIC);
+ 	  CATTEST (TIME);