source:
clfs-sysroot/patches/glibc-2.6.1-localedef_segfault-1.patch@
a50d3ff
Last change on this file since a50d3ff was 93fcbff, checked in by , 17 years ago | |
---|---|
|
|
File size: 2.0 KB |
-
locale/programs/3level.h
Submitted By: Jim Gifford (patches at jg555 dot com) Date: 2007-05-19 Initial Package Version: 2.6 Origin: Debian Upstream Status: Unknown Description: Fixes Segfault when using localdef. This problem is only noticed when using PaX and some architectures besides x86. See debian bug # 231438 diff -Naur glibc-2.6.orig/locale/programs/3level.h glibc-2.6/locale/programs/3level.h
old new 202 202 } 203 203 } 204 204 } 205 206 /* GCC ATM seems to do a poor job with pointers to nested functions passed 207 to inlined functions. Help it a little bit with this hack. */ 208 #define wchead_table_iterate(tp, fn) \ 209 do \ 210 { \ 211 struct wchead_table *t = (tp); \ 212 uint32_t index1; \ 213 for (index1 = 0; index1 < t->level1_size; index1++) \ 214 { \ 215 uint32_t lookup1 = t->level1[index1]; \ 216 if (lookup1 != ((uint32_t) ~0)) \ 217 { \ 218 uint32_t lookup1_shifted = lookup1 << t->q; \ 219 uint32_t index2; \ 220 for (index2 = 0; index2 < (1 << t->q); index2++) \ 221 { \ 222 uint32_t lookup2 = t->level2[index2 + lookup1_shifted]; \ 223 if (lookup2 != ((uint32_t) ~0)) \ 224 { \ 225 uint32_t lookup2_shifted = lookup2 << t->p; \ 226 uint32_t index3; \ 227 for (index3 = 0; index3 < (1 << t->p); index3++) \ 228 { \ 229 struct element_t *lookup3 \ 230 = t->level3[index3 + lookup2_shifted]; \ 231 if (lookup3 != NULL) \ 232 fn ((((index1 << t->q) + index2) << t->p) + index3, \ 233 lookup3); \ 234 } \ 235 } \ 236 } \ 237 } \ 238 } \ 239 } while (0) 240 205 241 #endif 206 242 207 243 #ifndef NO_FINALIZE
Note:
See TracBrowser
for help on using the repository browser.