source:
patches/glibc-2.4-localedef_segfault-1.patch@
59bc7cb
Last change on this file since 59bc7cb was 4af05f3, checked in by , 19 years ago | |
---|---|
|
|
File size: 1.9 KB |
-
glibc-20050926/locale/programs/3level.h
Submitted By: Jim Gifford (patches at jg555 dot com) Date: 2005-09-29 Initial Package Version: 2.3.2 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
old new 204 204 } 205 205 } 206 206 } 207 208 /* GCC ATM seems to do a poor job with pointers to nested functions passed 209 to inlined functions. Help it a little bit with this hack. */ 210 #define wchead_table_iterate(tp, fn) \ 211 do \ 212 { \ 213 struct wchead_table *t = (tp); \ 214 uint32_t index1; \ 215 for (index1 = 0; index1 < t->level1_size; index1++) \ 216 { \ 217 uint32_t lookup1 = t->level1[index1]; \ 218 if (lookup1 != ((uint32_t) ~0)) \ 219 { \ 220 uint32_t lookup1_shifted = lookup1 << t->q; \ 221 uint32_t index2; \ 222 for (index2 = 0; index2 < (1 << t->q); index2++) \ 223 { \ 224 uint32_t lookup2 = t->level2[index2 + lookup1_shifted]; \ 225 if (lookup2 != ((uint32_t) ~0)) \ 226 { \ 227 uint32_t lookup2_shifted = lookup2 << t->p; \ 228 uint32_t index3; \ 229 for (index3 = 0; index3 < (1 << t->p); index3++) \ 230 { \ 231 struct element_t *lookup3 \ 232 = t->level3[index3 + lookup2_shifted]; \ 233 if (lookup3 != NULL) \ 234 fn ((((index1 << t->q) + index2) << t->p) + index3, \ 235 lookup3); \ 236 } \ 237 } \ 238 } \ 239 } \ 240 } \ 241 } while (0) 242 207 243 #endif 208 244 209 245 #ifndef NO_FINALIZE
Note:
See TracBrowser
for help on using the repository browser.