[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[commits] r10366 - in /fsf/trunk/libc: ./ elf/ include/ localedata/ localedata/locales/ sysdeps/generic/



Author: eglibc
Date: Mon May  3 16:59:02 2010
New Revision: 10366

Log:
Import glibc-mainline for 2010-05-03

Modified:
    fsf/trunk/libc/ChangeLog
    fsf/trunk/libc/elf/chroot_canon.c
    fsf/trunk/libc/elf/dl-close.c
    fsf/trunk/libc/elf/dl-iteratephdr.c
    fsf/trunk/libc/elf/dl-load.c
    fsf/trunk/libc/elf/dl-object.c
    fsf/trunk/libc/elf/dl-support.c
    fsf/trunk/libc/elf/ldconfig.c
    fsf/trunk/libc/elf/rtld.c
    fsf/trunk/libc/include/features.h
    fsf/trunk/libc/localedata/ChangeLog
    fsf/trunk/libc/localedata/locales/de_CH
    fsf/trunk/libc/sysdeps/generic/ldsodefs.h
    fsf/trunk/libc/version.h

Modified: fsf/trunk/libc/ChangeLog
==============================================================================
--- fsf/trunk/libc/ChangeLog (original)
+++ fsf/trunk/libc/ChangeLog Mon May  3 16:59:02 2010
@@ -1,3 +1,34 @@
+2010-05-03  Ulrich Drepper  <drepper@xxxxxxxxxx>
+
+	* version.h (VERSION): Bump for 2.11 release.
+	* include/features.h (__GLIBC_MINOR__): Bump to 11.
+
+	[BZ #11149]
+	* elf/ldconfig.c (search_dir): Fix handling of symlinks in chroot.
+
+	* elf/chroot_canon.c (chroot_canon): Use xmalloc and xrealloc.
+
+	* elf/ldconfig.c (parse_conf_include): Don't fall back to
+	directories named in config file outside the chroot.
+
+2010-02-02  Andreas Schwab  <schwab@xxxxxxxxxx>
+
+	* sysdeps/generic/ldsodefs.h (struct rtld_global): Add
+	_dl_load_write_lock.
+	* elf/rtld.c (_rtld_global): Initialize it.
+	* elf/dl-support.c (_dl_load_write_lock): Define .
+	* elf/dl-close.c (_dl_close_worker): Lock GL(dl_load_write_lock)
+	when modifying the list of loaded objects.
+	* elf/dl-load.c (lose): Likewise.
+	* elf/dl-object.c (_dl_new_object): Likewise.
+	* elf/dl-iteratephdr.c (__dl_iterate_phdr): Lock
+	GL(dl_load_write_lock) instead of GL(dl_load_lock).
+
+2010-05-03  Ulrich Drepper  <drepper@xxxxxxxxxx>
+
+	* elf/dl-iteratephdr.c (__dl_iterate_phdr): Remove unnecessary
+	assignment.
+
 2010-05-02  Ulrich Drepper  <drepper@xxxxxxxxxx>
 
 	* misc/mntent_r.c (encode_name): The slow loop handles newlines so we

Modified: fsf/trunk/libc/elf/chroot_canon.c
==============================================================================
--- fsf/trunk/libc/elf/chroot_canon.c (original)
+++ fsf/trunk/libc/elf/chroot_canon.c Mon May  3 16:59:02 2010
@@ -1,5 +1,5 @@
 /* Return the canonical absolute name of a given file inside chroot.
-   Copyright (C) 1996,1997,1998,1999,2000,2001,2004,2005
+   Copyright (C) 1996,1997,1998,1999,2000,2001,2004,2005,2010
 	Free Software Foundation, Inc.
    This file is part of the GNU C Library.
 
@@ -58,9 +58,7 @@
       return NULL;
     }
 
-  rpath = malloc (chroot_len + PATH_MAX);
-  if (rpath == NULL)
-    return NULL;
+  rpath = xmalloc (chroot_len + PATH_MAX);
 
   rpath_limit = rpath + chroot_len + PATH_MAX;
 
@@ -109,9 +107,7 @@
 		new_size += end - start + 1;
 	      else
 		new_size += PATH_MAX;
-	      new_rpath = (char *) realloc (rpath, new_size);
-	      if (new_rpath == NULL)
-		goto error;
+	      new_rpath = (char *) xrealloc (rpath, new_size);
 	      rpath = new_rpath;
 	      rpath_limit = rpath + new_size;
 

Modified: fsf/trunk/libc/elf/dl-close.c
==============================================================================
--- fsf/trunk/libc/elf/dl-close.c (original)
+++ fsf/trunk/libc/elf/dl-close.c Mon May  3 16:59:02 2010
@@ -506,6 +506,9 @@
   size_t tls_free_start;
   size_t tls_free_end;
   tls_free_start = tls_free_end = NO_TLS_OFFSET;
+
+  /* We modify the list of loaded objects.  */
+  __rtld_lock_lock_recursive (GL(dl_load_write_lock));
 
   /* Check each element of the search list to see if all references to
      it are gone.  */
@@ -665,6 +668,8 @@
 	}
     }
 
+  __rtld_lock_unlock_recursive (GL(dl_load_write_lock));
+
   /* If we removed any object which uses TLS bump the generation counter.  */
   if (any_tls)
     {

Modified: fsf/trunk/libc/elf/dl-iteratephdr.c
==============================================================================
--- fsf/trunk/libc/elf/dl-iteratephdr.c (original)
+++ fsf/trunk/libc/elf/dl-iteratephdr.c Mon May  3 16:59:02 2010
@@ -1,5 +1,5 @@
 /* Get loaded objects program headers.
-   Copyright (C) 2001-2004, 2006-2008, 2009 Free Software Foundation, Inc.
+   Copyright (C) 2001-2004, 2006-2009, 2010 Free Software Foundation, Inc.
    This file is part of the GNU C Library.
    Contributed by Jakub Jelinek <jakub@xxxxxxxxxx>, 2001.
 
@@ -26,7 +26,7 @@
 static void
 cancel_handler (void *arg __attribute__((unused)))
 {
-  __rtld_lock_unlock_recursive (GL(dl_load_lock));
+  __rtld_lock_unlock_recursive (GL(dl_load_write_lock));
 }
 
 hidden_proto (__dl_iterate_phdr)
@@ -38,8 +38,8 @@
   struct dl_phdr_info info;
   int ret = 0;
 
-  /* Make sure we are alone.  */
-  __rtld_lock_lock_recursive (GL(dl_load_lock));
+  /* Make sure nobody modifies the list of loaded objects.  */
+  __rtld_lock_lock_recursive (GL(dl_load_write_lock));
   __libc_cleanup_push (cancel_handler, 0);
 
   /* We have to determine the namespace of the caller since this determines
@@ -68,7 +68,6 @@
       info.dlpi_phnum = l->l_phnum;
       info.dlpi_adds = GL(dl_load_adds);
       info.dlpi_subs = GL(dl_load_adds) - nloaded;
-      info.dlpi_tls_modid = 0;
       info.dlpi_tls_data = NULL;
       info.dlpi_tls_modid = l->l_tls_modid;
       if (info.dlpi_tls_modid != 0)
@@ -80,7 +79,7 @@
 
   /* Release the lock.  */
   __libc_cleanup_pop (0);
-  __rtld_lock_unlock_recursive (GL(dl_load_lock));
+  __rtld_lock_unlock_recursive (GL(dl_load_write_lock));
 
   return ret;
 }

Modified: fsf/trunk/libc/elf/dl-load.c
==============================================================================
--- fsf/trunk/libc/elf/dl-load.c (original)
+++ fsf/trunk/libc/elf/dl-load.c Mon May  3 16:59:02 2010
@@ -803,6 +803,8 @@
     (void) __close (fd);
   if (l != NULL)
     {
+      /* We modify the list of loaded objects.  */
+      __rtld_lock_lock_recursive (GL(dl_load_write_lock));
       /* Remove the stillborn object from the list and free it.  */
       assert (l->l_next == NULL);
       if (l->l_prev == NULL)
@@ -813,6 +815,7 @@
 	l->l_prev->l_next = NULL;
       --GL(dl_ns)[l->l_ns]._ns_nloaded;
       free (l);
+      __rtld_lock_unlock_recursive (GL(dl_load_write_lock));
     }
   free (realname);
 

Modified: fsf/trunk/libc/elf/dl-object.c
==============================================================================
--- fsf/trunk/libc/elf/dl-object.c (original)
+++ fsf/trunk/libc/elf/dl-object.c Mon May  3 16:59:02 2010
@@ -93,6 +93,9 @@
   new->l_scope = new->l_scope_mem;
   new->l_scope_max = sizeof (new->l_scope_mem) / sizeof (new->l_scope_mem[0]);
 
+  /* We modify the list of loaded objects.  */
+  __rtld_lock_lock_recursive (GL(dl_load_write_lock));
+
   /* Counter for the scopes we have to handle.  */
   idx = 0;
 
@@ -113,6 +116,8 @@
   ++GL(dl_ns)[nsid]._ns_nloaded;
   new->l_serial = GL(dl_load_adds);
   ++GL(dl_load_adds);
+
+  __rtld_lock_unlock_recursive (GL(dl_load_write_lock));
 
   /* If we have no loader the new object acts as it.  */
   if (loader == NULL)

Modified: fsf/trunk/libc/elf/dl-support.c
==============================================================================
--- fsf/trunk/libc/elf/dl-support.c (original)
+++ fsf/trunk/libc/elf/dl-support.c Mon May  3 16:59:02 2010
@@ -166,6 +166,10 @@
    the loaded object might as well require a call to this function.
    At this time it is not anymore a problem to modify the tables.  */
 __rtld_lock_define_initialized_recursive (, _dl_load_lock)
+/* This lock is used to keep __dl_iterate_phdr from inspecting the
+   list of loaded objects while an object is added to or removed from
+   that list.  */
+__rtld_lock_define_initialized_recursive (, _dl_load_write_lock)
 
 
 #ifdef HAVE_AUX_VECTOR

Modified: fsf/trunk/libc/elf/ldconfig.c
==============================================================================
--- fsf/trunk/libc/elf/ldconfig.c (original)
+++ fsf/trunk/libc/elf/ldconfig.c Mon May  3 16:59:02 2010
@@ -773,7 +773,18 @@
 	{
 	  /* In case of symlink, we check if the symlink refers to
 	     a directory. */
-	  if (__builtin_expect (stat64 (real_file_name, &stat_buf), 0))
+	  char *target_name = real_file_name;
+	  if (opt_chroot)
+	    {
+	      target_name = chroot_canon (opt_chroot, file_name);
+	      if (target_name == NULL)
+		{
+		  if (strstr (file_name, ".so") == NULL)
+		    error (0, 0, _("Input file %s not found.\n"), file_name);
+		  continue;
+		}
+	    }
+	  if (__builtin_expect (stat64 (target_name, &stat_buf), 0))
 	    {
 	      if (opt_verbose)
 		error (0, errno, _("Cannot stat %s"), file_name);
@@ -1174,7 +1185,9 @@
   if (do_chroot && opt_chroot)
     {
       char *canon = chroot_canon (opt_chroot, pattern);
-      result = glob64 (canon ?: pattern, 0, NULL, &gl);
+      if (canon == NULL)
+	return;
+      result = glob64 (canon, 0, NULL, &gl);
       free (canon);
     }
   else

Modified: fsf/trunk/libc/elf/rtld.c
==============================================================================
--- fsf/trunk/libc/elf/rtld.c (original)
+++ fsf/trunk/libc/elf/rtld.c Mon May  3 16:59:02 2010
@@ -126,6 +126,7 @@
     ._dl_stack_flags = PF_R|PF_W|PF_X,
 #ifdef _LIBC_REENTRANT
     ._dl_load_lock = _RTLD_LOCK_RECURSIVE_INITIALIZER,
+    ._dl_load_write_lock = _RTLD_LOCK_RECURSIVE_INITIALIZER,
 #endif
     ._dl_nns = 1,
     ._dl_ns =

Modified: fsf/trunk/libc/include/features.h
==============================================================================
--- fsf/trunk/libc/include/features.h (original)
+++ fsf/trunk/libc/include/features.h Mon May  3 16:59:02 2010
@@ -337,7 +337,7 @@
 /* Major and minor version number of the GNU C library package.  Use
    these macros to test for features in specific releases.  */
 #define	__GLIBC__	2
-#define	__GLIBC_MINOR__	11
+#define	__GLIBC_MINOR__	12
 
 #define __GLIBC_PREREQ(maj, min) \
 	((__GLIBC__ << 16) + __GLIBC_MINOR__ >= ((maj) << 16) + (min))

Modified: fsf/trunk/libc/localedata/ChangeLog
==============================================================================
--- fsf/trunk/libc/localedata/ChangeLog (original)
+++ fsf/trunk/libc/localedata/ChangeLog Mon May  3 16:59:02 2010
@@ -1,3 +1,8 @@
+2010-05-03  Ulrich Drepper  <drepper@xxxxxxxxxx>
+
+	[BZ #11520]
+	* locales/de_CH: Define week, first_weekday, and first_workday.
+
 2010-04-08  Ulrich Drepper  <drepper@xxxxxxxxxx>
 
 	* locales/ar_AE: Fix typo.

Modified: fsf/trunk/libc/localedata/locales/de_CH
==============================================================================
--- fsf/trunk/libc/localedata/locales/de_CH (original)
+++ fsf/trunk/libc/localedata/locales/de_CH Mon May  3 16:59:02 2010
@@ -84,34 +84,34 @@
 LC_TIME
 % copy "de_DE"
 abday   "<U0053><U006F><U006E>";"<U004D><U006F><U006E>";/
-        "<U0044><U0069><U0065>";"<U004D><U0069><U0074>";/
-        "<U0044><U006F><U006E>";"<U0046><U0072><U0065>";/
-        "<U0053><U0061><U006D>"
+	"<U0044><U0069><U0065>";"<U004D><U0069><U0074>";/
+	"<U0044><U006F><U006E>";"<U0046><U0072><U0065>";/
+	"<U0053><U0061><U006D>"
 day     "<U0053><U006F><U006E><U006E><U0074><U0061><U0067>";/
-        "<U004D><U006F><U006E><U0074><U0061><U0067>";/
-        "<U0044><U0069><U0065><U006E><U0073><U0074><U0061><U0067>";/
-        "<U004D><U0069><U0074><U0074><U0077><U006F><U0063><U0068>";/
-        "<U0044><U006F><U006E><U006E><U0065><U0072><U0073><U0074><U0061><U0067>";/
-        "<U0046><U0072><U0065><U0069><U0074><U0061><U0067>";/
-        "<U0053><U0061><U006D><U0073><U0074><U0061><U0067>"
+	"<U004D><U006F><U006E><U0074><U0061><U0067>";/
+	"<U0044><U0069><U0065><U006E><U0073><U0074><U0061><U0067>";/
+	"<U004D><U0069><U0074><U0074><U0077><U006F><U0063><U0068>";/
+	"<U0044><U006F><U006E><U006E><U0065><U0072><U0073><U0074><U0061><U0067>";/
+	"<U0046><U0072><U0065><U0069><U0074><U0061><U0067>";/
+	"<U0053><U0061><U006D><U0073><U0074><U0061><U0067>"
 abmon   "<U004A><U0061><U006E>";"<U0046><U0065><U0062>";/
-        "<U004D><U00E4><U0072>";"<U0041><U0070><U0072>";/
-        "<U004D><U0061><U0069>";"<U004A><U0075><U006E>";/
-        "<U004A><U0075><U006C>";"<U0041><U0075><U0067>";/
-        "<U0053><U0065><U0070>";"<U004F><U006B><U0074>";/
-        "<U004E><U006F><U0076>";"<U0044><U0065><U007A>"
+	"<U004D><U00E4><U0072>";"<U0041><U0070><U0072>";/
+	"<U004D><U0061><U0069>";"<U004A><U0075><U006E>";/
+	"<U004A><U0075><U006C>";"<U0041><U0075><U0067>";/
+	"<U0053><U0065><U0070>";"<U004F><U006B><U0074>";/
+	"<U004E><U006F><U0076>";"<U0044><U0065><U007A>"
 mon     "<U004A><U0061><U006E><U0075><U0061><U0072>";/
-        "<U0046><U0065><U0062><U0072><U0075><U0061><U0072>";/
-        "<U004D><U00E4><U0072><U007A>";/
-        "<U0041><U0070><U0072><U0069><U006C>";/
-        "<U004D><U0061><U0069>";/
-        "<U004A><U0075><U006E><U0069>";/
-        "<U004A><U0075><U006C><U0069>";/
-        "<U0041><U0075><U0067><U0075><U0073><U0074>";/
-        "<U0053><U0065><U0070><U0074><U0065><U006D><U0062><U0065><U0072>";/
-        "<U004F><U006B><U0074><U006F><U0062><U0065><U0072>";/
-        "<U004E><U006F><U0076><U0065><U006D><U0062><U0065><U0072>";/
-        "<U0044><U0065><U007A><U0065><U006D><U0062><U0065><U0072>"
+	"<U0046><U0065><U0062><U0072><U0075><U0061><U0072>";/
+	"<U004D><U00E4><U0072><U007A>";/
+	"<U0041><U0070><U0072><U0069><U006C>";/
+	"<U004D><U0061><U0069>";/
+	"<U004A><U0075><U006E><U0069>";/
+	"<U004A><U0075><U006C><U0069>";/
+	"<U0041><U0075><U0067><U0075><U0073><U0074>";/
+	"<U0053><U0065><U0070><U0074><U0065><U006D><U0062><U0065><U0072>";/
+	"<U004F><U006B><U0074><U006F><U0062><U0065><U0072>";/
+	"<U004E><U006F><U0076><U0065><U006D><U0062><U0065><U0072>";/
+	"<U0044><U0065><U007A><U0065><U006D><U0062><U0065><U0072>"
 d_t_fmt "<U0025><U0061><U0020><U0025><U0064><U0020><U0025><U0062><U0020><U0025><U0059><U0020><U0025><U0054><U0020><U0025><U005A>"
 d_fmt   "<U0025><U0064><U002E><U0025><U006D><U002E><U0025><U0059>"
 t_fmt   "<U0025><U0054>"
@@ -120,6 +120,10 @@
 date_fmt	"<U0025><U0061><U0020><U0025><U0062><U0020><U0025><U0065>/
 <U0020><U0025><U0048><U003A><U0025><U004D><U003A><U0025><U0053><U0020>/
 <U0025><U005A><U0020><U0025><U0059>"
+
+week    7;19971130;4
+first_weekday 2
+first_workday 2
 END LC_TIME
 
 LC_PAPER

Modified: fsf/trunk/libc/sysdeps/generic/ldsodefs.h
==============================================================================
--- fsf/trunk/libc/sysdeps/generic/ldsodefs.h (original)
+++ fsf/trunk/libc/sysdeps/generic/ldsodefs.h Mon May  3 16:59:02 2010
@@ -416,6 +416,10 @@
      the loaded object might as well require a call to this function.
      At this time it is not anymore a problem to modify the tables.  */
   __rtld_lock_define_recursive (EXTERN, _dl_load_lock)
+  /* This lock is used to keep __dl_iterate_phdr from inspecting the
+     list of loaded objects while an object is added to or removed
+     from that list.  */
+  __rtld_lock_define_recursive (EXTERN, _dl_load_write_lock)
 
   /* Incremented whenever something may have been added to dl_loaded.  */
   EXTERN unsigned long long _dl_load_adds;

Modified: fsf/trunk/libc/version.h
==============================================================================
--- fsf/trunk/libc/version.h (original)
+++ fsf/trunk/libc/version.h Mon May  3 16:59:02 2010
@@ -1,4 +1,4 @@
 /* This file just defines the current version number of libc.  */
 
-#define RELEASE "development"
-#define VERSION "2.11.90"
+#define RELEASE "stable"
+#define VERSION "2.12"