From 58060e750b215eb1cc02635a6eedb72cb127db64 Mon Sep 17 00:00:00 2001 From: kib Date: Fri, 27 Aug 2010 19:57:17 +0000 Subject: Do not call __pthread_cxa_finalize with invalid struct dl_phdr_info. Reported and tested by: Fabian Keil MFC after: 17 days --- lib/libc/stdlib/atexit.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'lib/libc/stdlib') diff --git a/lib/libc/stdlib/atexit.c b/lib/libc/stdlib/atexit.c index 97cf234..511172a 100644 --- a/lib/libc/stdlib/atexit.c +++ b/lib/libc/stdlib/atexit.c @@ -200,6 +200,6 @@ __cxa_finalize(void *dso) if (dso == NULL) _MUTEX_DESTROY(&atexit_mutex); - if (&__pthread_cxa_finalize != NULL) + if (has_phdr && &__pthread_cxa_finalize != NULL) __pthread_cxa_finalize(&phdr_info); } -- cgit v1.1