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

[commits] r13447 - in /fsf/trunk/libc: ./ elf/ nptl/ sysdeps/i386/ sysdeps/ia64/ sysdeps/powerpc/ sysdeps/s390/ sysdeps/sh/ sysdeps/sp...



Author: eglibc
Date: Mon Apr 11 00:03:12 2011
New Revision: 13447

Log:
Import glibc-mainline for 2011-04-11

Modified:
    fsf/trunk/libc/ChangeLog
    fsf/trunk/libc/NEWS
    fsf/trunk/libc/elf/dl-tls.c
    fsf/trunk/libc/nptl/ChangeLog
    fsf/trunk/libc/nptl/allocatestack.c
    fsf/trunk/libc/sysdeps/i386/dl-tls.h
    fsf/trunk/libc/sysdeps/ia64/dl-tls.h
    fsf/trunk/libc/sysdeps/powerpc/dl-tls.h
    fsf/trunk/libc/sysdeps/s390/dl-tls.h
    fsf/trunk/libc/sysdeps/sh/dl-tls.h
    fsf/trunk/libc/sysdeps/sparc/dl-tls.h
    fsf/trunk/libc/sysdeps/x86_64/dl-tls.h

Modified: fsf/trunk/libc/ChangeLog
==============================================================================
--- fsf/trunk/libc/ChangeLog (original)
+++ fsf/trunk/libc/ChangeLog Mon Apr 11 00:03:12 2011
@@ -1,3 +1,15 @@
+2011-04-10  Ulrich Drepper  <drepper@xxxxxxxxx>
+
+	[BZ #12650]
+	* sysdeps/i386/dl-tls.h: Define TLS_DTV_UNALLOCATED.
+	* sysdeps/ia64/dl-tls.h: Likewise.
+	* sysdeps/powerpc/dl-tls.h: Likewise.
+	* sysdeps/s390/dl-tls.h: Likewise.
+	* sysdeps/sh/dl-tls.h: Likewise.
+	* sysdeps/sparc/dl-tls.h: Likewise.
+	* sysdeps/x86_64/dl-tls.h: Likewise.
+	* elf/dl-tls.c: Don't define TLS_DTV_UNALLOCATED here.
+
 2011-03-14  Andreas Schwab  <schwab@xxxxxxxxxx>
 
 	* elf/dl-load.c (_dl_dst_substitute): When skipping the first

Modified: fsf/trunk/libc/NEWS
==============================================================================
--- fsf/trunk/libc/NEWS (original)
+++ fsf/trunk/libc/NEWS Mon Apr 11 00:03:12 2011
@@ -1,4 +1,4 @@
-GNU C Library NEWS -- history of user-visible changes.  2011-4-9
+GNU C Library NEWS -- history of user-visible changes.  2011-4-10
 Copyright (C) 1992-2009, 2010, 2011 Free Software Foundation, Inc.
 See the end for copying conditions.
 
@@ -7,12 +7,13 @@
 
 Version 2.14
 
-* New Linux interfaces: clock_adjtime, name_to_handle_at, open_by_handle_at
+* New Linux interfaces: clock_adjtime, name_to_handle_at, open_by_handle_at,
+  syncfs
 
 * The following bugs are resolved with this release:
 
   11724, 12445, 12454, 12460, 12469, 12489, 12509, 12510, 12518, 12583, 12587,
-  12597, 12631, 12655
+  12597, 12631, 12650, 12655
 
 Version 2.13
 

Modified: fsf/trunk/libc/elf/dl-tls.c
==============================================================================
--- fsf/trunk/libc/elf/dl-tls.c (original)
+++ fsf/trunk/libc/elf/dl-tls.c Mon Apr 11 00:03:12 2011
@@ -1,5 +1,5 @@
 /* Thread-local storage handling in the ELF dynamic linker.  Generic version.
-   Copyright (C) 2002,2003,2004,2005,2006,2008 Free Software Foundation, Inc.
+   Copyright (C) 2002-2006,2008,2011 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
@@ -32,9 +32,6 @@
 /* Amount of excess space to allocate in the static TLS area
    to allow dynamic loading of modules defining IE-model TLS data.  */
 #define TLS_STATIC_SURPLUS	64 + DL_NNS * 100
-
-/* Value used for dtv entries for which the allocation is delayed.  */
-#define TLS_DTV_UNALLOCATED	((void *) -1l)
 
 
 /* Out-of-memory handler.  */

Modified: fsf/trunk/libc/nptl/ChangeLog
==============================================================================
--- fsf/trunk/libc/nptl/ChangeLog (original)
+++ fsf/trunk/libc/nptl/ChangeLog Mon Apr 11 00:03:12 2011
@@ -1,3 +1,10 @@
+2011-04-10  Ulrich Drepper  <drepper@xxxxxxxxx>
+
+	[BZ #12650]
+	* allocatestack.c (get_cached_stack): Deallocate DTV entries before
+	clearing memory.
+	Patch partly by Robert Rex <robert.rex@xxxxxxxxxx>.
+
 2011-01-19  Roland McGrath  <roland@xxxxxxxxxx>
 
 	* pthread_cond_wait.c (__pthread_cond_wait): Fix comment typo.

Modified: fsf/trunk/libc/nptl/allocatestack.c
==============================================================================
--- fsf/trunk/libc/nptl/allocatestack.c (original)
+++ fsf/trunk/libc/nptl/allocatestack.c Mon Apr 11 00:03:12 2011
@@ -1,4 +1,4 @@
-/* Copyright (C) 2002-2007, 2009, 2010 Free Software Foundation, Inc.
+/* Copyright (C) 2002-2007, 2009, 2010, 2011 Free Software Foundation, Inc.
    This file is part of the GNU C Library.
    Contributed by Ulrich Drepper <drepper@xxxxxxxxxx>, 2002.
 
@@ -26,6 +26,7 @@
 #include <sys/mman.h>
 #include <sys/param.h>
 #include <dl-sysdep.h>
+#include <dl-tls.h>
 #include <tls.h>
 #include <lowlevellock.h>
 #include <kernel-features.h>
@@ -241,6 +242,10 @@
 
   /* Clear the DTV.  */
   dtv_t *dtv = GET_DTV (TLS_TPADJ (result));
+  for (size_t cnt = 0; cnt < dtv[-1].counter; ++cnt)
+    if (! dtv[1 + cnt].pointer.is_static
+	&& dtv[1 + cnt].pointer.val != TLS_DTV_UNALLOCATED)
+      free (dtv[1 + cnt].pointer.val);
   memset (dtv, '\0', (dtv[-1].counter + 1) * sizeof (dtv_t));
 
   /* Re-initialize the TLS.  */

Modified: fsf/trunk/libc/sysdeps/i386/dl-tls.h
==============================================================================
--- fsf/trunk/libc/sysdeps/i386/dl-tls.h (original)
+++ fsf/trunk/libc/sysdeps/i386/dl-tls.h Mon Apr 11 00:03:12 2011
@@ -1,5 +1,5 @@
 /* Thread-local storage handling in the ELF dynamic linker.  i386 version.
-   Copyright (C) 2002, 2004 Free Software Foundation, Inc.
+   Copyright (C) 2002, 2004, 2011 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
@@ -58,3 +58,6 @@
 
 # endif
 #endif
+
+/* Value used for dtv entries for which the allocation is delayed.  */
+#define TLS_DTV_UNALLOCATED	((void *) -1l)

Modified: fsf/trunk/libc/sysdeps/ia64/dl-tls.h
==============================================================================
--- fsf/trunk/libc/sysdeps/ia64/dl-tls.h (original)
+++ fsf/trunk/libc/sysdeps/ia64/dl-tls.h Mon Apr 11 00:03:12 2011
@@ -1,5 +1,5 @@
 /* Thread-local storage handling in the ELF dynamic linker.  IA-64 version.
-   Copyright (C) 2002, 2003 Free Software Foundation, Inc.
+   Copyright (C) 2002, 2003, 2011 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
@@ -28,3 +28,6 @@
 #define DONT_USE_TLS_INDEX	1
 
 extern void *__tls_get_addr (size_t m, size_t offset);
+
+/* Value used for dtv entries for which the allocation is delayed.  */
+#define TLS_DTV_UNALLOCATED	((void *) -1l)

Modified: fsf/trunk/libc/sysdeps/powerpc/dl-tls.h
==============================================================================
--- fsf/trunk/libc/sysdeps/powerpc/dl-tls.h (original)
+++ fsf/trunk/libc/sysdeps/powerpc/dl-tls.h Mon Apr 11 00:03:12 2011
@@ -1,5 +1,5 @@
 /* Thread-local storage handling in the ELF dynamic linker.  PowerPC version.
-   Copyright (C) 2003 Free Software Foundation, Inc.
+   Copyright (C) 2003, 2011 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
@@ -47,3 +47,6 @@
 # define GET_ADDR_OFFSET	(ti->ti_offset + TLS_DTV_OFFSET)
 # define __TLS_GET_ADDR(__ti)	(__tls_get_addr (__ti) - TLS_DTV_OFFSET)
 #endif
+
+/* Value used for dtv entries for which the allocation is delayed.  */
+#define TLS_DTV_UNALLOCATED	((void *) -1l)

Modified: fsf/trunk/libc/sysdeps/s390/dl-tls.h
==============================================================================
--- fsf/trunk/libc/sysdeps/s390/dl-tls.h (original)
+++ fsf/trunk/libc/sysdeps/s390/dl-tls.h Mon Apr 11 00:03:12 2011
@@ -1,5 +1,5 @@
 /* Thread-local storage handling in the ELF dynamic linker.  s390 version.
-   Copyright (C) 2003, 2004 Free Software Foundation, Inc.
+   Copyright (C) 2003, 2004, 2011 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
@@ -72,6 +72,9 @@
 # define __TLS_GET_ADDR(__ti) \
   ({ extern char _GLOBAL_OFFSET_TABLE_[] attribute_hidden;		  \
      (void *) __tls_get_offset ((char *) (__ti) - _GLOBAL_OFFSET_TABLE_)  \
-     + (unsigned long) __builtin_thread_pointer (); }) 
+     + (unsigned long) __builtin_thread_pointer (); })
 
 #endif
+
+/* Value used for dtv entries for which the allocation is delayed.  */
+#define TLS_DTV_UNALLOCATED	((void *) -1l)

Modified: fsf/trunk/libc/sysdeps/sh/dl-tls.h
==============================================================================
--- fsf/trunk/libc/sysdeps/sh/dl-tls.h (original)
+++ fsf/trunk/libc/sysdeps/sh/dl-tls.h Mon Apr 11 00:03:12 2011
@@ -1,5 +1,5 @@
 /* Thread-local storage handling in the ELF dynamic linker.  SH version.
-   Copyright (C) 2002 Free Software Foundation, Inc.
+   Copyright (C) 2002, 2011 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
@@ -27,3 +27,6 @@
 
 
 extern void *__tls_get_addr (tls_index *ti);
+
+/* Value used for dtv entries for which the allocation is delayed.  */
+#define TLS_DTV_UNALLOCATED	((void *) -1l)

Modified: fsf/trunk/libc/sysdeps/sparc/dl-tls.h
==============================================================================
--- fsf/trunk/libc/sysdeps/sparc/dl-tls.h (original)
+++ fsf/trunk/libc/sysdeps/sparc/dl-tls.h Mon Apr 11 00:03:12 2011
@@ -1,5 +1,5 @@
 /* Thread-local storage handling in the ELF dynamic linker.  SPARC version.
-   Copyright (C) 2003 Free Software Foundation, Inc.
+   Copyright (C) 2003, 2011 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
@@ -27,3 +27,6 @@
 
 
 extern void *__tls_get_addr (tls_index *ti);
+
+/* Value used for dtv entries for which the allocation is delayed.  */
+#define TLS_DTV_UNALLOCATED	((void *) -1l)

Modified: fsf/trunk/libc/sysdeps/x86_64/dl-tls.h
==============================================================================
--- fsf/trunk/libc/sysdeps/x86_64/dl-tls.h (original)
+++ fsf/trunk/libc/sysdeps/x86_64/dl-tls.h Mon Apr 11 00:03:12 2011
@@ -1,5 +1,5 @@
 /* Thread-local storage handling in the ELF dynamic linker.  x86-64 version.
-   Copyright (C) 2002, 2005 Free Software Foundation, Inc.
+   Copyright (C) 2002, 2005, 2011 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
@@ -27,3 +27,6 @@
 
 
 extern void *__tls_get_addr (tls_index *ti);
+
+/* Value used for dtv entries for which the allocation is delayed.  */
+#define TLS_DTV_UNALLOCATED	((void *) -1l)