This is the mail archive of the
libc-alpha@sourceware.org
mailing list for the glibc project.
Re: obvious patches at bugzilla
- From: OndÅej BÃlka <neleai at seznam dot cz>
- To: Rich Felker <dalias at aerifal dot cx>
- Cc: Siddhesh Poyarekar <siddhesh dot poyarekar at gmail dot com>, GNU C Library <libc-alpha at sourceware dot org>
- Date: Thu, 22 Aug 2013 23:28:31 +0200
- Subject: Re: obvious patches at bugzilla
- References: <20130822110230 dot GA22446 at domone dot kolej dot mff dot cuni dot cz> <CAAHN_R3RfihOUOTYsXhBZD9t88wtRy21QpMJ4kcob6zVvwX5sg at mail dot gmail dot com> <20130822172950 dot GH20515 at brightrain dot aerifal dot cx>
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