guix-commits
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

01/05: gnu: glibc: Do not abort when incompatible locale data is found.


From: Ludovic Courtès
Subject: 01/05: gnu: glibc: Do not abort when incompatible locale data is found.
Date: Sat, 03 Oct 2015 15:09:12 +0000

civodul pushed a commit to branch core-updates
in repository guix.

commit 2ae71b746bd7265735cb50b2dd93a09ef45f9f38
Author: Ludovic Courtès <address@hidden>
Date:   Sat Oct 3 12:19:23 2015 +0200

    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.
---
 gnu-system.am                                      |    1 +
 gnu/packages/base.scm                              |    1 +
 .../patches/glibc-locale-incompatibility.patch     |   23 ++++++++++++++++++++
 3 files changed, 25 insertions(+), 0 deletions(-)

diff --git a/gnu-system.am b/gnu-system.am
index f2f7e17..fbfe728 100644
--- a/gnu-system.am
+++ b/gnu-system.am
@@ -471,6 +471,7 @@ dist_patch_DATA =                                           
\
   gnu/packages/patches/glibc-bootstrap-system.patch            \
   gnu/packages/patches/glibc-ldd-x86_64.patch                  \
   gnu/packages/patches/glibc-locales.patch                     \
+  gnu/packages/patches/glibc-locale-incompatibility.patch      \
   gnu/packages/patches/glibc-o-largefile.patch                 \
   gnu/packages/patches/gmp-arm-asm-nothumb.patch               \
   gnu/packages/patches/gnucash-price-quotes-perl.patch         \
diff --git a/gnu/packages/base.scm b/gnu/packages/base.scm
index a7d9459..99f60d1 100644
--- a/gnu/packages/base.scm
+++ b/gnu/packages/base.scm
@@ -476,6 +476,7 @@ store.")
             (modules '((guix build utils)))
             (patches (map search-patch
                           '("glibc-ldd-x86_64.patch"
+                            "glibc-locale-incompatibility.patch"
                             "glibc-o-largefile.patch")))))
    (build-system gnu-build-system)
 
diff --git a/gnu/packages/patches/glibc-locale-incompatibility.patch 
b/gnu/packages/patches/glibc-locale-incompatibility.patch
new file mode 100644
index 0000000..baf30a7
--- /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);



reply via email to

[Prev in Thread] Current Thread [Next in Thread]