aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKonstantin Belousov <kib@FreeBSD.org>2024-05-03 09:32:01 +0000
committerKonstantin Belousov <kib@FreeBSD.org>2024-05-10 07:49:36 +0000
commit5cf78a5500345340771f7eb840724c2422b2ff96 (patch)
tree400565caf670e204877875d5f034b1318a3a1264
parent8c308a22e759a666704f2b6d730568a83fb271b1 (diff)
downloadsrc-5cf78a5500345340771f7eb840724c2422b2ff96.tar.gz
src-5cf78a5500345340771f7eb840724c2422b2ff96.zip
__cxa_thread_call_dtors(3): fix dtor pointer validity check
PR: 278701 (cherry picked from commit b27eb9ce96b838622e125fd969e8dc4914aabe18)
-rw-r--r--lib/libc/stdlib/cxa_thread_atexit_impl.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/libc/stdlib/cxa_thread_atexit_impl.c b/lib/libc/stdlib/cxa_thread_atexit_impl.c
index 2ebf20ef7fd9..ef9f3567d483 100644
--- a/lib/libc/stdlib/cxa_thread_atexit_impl.c
+++ b/lib/libc/stdlib/cxa_thread_atexit_impl.c
@@ -103,7 +103,7 @@ walk_cb_call(struct cxa_thread_dtor *dtor)
{
struct dl_phdr_info phdr_info;
- if (_rtld_addr_phdr(dtor->dso, &phdr_info) &&
+ if (_rtld_addr_phdr(dtor->func, &phdr_info) &&
__elf_phdr_match_addr(&phdr_info, dtor->func))
dtor->func(dtor->obj);
else