]> git.ipfire.org Git - thirdparty/glibc.git/commit
elf: Test dlopen (NULL, RTLD_LAZY) from an ELF constructor
authorFlorian Weimer <fweimer@redhat.com>
Tue, 11 Mar 2025 14:30:52 +0000 (15:30 +0100)
committerFlorian Weimer <fweimer@redhat.com>
Mon, 18 Aug 2025 11:12:27 +0000 (13:12 +0200)
commit24c94ea84e9323dc24ce11f34368531f75eb9a72
treeb5e0449d9d5dc9bef371b89282cf8ca3c13d3b68
parent79d84b5da58ee989fdabf34767e1501a4b222194
elf: Test dlopen (NULL, RTLD_LAZY) from an ELF constructor

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

(cherry picked from commit d604f9c500570e80febfcc6a52b63a002b466f35)
elf/Makefile
elf/dl-open.c
elf/tst-dlopen-constructor-null-mod1.c [new file with mode: 0644]
elf/tst-dlopen-constructor-null-mod2.c [new file with mode: 0644]
elf/tst-dlopen-constructor-null.c [new file with mode: 0644]