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

Bug#741243: [PATCH] localedef fix on hppa architecture



Package: eglibc
Version: 2.18-4
Severity: important
Tags: patch

This command:
  localedef -i de_DE -c -f ISO-8859-1 -A /usr/share/locale/locale.alias de_DE
fails on the hppa architecture because localedef wants to remap the locale file at another location than what it was given originally.
This fails on hppa, because each file must be mapped so that the same byte in a file is mapped at offset modulo SHMLBA-1.
Otherwise you will get a EINVAL error from mmap().

Dear Debian maintainer,
could you please add this patch temporarily to the debian eglibc sources?
It will take me quite some time to discuss the best approach to fix it upstream, but in the meantime it would be nice if the debian eglibc package
will not show this problem on hppa.

Thanks,
Helge

References:
* Linux kernel patch: https://lkml.org/lkml/2013/12/10/148
* Mail thread: http://www.spinics.net/lists/linux-parisc/msg05236.html
* not directly related: Debian bug 725508: hppa patches for eglibc (generic eglibc patches for hppa)
diff -up ./sysdeps/generic/libc-mmap.h.org ./sysdeps/generic/libc-mmap.h
--- ./sysdeps/generic/libc-mmap.h.org	2014-03-10 11:51:24.000000000 +0100
+++ ./sysdeps/generic/libc-mmap.h	2014-03-10 11:53:37.000000000 +0100
@@ -21,6 +21,11 @@
 
 /* Using MAP_FIXED with mmap sometimes requires larger alignment.  */
 #include <sys/shm.h>
+#ifdef __hppa__
+/* On parisc you can only remap at the same address (modulo SHMLBA-1) */
+#define MAP_FIXED_ALIGNMENT 4096
+#else
 #define MAP_FIXED_ALIGNMENT SHMLBA
+#endif
 
 #endif

Reply to: