Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 27 Aug 2010 19:57:17 +0000 (UTC)
From:      Konstantin Belousov <kib@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org
Subject:   svn commit: r211894 - head/lib/libc/stdlib
Message-ID:  <201008271957.o7RJvHwS005865@svn.freebsd.org>

next in thread | raw e-mail | index | archive | help
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);
 }



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201008271957.o7RJvHwS005865>