]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/commit
rtld: add some dlopen tests
authorKyle Evans <kevans@FreeBSD.org>
Tue, 13 Feb 2024 15:38:02 +0000 (09:38 -0600)
committerKyle Evans <kevans@FreeBSD.org>
Tue, 13 Feb 2024 15:38:02 +0000 (09:38 -0600)
commitc5796f1572c82b88e8b6a2810c92f30e5ac3e118
tree84acf1d9fef404ad58c63cc8c4a80a68c8ec15a1
parent968a18975adc9c2a619bb52aa2f009de99fc9e24
rtld: add some dlopen tests

dlopen_basic just tests that libthr.so can be dlopen()ed, which will
just serve as a sanity check that "libthr.so" is a thing that can be
dlopened in case we get a weird failure in dlopen_recursing.

dlopen_recursing tests a regression reported after the libsys split,
where some dlopen() may cause infinite recursion and a resulting crash.
This case is inspired by bdrewery's description of what seemed to be
causing his issue.

The corresponding fix landed in commit
968a18975ad ("rtld: ignore load_filtees() calls if we already [...]")

Reviewed by: kib
Differential Revision: https://reviews.freebsd.org/D43859
libexec/rtld-elf/tests/Makefile
libexec/rtld-elf/tests/dlopen_test.c [new file with mode: 0644]