This is the mail archive of the libc-hacker@sources.redhat.com mailing list for the glibc project.

Note that libc-hacker is a closed list. You may look at the archives of this list, but subscription and posting are not open.


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

Re: A patch for dl-close.c


"H . J . Lu" <hjl@valinux.com> writes:

> I don't think l_initfini is handled right. Why does it use nsearchlist as
> the indexing limit? l_initfini is a NULL terminated array. We also should
> decrement l_opencount on DSOs on l_initfini even if the main DSO is not
> unloaded.
>
> Here is a patch. Please ignore my previous one for dl-close.c.

This patch is overly complicated and this

> -  for (i = 0; i < nsearchlist; ++i)
> -    {
> -      struct link_map *imap = map->l_initfini[i];
> +  if (map->l_initfini)

is plainly wrong.  You also didn't handle DF_1_NODELETE.  I've checked
in a patch which should work.  It passes all the previous tests plus
the new test case.

-- 
---------------.                          ,-.   1325 Chesapeake Terrace
Ulrich Drepper  \    ,-------------------'   \  Sunnyvale, CA 94089 USA
Red Hat          `--' drepper at redhat.com   `------------------------

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