public inbox for gentoo-commits@lists.gentoo.org
 help / color / mirror / Atom feed
* [gentoo-commits] gentoo commit in src/patchsets/glibc/2.14: 0050_all_glibc-2.14-leak-revert-crash.patch README.history
@ 2011-06-06 20:14 Mike Frysinger (vapier)
  0 siblings, 0 replies; 2+ messages in thread
From: Mike Frysinger (vapier) @ 2011-06-06 20:14 UTC (permalink / raw
  To: gentoo-commits

vapier      11/06/06 20:14:32

  Modified:             README.history
  Added:                0050_all_glibc-2.14-leak-revert-crash.patch
  Log:
  partially revert upstream code to fix libdl crashes

Revision  Changes    Path
1.2                  src/patchsets/glibc/2.14/README.history

file : http://sources.gentoo.org/viewvc.cgi/gentoo/src/patchsets/glibc/2.14/README.history?rev=1.2&view=markup
plain: http://sources.gentoo.org/viewvc.cgi/gentoo/src/patchsets/glibc/2.14/README.history?rev=1.2&content-type=text/plain
diff : http://sources.gentoo.org/viewvc.cgi/gentoo/src/patchsets/glibc/2.14/README.history?r1=1.1&r2=1.2

Index: README.history
===================================================================
RCS file: /var/cvsroot/gentoo/src/patchsets/glibc/2.14/README.history,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -r1.1 -r1.2
--- README.history	1 Jun 2011 18:46:46 -0000	1.1
+++ README.history	6 Jun 2011 20:14:32 -0000	1.2
@@ -1,3 +1,6 @@
+2		06.06.2011
+	+ 0050_all_glibc-2.14-leak-revert-crash.patch
+
 1		01.06.2011
 	+ 0020_all_glibc-tweak-rfc1918-lookup.patch
 	+ 0030_all_glibc-respect-env-CPPFLAGS.patch



1.1                  src/patchsets/glibc/2.14/0050_all_glibc-2.14-leak-revert-crash.patch

file : http://sources.gentoo.org/viewvc.cgi/gentoo/src/patchsets/glibc/2.14/0050_all_glibc-2.14-leak-revert-crash.patch?rev=1.1&view=markup
plain: http://sources.gentoo.org/viewvc.cgi/gentoo/src/patchsets/glibc/2.14/0050_all_glibc-2.14-leak-revert-crash.patch?rev=1.1&content-type=text/plain

Index: 0050_all_glibc-2.14-leak-revert-crash.patch
===================================================================
partially revert 4bff6e0175ed195871f4e01cc4c4c33274b8f6e3

http://sourceware.org/ml/libc-alpha/2011-06/msg00006.html

--- a/elf/dl-libc.c
+++ b/elf/dl-libc.c
@@ -279,6 +279,10 @@ libc_freeres_fn (free_mem)
 	      if (! old->dont_free)
 		free (old);
 	    }
+
+	  /* Free the initfini dependency list.  */
+	  if (l->l_free_initfini)
+	    free (l->l_initfini);
 	}
 
       if (__builtin_expect (GL(dl_ns)[ns]._ns_global_scope_alloc, 0) != 0
--- a/elf/rtld.c
+++ b/elf/rtld.c
@@ -2240,6 +2240,7 @@ ERROR: ld.so: object '%s' cannot be loaded as audit interface: %s; ignored.\n",
 	      lnp->dont_free = 1;
 	      lnp = lnp->next;
 	    }
+	  l->l_free_initfini = 0;
 
 	  if (l != &GL(dl_rtld_map))
 	    _dl_relocate_object (l, l->l_scope, GLRO(dl_lazy) ? RTLD_LAZY : 0,
--- a/elf/dl-close.c
+++ b/elf/dl-close.c
@@ -119,17 +119,8 @@ _dl_close_worker (struct link_map *map)
   if (map->l_direct_opencount > 0 || map->l_type != lt_loaded
       || dl_close_state != not_pending)
     {
-      if (map->l_direct_opencount == 0)
-	{
-	  if (map->l_type == lt_loaded)
-	    dl_close_state = rerun;
-	  else if (map->l_type == lt_library)
-	    {
-	      struct link_map **oldp = map->l_initfini;
-	      map->l_initfini = map->l_orig_initfini;
-	      _dl_scope_free (oldp);
-	    }
-	}
+      if (map->l_direct_opencount == 0 && map->l_type == lt_loaded)
+	dl_close_state = rerun;
 
       /* There are still references to this object.  Do nothing more.  */
       if (__builtin_expect (GLRO(dl_debug_mask) & DL_DEBUG_FILES, 0))
--- a/elf/dl-deps.c
+++ b/elf/dl-deps.c
@@ -478,6 +478,7 @@ _dl_map_object_deps (struct link_map *map,
 		  nneeded * sizeof needed[0]);
 	  atomic_write_barrier ();
 	  l->l_initfini = l_initfini;
+	  l->l_free_initfini = 1;
 	}
 
       /* If we have no auxiliary objects just go on to the next map.  */
@@ -662,6 +663,7 @@ Filters not supported with LD_TRACE_PRELINKING"));
   l_initfini[nlist] = NULL;
   atomic_write_barrier ();
   map->l_initfini = l_initfini;
+  map->l_free_initfini = 1;
   if (l_reldeps != NULL)
     {
       atomic_write_barrier ();diff --git a/include/link.h b/include/link.h
@@ -686,5 +686,5 @@ Filters not supported with LD_TRACE_PRELINKING"));
       _dl_scope_free (old_l_reldeps);
     }
   if (old_l_initfini != NULL)
-      map->l_orig_initfini = old_l_initfini;
+    _dl_scope_free (old_l_initfini);
 }
--- a/include/link.h
+++ b/include/link.h
@@ -192,6 +192,9 @@ struct link_map
 						 during LD_TRACE_PRELINKING=1
 						 contains any DT_SYMBOLIC
 						 libraries.  */
+    unsigned int l_free_initfini:1; /* Nonzero if l_initfini can be
+				       freed, ie. not allocated with
+				       the dummy malloc in ld.so.  */
 
     /* Collected information about own RPATH directories.  */
     struct r_search_path_struct l_rpath_dirs;
@@ -240,9 +240,6 @@ struct link_map
 
     /* List of object in order of the init and fini calls.  */
     struct link_map **l_initfini;
-    /* The init and fini list generated at startup, saved when the
-       object is also loaded dynamically.  */
-    struct link_map **l_orig_initfini;
 
     /* List of the dependencies introduced through symbol binding.  */
     struct link_map_reldeps






^ permalink raw reply	[flat|nested] 2+ messages in thread

* [gentoo-commits] gentoo commit in src/patchsets/glibc/2.14: 0050_all_glibc-2.14-leak-revert-crash.patch README.history
@ 2011-06-17  5:09 Mike Frysinger (vapier)
  0 siblings, 0 replies; 2+ messages in thread
From: Mike Frysinger (vapier) @ 2011-06-17  5:09 UTC (permalink / raw
  To: gentoo-commits

vapier      11/06/17 05:09:53

  Modified:             0050_all_glibc-2.14-leak-revert-crash.patch
                        README.history
  Log:
  update fix with what was merged upstream

Revision  Changes    Path
1.2                  src/patchsets/glibc/2.14/0050_all_glibc-2.14-leak-revert-crash.patch

file : http://sources.gentoo.org/viewvc.cgi/gentoo/src/patchsets/glibc/2.14/0050_all_glibc-2.14-leak-revert-crash.patch?rev=1.2&view=markup
plain: http://sources.gentoo.org/viewvc.cgi/gentoo/src/patchsets/glibc/2.14/0050_all_glibc-2.14-leak-revert-crash.patch?rev=1.2&content-type=text/plain
diff : http://sources.gentoo.org/viewvc.cgi/gentoo/src/patchsets/glibc/2.14/0050_all_glibc-2.14-leak-revert-crash.patch?r1=1.1&r2=1.2

Index: 0050_all_glibc-2.14-leak-revert-crash.patch
===================================================================
RCS file: /var/cvsroot/gentoo/src/patchsets/glibc/2.14/0050_all_glibc-2.14-leak-revert-crash.patch,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -r1.1 -r1.2
--- 0050_all_glibc-2.14-leak-revert-crash.patch	6 Jun 2011 20:14:32 -0000	1.1
+++ 0050_all_glibc-2.14-leak-revert-crash.patch	17 Jun 2011 05:09:53 -0000	1.2
@@ -1,96 +1,41 @@
-partially revert 4bff6e0175ed195871f4e01cc4c4c33274b8f6e3
-
 http://sourceware.org/ml/libc-alpha/2011-06/msg00006.html
 
---- a/elf/dl-libc.c
-+++ b/elf/dl-libc.c
-@@ -279,6 +279,10 @@ libc_freeres_fn (free_mem)
- 	      if (! old->dont_free)
- 		free (old);
- 	    }
-+
-+	  /* Free the initfini dependency list.  */
-+	  if (l->l_free_initfini)
-+	    free (l->l_initfini);
- 	}
- 
-       if (__builtin_expect (GL(dl_ns)[ns]._ns_global_scope_alloc, 0) != 0
---- a/elf/rtld.c
-+++ b/elf/rtld.c
-@@ -2240,6 +2240,7 @@ ERROR: ld.so: object '%s' cannot be loaded as audit interface: %s; ignored.\n",
- 	      lnp->dont_free = 1;
- 	      lnp = lnp->next;
- 	    }
-+	  l->l_free_initfini = 0;
- 
- 	  if (l != &GL(dl_rtld_map))
- 	    _dl_relocate_object (l, l->l_scope, GLRO(dl_lazy) ? RTLD_LAZY : 0,
---- a/elf/dl-close.c
-+++ b/elf/dl-close.c
-@@ -119,17 +119,8 @@ _dl_close_worker (struct link_map *map)
-   if (map->l_direct_opencount > 0 || map->l_type != lt_loaded
-       || dl_close_state != not_pending)
-     {
--      if (map->l_direct_opencount == 0)
--	{
--	  if (map->l_type == lt_loaded)
--	    dl_close_state = rerun;
--	  else if (map->l_type == lt_library)
--	    {
--	      struct link_map **oldp = map->l_initfini;
--	      map->l_initfini = map->l_orig_initfini;
--	      _dl_scope_free (oldp);
--	    }
--	}
-+      if (map->l_direct_opencount == 0 && map->l_type == lt_loaded)
-+	dl_close_state = rerun;
- 
-       /* There are still references to this object.  Do nothing more.  */
-       if (__builtin_expect (GLRO(dl_debug_mask) & DL_DEBUG_FILES, 0))
---- a/elf/dl-deps.c
-+++ b/elf/dl-deps.c
-@@ -478,6 +478,7 @@ _dl_map_object_deps (struct link_map *map,
- 		  nneeded * sizeof needed[0]);
- 	  atomic_write_barrier ();
- 	  l->l_initfini = l_initfini;
-+	  l->l_free_initfini = 1;
- 	}
- 
-       /* If we have no auxiliary objects just go on to the next map.  */
-@@ -662,6 +663,7 @@ Filters not supported with LD_TRACE_PRELINKING"));
-   l_initfini[nlist] = NULL;
-   atomic_write_barrier ();
-   map->l_initfini = l_initfini;
-+  map->l_free_initfini = 1;
-   if (l_reldeps != NULL)
-     {
-       atomic_write_barrier ();diff --git a/include/link.h b/include/link.h
-@@ -686,5 +686,5 @@ Filters not supported with LD_TRACE_PRELINKING"));
-       _dl_scope_free (old_l_reldeps);
-     }
-   if (old_l_initfini != NULL)
--      map->l_orig_initfini = old_l_initfini;
-+    _dl_scope_free (old_l_initfini);
- }
---- a/include/link.h
-+++ b/include/link.h
-@@ -192,6 +192,9 @@ struct link_map
- 						 during LD_TRACE_PRELINKING=1
- 						 contains any DT_SYMBOLIC
- 						 libraries.  */
-+    unsigned int l_free_initfini:1; /* Nonzero if l_initfini can be
-+				       freed, ie. not allocated with
-+				       the dummy malloc in ld.so.  */
- 
-     /* Collected information about own RPATH directories.  */
-     struct r_search_path_struct l_rpath_dirs;
-@@ -240,9 +240,6 @@ struct link_map
- 
-     /* List of object in order of the init and fini calls.  */
-     struct link_map **l_initfini;
--    /* The init and fini list generated at startup, saved when the
--       object is also loaded dynamically.  */
--    struct link_map **l_orig_initfini;
- 
-     /* List of the dependencies introduced through symbol binding.  */
-     struct link_map_reldeps
+From 57912a71cc379f8582e3ea272782dc39c6c02e45 Mon Sep 17 00:00:00 2001
+From: Ulrich Drepper <drepper@gmail.com>
+Date: Wed, 15 Jun 2011 22:43:58 -0400
+Subject: [PATCH] Fix typo in recent resolver change which causes segvs
+
+---
+ ChangeLog         |    5 +++++
+ resolv/res_send.c |    4 ++--
+ 2 files changed, 7 insertions(+), 2 deletions(-)
+
+2011-06-15  Ulrich Drepper  <drepper@gmail.com>
+
+	* resolv/res_send.c (__libc_res_nsend): Fix typos in last patch.  We
+	need to dereference resplen2.
+
+diff --git a/resolv/res_send.c b/resolv/res_send.c
+index 97142b7..a001c1e 100644
+--- a/resolv/res_send.c
++++ b/resolv/res_send.c
+@@ -549,7 +549,7 @@ __libc_res_nsend(res_state statp, const u_char *buf, int buflen,
+ 				    ns, ansp, ansp2, nansp2, resplen2);
+ 			if (n < 0)
+ 				return (-1);
+-			if (n == 0 && (buf2 == NULL || resplen2 == 0))
++			if (n == 0 && (buf2 == NULL || *resplen2 == 0))
+ 				goto next_ns;
+ 		} else {
+ 			/* Use datagrams. */
+@@ -559,7 +559,7 @@ __libc_res_nsend(res_state statp, const u_char *buf, int buflen,
+ 				    ansp2, nansp2, resplen2);
+ 			if (n < 0)
+ 				return (-1);
+-			if (n == 0 && (buf2 == NULL || resplen2 == 0))
++			if (n == 0 && (buf2 == NULL || *resplen2 == 0))
+ 				goto next_ns;
+ 			if (v_circuit)
+ 			  // XXX Check whether both requests failed or
+-- 
+1.7.5.3



1.3                  src/patchsets/glibc/2.14/README.history

file : http://sources.gentoo.org/viewvc.cgi/gentoo/src/patchsets/glibc/2.14/README.history?rev=1.3&view=markup
plain: http://sources.gentoo.org/viewvc.cgi/gentoo/src/patchsets/glibc/2.14/README.history?rev=1.3&content-type=text/plain
diff : http://sources.gentoo.org/viewvc.cgi/gentoo/src/patchsets/glibc/2.14/README.history?r1=1.2&r2=1.3

Index: README.history
===================================================================
RCS file: /var/cvsroot/gentoo/src/patchsets/glibc/2.14/README.history,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -r1.2 -r1.3
--- README.history	6 Jun 2011 20:14:32 -0000	1.2
+++ README.history	17 Jun 2011 05:09:53 -0000	1.3
@@ -1,3 +1,6 @@
+3		[pending]
+	U 0050_all_glibc-2.14-leak-revert-crash.patch
+
 2		06.06.2011
 	+ 0050_all_glibc-2.14-leak-revert-crash.patch
 






^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2011-06-17  5:10 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-06-17  5:09 [gentoo-commits] gentoo commit in src/patchsets/glibc/2.14: 0050_all_glibc-2.14-leak-revert-crash.patch README.history Mike Frysinger (vapier)
  -- strict thread matches above, loose matches on Subject: below --
2011-06-06 20:14 Mike Frysinger (vapier)

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox