From: Chung-Lin Tang <chunglin_tang@mentor.com>
To: Florian Weimer <fweimer@redhat.com>
Cc: <cltang@codesourcery.com>, GNU C Library <libc-alpha@sourceware.org>
Subject: Re: [PATCH 1/2][RFC] #17645, fix slow DSO sorting behavior in dynamic loader
Date: Mon, 05 Aug 2019 10:39:00 -0000 [thread overview]
Message-ID: <e869a2d2-3717-9491-1bd3-03805e0dffce@mentor.com> (raw)
In-Reply-To: <87wog15fyy.fsf@oldenburg2.str.redhat.com>
On 2019/7/29 5:48 PM, Florian Weimer wrote:
> * Chung-Lin Tang:
>>> Can your test framework test both cases? What's your position on the
>>> second effect? I think it sometimes results in destructors running not
>>> in the opposite order of constructors, due to the new topological sort.
>>> (This also happens with the current implementation.)
>>
>> What I did in the ld.so code patch was add a second pass of sorting
>> that ignores runtime deps, prioritizing link dependencies; this
>> appears to also be what prior discussion pointed towards, see more
>> details in that 2nd email with the actual code patch.
>
> I wonder if it makes sense to disentangle this (desirable) functional
> change from the rest (which sould be purely an optimization).
By "functional change" here, are you referring to the testing framework,
or the described ld.so destructor behavior I described above?
> Is it even necessary to re-sort on dlclose? Is the original dependency
> order available somewhere? Then we could make it explicit that the
> destructor order is the reverse of the constructor order (for the
> objects unloaded). Or is there a corner case which causes an expected
> divergence?
Dynamic loaded objects could add more relocation dependencies, and thus augment
the dependency relations (by adding more constraints), so a final sort should
still be required.
Thanks,
Chung-Lin
next prev parent reply other threads:[~2019-08-05 10:39 UTC|newest]
Thread overview: 16+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-07-20 17:51 Chung-Lin Tang
2019-07-23 13:21 ` Florian Weimer
2019-07-25 18:46 ` Chung-Lin Tang
2019-07-29 9:48 ` Florian Weimer
2019-08-05 10:39 ` Chung-Lin Tang [this message]
2019-08-05 10:45 ` Florian Weimer
2019-08-10 11:49 ` Chung-Lin Tang
2019-09-17 9:55 ` Ping " Chung-Lin Tang
2019-10-08 6:22 ` Ping x2 " Chung-Lin Tang
2019-10-08 17:41 ` Adhemerval Zanella
2019-10-31 13:13 ` Carlos O'Donell
2019-11-14 9:58 ` Chung-Lin Tang
2019-11-25 9:19 ` Chung-Lin Tang
2019-11-25 19:08 ` Carlos O'Donell
2019-11-26 8:19 ` Chung-Lin Tang
2019-11-27 15:20 ` Carlos O'Donell
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=e869a2d2-3717-9491-1bd3-03805e0dffce@mentor.com \
--to=chunglin_tang@mentor.com \
--cc=cltang@codesourcery.com \
--cc=fweimer@redhat.com \
--cc=libc-alpha@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).