source: patches/eglibc-2.15-fixes-1.patch @ 57b3f19

clfs-2.1clfs-3.0.0-systemdclfs-3.0.0-sysvinitsystemdsysvinit
Last change on this file since 57b3f19 was 57b3f19, checked in by Jonathan Norman <jon@…>, 11 years ago

Added a patch to Eglibc final to fix a segfault issue with ALSA

  • Property mode set to 100644
File size: 3.8 KB
  • elf/dl-close.c

    Submitted By: Jonathan Norman (jonathan at bluesquarelinux dot co dot uk)
    Date: 2012-02-16
    Initial Package Version: 2.15
    Origin: http://sourceware.org/ml/libc-alpha/2011-06/msg00010.html
    Upstream Status: Submitted
    Description: Fixes segfault with sound devices / output.
    
    diff -Naur eglibc-2_15.orig/elf/dl-close.c eglibc-2_15/elf/dl-close.c
    old new  
    119119  if (map->l_direct_opencount > 0 || map->l_type != lt_loaded
    120120      || dl_close_state != not_pending)
    121121    {
    122       if (map->l_direct_opencount == 0)
    123         {
    124           if (map->l_type == lt_loaded)
    125             dl_close_state = rerun;
    126           else if (map->l_type == lt_library)
    127             {
    128               struct link_map **oldp = map->l_initfini;
    129               map->l_initfini = map->l_orig_initfini;
    130               _dl_scope_free (oldp);
    131             }
    132         }
     122      if (map->l_direct_opencount == 0 && map->l_type == lt_loaded)
     123        dl_close_state = rerun;
    133124
    134125      /* There are still references to this object.  Do nothing more.  */
    135126      if (__builtin_expect (GLRO_dl_debug_mask & DL_DEBUG_FILES, 0))
  • elf/dl-deps.c

    diff -Naur eglibc-2_15.orig/elf/dl-deps.c eglibc-2_15/elf/dl-deps.c
    old new  
    489489                  nneeded * sizeof needed[0]);
    490490          atomic_write_barrier ();
    491491          l->l_initfini = l_initfini;
     492          l->l_free_initfini = 1;
     493
    492494        }
    493495
    494496      /* If we have no auxiliary objects just go on to the next map.  */
     
    689691  l_initfini[nlist] = NULL;
    690692  atomic_write_barrier ();
    691693  map->l_initfini = l_initfini;
     694  map->l_free_initfini = 1;
    692695  if (l_reldeps != NULL)
    693696    {
    694697      atomic_write_barrier ();
     
    697700      _dl_scope_free (old_l_reldeps);
    698701    }
    699702  if (old_l_initfini != NULL)
    700       map->l_orig_initfini = old_l_initfini;
     703    _dl_scope_free (old_l_initfini);
    701704
    702705  if (errno_reason)
    703706    _dl_signal_error (errno_reason == -1 ? 0 : errno_reason, objname,
  • elf/dl-libc.c

    diff -Naur eglibc-2_15.orig/elf/dl-libc.c eglibc-2_15/elf/dl-libc.c
    old new  
    284284              if (! old->dont_free)
    285285                free (old);
    286286            }
     287
     288          /* Free the initfini dependency list.  */
     289          if (l->l_free_initfini)
     290            free (l->l_initfini);
    287291        }
    288292
    289293      if (__builtin_expect (GL(dl_ns)[ns]._ns_global_scope_alloc, 0) != 0
  • elf/rtld.c

    diff -Naur eglibc-2_15.orig/elf/rtld.c eglibc-2_15/elf/rtld.c
    old new  
    22772277              lnp->dont_free = 1;
    22782278              lnp = lnp->next;
    22792279            }
     2280          l->l_free_initfini = 0;
    22802281
    22812282          if (l != &GL(dl_rtld_map))
    22822283            _dl_relocate_object (l, l->l_scope, GLRO(dl_lazy) ? RTLD_LAZY : 0,
  • include/link.h

    diff -Naur eglibc-2_15.orig/include/link.h eglibc-2_15/include/link.h
    old new  
    192192                                                 during LD_TRACE_PRELINKING=1
    193193                                                 contains any DT_SYMBOLIC
    194194                                                 libraries.  */
     195    unsigned int l_free_initfini:1; /* Nonzero if l_initfini can be
     196                                       freed, ie. not allocated with
     197                                       the dummy malloc in ld.so.  */
    195198
    196199    /* Collected information about own RPATH directories.  */
    197200    struct r_search_path_struct l_rpath_dirs;
     
    240243
    241244    /* List of object in order of the init and fini calls.  */
    242245    struct link_map **l_initfini;
    243     /* The init and fini list generated at startup, saved when the
    244        object is also loaded dynamically.  */
    245     struct link_map **l_orig_initfini;
    246246
    247247    /* List of the dependencies introduced through symbol binding.  */
    248248    struct link_map_reldeps
Note: See TracBrowser for help on using the repository browser.