This is the mail archive of the libc-alpha@sourceware.org mailing list for the glibc project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: obvious patches at bugzilla


On Thu, Aug 22, 2013 at 01:29:50PM -0400, Rich Felker wrote:
> On Thu, Aug 22, 2013 at 04:45:52PM +0530, Siddhesh Poyarekar wrote:
> > On 22 August 2013 16:32, OndÅej BÃlka <neleai@seznam.cz> wrote:
> > > http://sourceware.org/bugzilla/show_bug.cgi?id=15847
> > > http://sourceware.org/bugzilla/show_bug.cgi?id=15844
> > > http://sourceware.org/bugzilla/show_bug.cgi?id=15764
> > > http://sourceware.org/bugzilla/show_bug.cgi?id=15859
> > 
> > Post them on list with attribution to the authors?  I won't call all
> > of them obvious though.  15859 may be straightforward (I haven't
> > actually verified), but not obvious.
> 
> It's obvious that the issue fixed in the patch for 15859 fixes a bug,
> the shadowed variable. What's not obvious is whether it was masking
> another bug, i.e. whether fixing the leak might lead to accessing
> memory after it is freed. The dynamic linker is quite fragile in that
> area, so I would be hesitant to fix such an issue without having
> someone thoroughly study the lifetime of the objects involved...
>
I browsed code, for brewity take only output of

cat elf/dl-deps.c | grep l_reldeps

  struct link_map_reldeps *l_reldeps = NULL;
  if (map->l_reldeps != NULL)
      struct link_map **list = &map->l_reldeps->list[0];
      for (i = 0; i < map->l_reldeps->act; ++i)
	    struct link_map_reldeps *l_reldeps;
	    l_reldeps = malloc (sizeof (*l_reldeps)
				+ map->l_reldepsmax
	    if (l_reldeps == NULL)
		 map->l_reldeps->list and map->l_initfini lists.  */
		memcpy (&l_reldeps->list[0], &list[0],
		for (i = i + 1; i < map->l_reldeps->act; ++i)
		    l_reldeps->list[j++] = list[i];
		l_reldeps->act = j;
  if (l_reldeps != NULL)
      void *old_l_reldeps = map->l_reldeps;
      map->l_reldeps = l_reldeps;
      _dl_scope_free (old_l_reldeps);

The only use of masked l_reldeps are in block
if (l_reldeps != NULL)

A intention was to free old dependencies which are now always null.

> The others seem to be purely comment changes.
> 
> Rich


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]