source:
clfs-sysroot/patches/glibc-2.9-localedef_segfault-1.patch@
f3125bf
Last change on this file since f3125bf was e184d2f, checked in by , 16 years ago | |
---|---|
|
|
File size: 2.1 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 Rediffed for 2.8 by Joe Ciccone Rediffed for 2.9 by Joe Ciccone diff -Naur glibc-2.8.orig/locale/programs/3level.h glibc-2.8/locale/programs/3level.h
old new 203 203 } 204 204 } 205 205 } 206 207 /* GCC ATM seems to do a poor job with pointers to nested functions passed 208 to inlined functions. Help it a little bit with this hack. */ 209 #define wchead_table_iterate(tp, fn) \ 210 do \ 211 { \ 212 struct wchead_table *t = (tp); \ 213 uint32_t index1; \ 214 for (index1 = 0; index1 < t->level1_size; index1++) \ 215 { \ 216 uint32_t lookup1 = t->level1[index1]; \ 217 if (lookup1 != ((uint32_t) ~0)) \ 218 { \ 219 uint32_t lookup1_shifted = lookup1 << t->q; \ 220 uint32_t index2; \ 221 for (index2 = 0; index2 < (1 << t->q); index2++) \ 222 { \ 223 uint32_t lookup2 = t->level2[index2 + lookup1_shifted]; \ 224 if (lookup2 != ((uint32_t) ~0)) \ 225 { \ 226 uint32_t lookup2_shifted = lookup2 << t->p; \ 227 uint32_t index3; \ 228 for (index3 = 0; index3 < (1 << t->p); index3++) \ 229 { \ 230 struct element_t *lookup3 \ 231 = t->level3[index3 + lookup2_shifted]; \ 232 if (lookup3 != NULL) \ 233 fn ((((index1 << t->q) + index2) << t->p) + index3, \ 234 lookup3); \ 235 } \ 236 } \ 237 } \ 238 } \ 239 } \ 240 } while (0) 241 206 242 #endif 207 243 208 244 #ifndef NO_FINALIZE
Note:
See TracBrowser
for help on using the repository browser.