This is the mail archive of the glibc-cvs@sourceware.org mailing list for the glibc project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

GNU C Library master sources branch master updated. glibc-2.16-ports-merge-452-g273edc5


This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "GNU C Library master sources".

The branch, master has been updated
       via  273edc5e138caef32a720410c9b2e27613991601 (commit)
      from  c8450f70fa7e68519d015ba9497f59645ba7ed3a (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.

- Log -----------------------------------------------------------------
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=273edc5e138caef32a720410c9b2e27613991601

commit 273edc5e138caef32a720410c9b2e27613991601
Author: Roland McGrath <roland@hack.frob.com>
Date:   Tue Oct 9 15:22:16 2012 -0700

    Free errstring if _dl_addr doesn't returns 0

diff --git a/ChangeLog b/ChangeLog
index 80bce18..4da05b8 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+2012-10-09  Roland McGrath  <roland@hack.frob.com>
+
+	* dlfcn/dlerror.c (check_free): Call _dl_addr only if SHARED is
+	defined.  Don't check if MAP is NULL.
+
 2012-10-09  Joseph Myers  <joseph@codesourcery.com>
 
 	* sysdeps/generic/_G_config.h (_G_off64_t): Remove.
diff --git a/dlfcn/dlerror.c b/dlfcn/dlerror.c
index 8138cc2..c30b4f1 100644
--- a/dlfcn/dlerror.c
+++ b/dlfcn/dlerror.c
@@ -1,5 +1,5 @@
 /* Return error detail for failing <dlfcn.h> functions.
-   Copyright (C) 1995-2000,2002,2003,2004,2005 Free Software Foundation, Inc.
+   Copyright (C) 1995-2012 Free Software Foundation, Inc.
    This file is part of the GNU C Library.
 
    The GNU C Library is free software; you can redistribute it and/or
@@ -190,11 +190,14 @@ check_free (struct dl_action_result *rec)
     {
       /* We can free the string only if the allocation happened in the
 	 C library used by the dynamic linker.  This means, it is
-	 always the C library in the base namespave.  */
+	 always the C library in the base namespace.  When we're statically
+         linked, the dynamic linker is part of the program and so always
+	 uses the same C library we use here.  */
+#ifdef SHARED
       struct link_map *map = NULL;
       Dl_info info;
-      if (_dl_addr (check_free, &info, &map, NULL) != 0
-	  && map != NULL && map->l_ns == 0)
+      if (_dl_addr (check_free, &info, &map, NULL) != 0 && map->l_ns == 0)
+#endif
 	free ((char *) rec->errstring);
     }
 }

-----------------------------------------------------------------------

Summary of changes:
 ChangeLog       |    5 +++++
 dlfcn/dlerror.c |   11 +++++++----
 2 files changed, 12 insertions(+), 4 deletions(-)


hooks/post-receive
-- 
GNU C Library master sources


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]