source: patches/glibc-2.6-localedef_segfault-1.patch @ 44426cf

clfs-1.2clfs-2.1clfs-3.0.0-systemdclfs-3.0.0-sysvinitsystemdsysvinit
Last change on this file since 44426cf 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
  • 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  
    202202        }
    203203    }
    204204}
     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) \
     209do                                                                            \
     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
    205241#endif
    206242
    207243#ifndef NO_FINALIZE
Note: See TracBrowser for help on using the repository browser.