mirror of the now-defunct rocklinux.org
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

56 lines
2.0 KiB

  1. Submitted By: Jim Gifford (patches at jg555 dot com)
  2. Date: 2007-05-19
  3. Initial Package Version: 2.6
  4. Origin: Debian
  5. Upstream Status: Unknown
  6. Description: 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. diff -Naur glibc-2.6.orig/locale/programs/3level.h glibc-2.6/locale/programs/3level.h
  11. --- glibc-2.6.orig/locale/programs/3level.h 2005-12-06 21:47:27.000000000 -0800
  12. +++ glibc-2.6/locale/programs/3level.h 2007-05-19 13:38:01.000000000 -0700
  13. @@ -202,6 +202,42 @@
  14. }
  15. }
  16. }
  17. +
  18. +/* GCC ATM seems to do a poor job with pointers to nested functions passed
  19. + to inlined functions. Help it a little bit with this hack. */
  20. +#define wchead_table_iterate(tp, fn) \
  21. +do \
  22. + { \
  23. + struct wchead_table *t = (tp); \
  24. + uint32_t index1; \
  25. + for (index1 = 0; index1 < t->level1_size; index1++) \
  26. + { \
  27. + uint32_t lookup1 = t->level1[index1]; \
  28. + if (lookup1 != ((uint32_t) ~0)) \
  29. + { \
  30. + uint32_t lookup1_shifted = lookup1 << t->q; \
  31. + uint32_t index2; \
  32. + for (index2 = 0; index2 < (1 << t->q); index2++) \
  33. + { \
  34. + uint32_t lookup2 = t->level2[index2 + lookup1_shifted]; \
  35. + if (lookup2 != ((uint32_t) ~0)) \
  36. + { \
  37. + uint32_t lookup2_shifted = lookup2 << t->p; \
  38. + uint32_t index3; \
  39. + for (index3 = 0; index3 < (1 << t->p); index3++) \
  40. + { \
  41. + struct element_t *lookup3 \
  42. + = t->level3[index3 + lookup2_shifted]; \
  43. + if (lookup3 != NULL) \
  44. + fn ((((index1 << t->q) + index2) << t->p) + index3, \
  45. + lookup3); \
  46. + } \
  47. + } \
  48. + } \
  49. + } \
  50. + } \
  51. + } while (0)
  52. +
  53. #endif
  54. #ifndef NO_FINALIZE