Author: kib
Date: Fri Aug 27 19:57:17 2010
New Revision: 211894
URL: http://svn.freebsd.org/changeset/base/211894

Log:
  Do not call __pthread_cxa_finalize with invalid struct dl_phdr_info.
  
  Reported and tested by:       Fabian Keil <freebsd-listen fabiankeil de>
  MFC after:    17 days

Modified:
  head/lib/libc/stdlib/atexit.c

Modified: head/lib/libc/stdlib/atexit.c
==============================================================================
--- head/lib/libc/stdlib/atexit.c       Fri Aug 27 19:53:57 2010        
(r211893)
+++ head/lib/libc/stdlib/atexit.c       Fri Aug 27 19:57:17 2010        
(r211894)
@@ -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);
 }
_______________________________________________
svn-src-head@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"

Reply via email to