[PATCH v3] elf: Test dlopen (NULL, RTLD_LAZY) from an ELF constructor
Sam James
sam@gentoo.org
Mon Dec 30 15:06:41 GMT 2024
Florian Weimer <fweimer@redhat.com> writes:
> * Florian Weimer:
>
>> This call must not complete initialization of all shared objects
>> in the global scope because the ELF constructor which makes the call
>> likely has not finished initialization. Calling more constructors
>> at this point would expose those to a partially constructed
>> dependency.
>>
>> This completes the revert of commit 9897ced8e78db5d813166a7ccccfd5a
>> ("elf: Run constructors on cyclic recursive dlopen (bug 31986)").
>>
>> ---
>> v3: Repost to resolve Makefile conflict.
>> elf/Makefile | 9 ++++++
>> elf/dl-open.c | 10 +++++++
>> elf/tst-dlopen-constructor-null-mod1.c | 55 ++++++++++++++++++++++++++++++++++
>> elf/tst-dlopen-constructor-null-mod2.c | 37 +++++++++++++++++++++++
>> elf/tst-dlopen-constructor-null.c | 38 +++++++++++++++++++++++
>> 5 files changed, 149 insertions(+)
>
> Could I get a review for this, please? I think it addresses a real
> testing gap.
I left some small comments. I don't feel qualified enough in this area
to say I could spot a testing issue (which is why I hadn't commented),
but it looks okay apart from what I pointed out.
More information about the Libc-alpha
mailing list