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: [PATCH 1/2][RFC] #17645, fix slow DSO sorting behavior in dynamic loader


* Chung-Lin Tang:

> Hi, this patch is our attempt at resolving the slow shared object sorting
> situation in #17645, #15310, and some effort at #15311.  I realize this is
> pretty unsuitable timing to be submitting a patch of such nature now (probably
> way too late to be included into 2.30), but still sending now anyways as this
> will probably need quite some discussion before being approved.
>
> Prior attempts at solving this slow sorting behavior appeared to have failed
> due to inadequate proposed testing, therefore cannot convince reviewers to
> touch what seems to be perceived as a sensitive and easy to break part of ld.so.

Thanks for working on this!

>         * elf/Makefile (test_dso_ordering): New make function.
>         (tst-dso-ordering[123456789]): Define new DSO sorting tests.
>         (tst-bz15311): Testcase from #15311.
>         * scripts/dso-ordering-test.py: New script.

I have not looked at the script in detail yet, sorry.  But I have some
early questions.

Is => intended to cover the case of run-time dependencies added late due
to lazy binding?

Currently, those late dependencies have two effects, I think: They keep
around the referenced libraries longer than before (so that dlclose
would not remove an object which is still in used solely due to lazy
binding).  And the ELF destructors are reordered to reflect these added
run-time dependencies.

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.)

Thanks,
Florian


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