[PATCH v3] elf: Test dlopen (NULL, RTLD_LAZY) from an ELF constructor

Florian Weimer fweimer@redhat.com
Mon Dec 30 14:41:30 GMT 2024


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

Thanks,
Florian



More information about the Libc-alpha mailing list