source: patches/glibc-2.6-localedef_segfault-1.patch@ 5f22e50

clfs-1.2 clfs-2.1 clfs-3.0.0-systemd clfs-3.0.0-sysvinit systemd sysvinit
Last change on this file since 5f22e50 was 44426cf, checked in by Joe Ciccone <jciccone@…>, 17 years ago

Updated to Glibc 2.6. This includes adding a sed to Coreutils and Gzip to rename their internal implementations of futimens which are incompatible with the implementation provided by Glibc. Added a target tripplet based optimization to glibc on x86 and 32bit build on x86_64 so that glibc will build properly now that i386 is no longer supported. Also added a note to the build variables page the i386-pc-linux-gnu is not supported by glibc.

  • Property mode set to 100644
File size: 2.0 KB
RevLine 
[69cde8d]1Submitted By: Jim Gifford (patches at jg555 dot com)
[44426cf]2Date: 2007-05-19
3Initial Package Version: 2.6
[69cde8d]4Origin: Debian
5Upstream Status: Unknown
6Description: Fixes Segfault when using localdef.
7 This problem is only noticed when using PaX
8 and some architectures besides x86.
9 See debian bug # 231438
10
[44426cf]11diff -Naur glibc-2.6.orig/locale/programs/3level.h glibc-2.6/locale/programs/3level.h
12--- glibc-2.6.orig/locale/programs/3level.h 2005-12-06 21:47:27.000000000 -0800
13+++ glibc-2.6/locale/programs/3level.h 2007-05-19 13:38:01.000000000 -0700
14@@ -202,6 +202,42 @@
[69cde8d]15 }
16 }
17 }
18+
19+/* GCC ATM seems to do a poor job with pointers to nested functions passed
20+ to inlined functions. Help it a little bit with this hack. */
21+#define wchead_table_iterate(tp, fn) \
22+do \
23+ { \
24+ struct wchead_table *t = (tp); \
25+ uint32_t index1; \
26+ for (index1 = 0; index1 < t->level1_size; index1++) \
27+ { \
28+ uint32_t lookup1 = t->level1[index1]; \
29+ if (lookup1 != ((uint32_t) ~0)) \
30+ { \
31+ uint32_t lookup1_shifted = lookup1 << t->q; \
32+ uint32_t index2; \
33+ for (index2 = 0; index2 < (1 << t->q); index2++) \
34+ { \
35+ uint32_t lookup2 = t->level2[index2 + lookup1_shifted]; \
36+ if (lookup2 != ((uint32_t) ~0)) \
37+ { \
38+ uint32_t lookup2_shifted = lookup2 << t->p; \
39+ uint32_t index3; \
40+ for (index3 = 0; index3 < (1 << t->p); index3++) \
41+ { \
42+ struct element_t *lookup3 \
43+ = t->level3[index3 + lookup2_shifted]; \
44+ if (lookup3 != NULL) \
45+ fn ((((index1 << t->q) + index2) << t->p) + index3, \
46+ lookup3); \
47+ } \
48+ } \
49+ } \
50+ } \
51+ } \
52+ } while (0)
53+
54 #endif
55
56 #ifndef NO_FINALIZE
Note: See TracBrowser for help on using the repository browser.