public inbox for glibc-bugs@sourceware.org
help / color / mirror / Atom feed
From: "fweimer at redhat dot com" <sourceware-bugzilla@sourceware.org>
To: glibc-bugs@sourceware.org
Subject: [Bug dynamic-link/28937] New DSO dependency sorter does not put new map first if in a cycle
Date: Tue, 20 Sep 2022 09:07:45 +0000	[thread overview]
Message-ID: <bug-28937-131-a4vZqC0Ma9@http.sourceware.org/bugzilla/> (raw)
In-Reply-To: <bug-28937-131@http.sourceware.org/bugzilla/>

https://sourceware.org/bugzilla/show_bug.cgi?id=28937

Florian Weimer <fweimer at redhat dot com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
         Resolution|---                         |FIXED
   Target Milestone|---                         |2.37
             Status|ASSIGNED                    |RESOLVED

--- Comment #10 from Florian Weimer <fweimer at redhat dot com> ---
Fixed for 2.37 via:

commit 1df71d32fe5f5905ffd5d100e5e9ca8ad6210891
Author: Florian Weimer <fweimer@redhat.com>
Date:   Tue Sep 20 11:00:42 2022 +0200

    elf: Implement force_first handling in _dl_sort_maps_dfs (bug 28937)

    The implementation in _dl_close_worker requires that the first
    element of l_initfini is always this very map (“We are always the
    zeroth entry, and since we don't include ourselves in the
    dependency analysis start at 1.”).  Rather than fixing that
    assumption, this commit adds an implementation of the force_first
    argument to the new dependency sorting algorithm.  This also means
    that the directly dlopen'ed shared object is always initialized last,
    which is the least surprising behavior in the presence of cycles.

    Reviewed-by: Adhemerval Zanella  <adhemerval.zanella@linaro.org>

I'll backport this as applicable.

-- 
You are receiving this mail because:
You are on the CC list for the bug.

  parent reply	other threads:[~2022-09-20  9:07 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-03-03 12:48 [Bug dynamic-link/28937] New: New DSO dependency resolver buggyness with dlclose() pieterjan.briers at gmail dot com
2022-03-03 15:08 ` [Bug dynamic-link/28937] " fweimer at redhat dot com
2022-03-03 15:27 ` fweimer at redhat dot com
2022-03-03 22:55 ` pieterjan.briers at gmail dot com
2022-03-03 23:25 ` pieterjan.briers at gmail dot com
2022-03-04  1:07 ` pieterjan.briers at gmail dot com
2022-03-11 19:24 ` freswa at archlinux dot org
2022-04-11 23:19 ` woodard at redhat dot com
2022-04-12 10:29 ` fweimer at redhat dot com
2022-08-08 10:38 ` fweimer at redhat dot com
2022-08-08 19:59 ` sam at gentoo dot org
2022-08-14 20:06 ` pieterjan.briers at gmail dot com
2022-08-15  9:23 ` [Bug dynamic-link/28937] New DSO dependency sorter does not put new map first if in a cycle fweimer at redhat dot com
2022-09-20  9:07 ` fweimer at redhat dot com [this message]
2022-09-21  9:17 ` fweimer at redhat dot com
2023-08-22 10:49 ` fweimer at redhat dot com

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=bug-28937-131-a4vZqC0Ma9@http.sourceware.org/bugzilla/ \
    --to=sourceware-bugzilla@sourceware.org \
    --cc=glibc-bugs@sourceware.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).