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: [PATCHv5][PING^3][BZ #17833] _dl_close_worker() does not release inconsistent objects.


Pavel Kopyl <p.kopyl@samsung.com> writes:

> diff --git a/elf/dl-close.c b/elf/dl-close.c
> index 412f71d..0595675 100644
> --- a/elf/dl-close.c
> +++ b/elf/dl-close.c
> @@ -108,7 +108,7 @@ remove_slotinfo (size_t idx, struct dtv_slotinfo_list *listp, size_t disp,
>  
>  
>  void
> -_dl_close_worker (struct link_map *map)
> +_dl_close_worker (struct link_map *map, bool force)
>  {
>    /* One less direct use.  */
>    --map->l_direct_opencount;
> @@ -152,6 +152,10 @@ _dl_close_worker (struct link_map *map)
>        l->l_idx = idx;
>        maps[idx] = l;
>        ++idx;
> +
> +      /* clear DF_1_NODELETE to force object deletion.  */
> +      if (force)
> +	l->l_flags_1 &= ~DF_1_NODELETE;

This will remove the NODELETE flag from *all* loaded objects.  That
doesn't make sense.

Andreas.

-- 
Andreas Schwab, SUSE Labs, schwab@suse.de
GPG Key fingerprint = 0196 BAD8 1CE9 1970 F4BE  1748 E4D4 88E3 0EEA B9D7
"And now for something completely different."


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