[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Commits] r20559 - in /fsf/trunk/libc: ./ debug/ iconv/ malloc/ manual/ manual/examples/ nptl/ scripts/
- To: commits@xxxxxxxxxx
- Subject: [Commits] r20559 - in /fsf/trunk/libc: ./ debug/ iconv/ malloc/ manual/ manual/examples/ nptl/ scripts/
- From: eglibc@xxxxxxxxxx
- Date: Sat, 08 Sep 2012 00:01:46 -0000
Author: eglibc
Date: Sat Sep 8 00:01:44 2012
New Revision: 20559
Log:
Import glibc-mainline for 2012-09-08
Modified:
fsf/trunk/libc/ChangeLog
fsf/trunk/libc/Makefile
fsf/trunk/libc/NEWS
fsf/trunk/libc/debug/Makefile
fsf/trunk/libc/iconv/gconv_db.c
fsf/trunk/libc/malloc/arena.c
fsf/trunk/libc/malloc/malloc.c
fsf/trunk/libc/manual/arith.texi
fsf/trunk/libc/manual/examples/inetcli.c
fsf/trunk/libc/manual/memory.texi
fsf/trunk/libc/manual/socket.texi
fsf/trunk/libc/nptl/ChangeLog
fsf/trunk/libc/nptl/Makefile
fsf/trunk/libc/scripts/check-local-headers.sh
Modified: fsf/trunk/libc/ChangeLog
==============================================================================
--- fsf/trunk/libc/ChangeLog (original)
+++ fsf/trunk/libc/ChangeLog Sat Sep 8 00:01:44 2012
@@ -1,3 +1,59 @@
+2012-09-07 H.J. Lu <hongjiu.lu@xxxxxxxxx>
+
+ * scripts/check-local-headers.sh: Add "shopt -s nullglob".
+
+ * iconv/gconv_db.c (free_derivation): Check if deriv->steps
+ is NULL.
+
+ * debug/Makefile (LDFLAGS-tst-chk4): Renamed to ...
+ (LDLIBS-tst-chk4): This.
+ (LDFLAGS-tst-chk5): Renamed to ...
+ (LDLIBS-tst-chk5): This.
+ (LDFLAGS-tst-chk6): Renamed to ...
+ (LDLIBS-tst-chk6): This.
+ (LDFLAGS-tst-lfschk4): Renamed to ...
+ (LDLIBS-tst-lfschk4): This.
+ (LDFLAGS-tst-lfschk5): Renamed to ...
+ (LDLIBS-tst-lfschk5): This.
+ (LDFLAGS-tst-lfschk6): Renamed to ...
+ (LDLIBS-tst-lfschk6): This.
+
+ * Makefile ($(inst_includedir)/gnu/stubs.h): Remove dependency
+ on $(common-objpfx)soversions.mk.
+
+2012-09-07 Joseph Myers <joseph@xxxxxxxxxxxxxxxx>
+
+ [BZ #10014]
+ * manual/examples/inetcli.c (SERVERHOST): Use www.gnu.org as
+ example host name.
+
+2012-09-07 Siddhesh Poyarekar <siddhesh@xxxxxxxxxx>
+
+ * malloc/arena.c (arena_get_retry): New function that gets
+ another arena for the caller to try its request on.
+ * malloc/malloc.c (__libc_malloc): Use get_another_arena if the
+ current arena cannot fulfill the request.
+ (__libc_memalign): Likewise.
+ (__libc_memalign): Likewise.
+ (__libc_pvalloc): Likewise.
+ (__libc_calloc): Likewise.
+
+2012-09-05 John Tobey <john.tobey@xxxxxxxxx>
+
+ [BZ #13542]
+ * manual/arith.texi (Operations on Complex): Fix description
+ of carg branch cut.
+
+2012-09-06 Joseph Myers <joseph@xxxxxxxxxxxxxxxx>
+
+ [BZ #10014]
+ * manual/socket.texi (Host Addresses): Use www.gnu.org as example
+ host name.
+
+ [BZ #10038]
+ * manual/memory.texi (Memory): Make order of menu items match
+ order of sections.
+
2012-09-06 H.J. Lu <hongjiu.lu@xxxxxxxxx>
* elf/dl-tls.c (DL_INITIAL_DTV): Removed.
Modified: fsf/trunk/libc/Makefile
==============================================================================
--- fsf/trunk/libc/Makefile (original)
+++ fsf/trunk/libc/Makefile Sat Sep 8 00:01:44 2012
@@ -175,7 +175,7 @@
else
installed-stubs = $(inst_includedir)/gnu/stubs-$(default-abi).h
-$(inst_includedir)/gnu/stubs.h: $(common-objpfx)soversions.mk $(+force)
+$(inst_includedir)/gnu/stubs.h: $(+force)
$(make-target-directory)
{ \
echo '/* This file is automatically generated.';\
Modified: fsf/trunk/libc/NEWS
==============================================================================
--- fsf/trunk/libc/NEWS (original)
+++ fsf/trunk/libc/NEWS Sat Sep 8 00:01:44 2012
@@ -9,11 +9,11 @@
* The following bugs are resolved with this release:
- 1349, 3479, 5400, 6778, 6808, 9685, 9914, 11607, 13412, 13717, 13696,
- 13939, 13966, 14042, 14090, 14166, 14150, 14151, 14154, 14157, 14166,
- 14173, 14195, 14237, 14252, 14283, 14298, 14303, 14307, 14328, 14331,
- 14336, 14337, 14347, 14349, 14459, 14476, 14505, 14510, 14516, 14519,
- 14532, 14538, 14544, 14545.
+ 1349, 3479, 5400, 6778, 6808, 9685, 9914, 10014, 10038, 11607, 13412,
+ 13542, 13717, 13696, 13939, 13966, 14042, 14090, 14166, 14150, 14151,
+ 14154, 14157, 14166, 14173, 14195, 14237, 14252, 14283, 14298, 14303,
+ 14307, 14328, 14331, 14336, 14337, 14347, 14349, 14459, 14476, 14505,
+ 14510, 14516, 14519, 14532, 14538, 14544, 14545.
* Support for STT_GNU_IFUNC symbols added for s390 and s390x.
Optimized versions of memcpy, memset, and memcmp added for System z10 and
Modified: fsf/trunk/libc/debug/Makefile
==============================================================================
--- fsf/trunk/libc/debug/Makefile (original)
+++ fsf/trunk/libc/debug/Makefile Sat Sep 8 00:01:44 2012
@@ -114,12 +114,12 @@
tst-lfschk4-ENV = LOCPATH=$(common-objpfx)localedata
tst-lfschk5-ENV = LOCPATH=$(common-objpfx)localedata
tst-lfschk6-ENV = LOCPATH=$(common-objpfx)localedata
-LDFLAGS-tst-chk4 = -lstdc++
-LDFLAGS-tst-chk5 = -lstdc++
-LDFLAGS-tst-chk6 = -lstdc++
-LDFLAGS-tst-lfschk4 = -lstdc++
-LDFLAGS-tst-lfschk5 = -lstdc++
-LDFLAGS-tst-lfschk6 = -lstdc++
+LDLIBS-tst-chk4 = -lstdc++
+LDLIBS-tst-chk5 = -lstdc++
+LDLIBS-tst-chk6 = -lstdc++
+LDLIBS-tst-lfschk4 = -lstdc++
+LDLIBS-tst-lfschk5 = -lstdc++
+LDLIBS-tst-lfschk6 = -lstdc++
tests = backtrace-tst tst-longjmp_chk tst-chk1 tst-chk2 tst-chk3 \
tst-lfschk1 tst-lfschk2 tst-lfschk3 test-strcpy_chk test-stpcpy_chk \
Modified: fsf/trunk/libc/iconv/gconv_db.c
==============================================================================
--- fsf/trunk/libc/iconv/gconv_db.c (original)
+++ fsf/trunk/libc/iconv/gconv_db.c Sat Sep 8 00:01:44 2012
@@ -193,10 +193,13 @@
}
/* Free the name strings. */
- free ((char *) deriv->steps[0].__from_name);
- free ((char *) deriv->steps[deriv->nsteps - 1].__to_name);
-
- free ((struct __gconv_step *) deriv->steps);
+ if (deriv->steps != NULL)
+ {
+ free ((char *) deriv->steps[0].__from_name);
+ free ((char *) deriv->steps[deriv->nsteps - 1].__to_name);
+ free ((struct __gconv_step *) deriv->steps);
+ }
+
free (deriv);
}
Modified: fsf/trunk/libc/malloc/arena.c
==============================================================================
--- fsf/trunk/libc/malloc/arena.c (original)
+++ fsf/trunk/libc/malloc/arena.c Sat Sep 8 00:01:44 2012
@@ -917,6 +917,27 @@
return a;
}
+/* If we don't have the main arena, then maybe the failure is due to running
+ out of mmapped areas, so we can try allocating on the main arena.
+ Otherwise, it is likely that sbrk() has failed and there is still a chance
+ to mmap(), so try one of the other arenas. */
+static mstate
+arena_get_retry (mstate ar_ptr, size_t bytes)
+{
+ if(ar_ptr != &main_arena) {
+ (void)mutex_unlock(&ar_ptr->mutex);
+ ar_ptr = &main_arena;
+ (void)mutex_lock(&ar_ptr->mutex);
+ } else {
+ /* Grab ar_ptr->next prior to releasing its lock. */
+ mstate prev = ar_ptr->next ? ar_ptr : 0;
+ (void)mutex_unlock(&ar_ptr->mutex);
+ ar_ptr = arena_get2(prev, bytes, ar_ptr);
+ }
+
+ return ar_ptr;
+}
+
#ifdef PER_THREAD
static void __attribute__ ((section ("__libc_thread_freeres_fn")))
arena_thread_freeres (void)
Modified: fsf/trunk/libc/malloc/malloc.c
==============================================================================
--- fsf/trunk/libc/malloc/malloc.c (original)
+++ fsf/trunk/libc/malloc/malloc.c Sat Sep 8 00:01:44 2012
@@ -2858,23 +2858,10 @@
return 0;
victim = _int_malloc(ar_ptr, bytes);
if(!victim) {
- /* Maybe the failure is due to running out of mmapped areas. */
- if(ar_ptr != &main_arena) {
- (void)mutex_unlock(&ar_ptr->mutex);
- ar_ptr = &main_arena;
- (void)mutex_lock(&ar_ptr->mutex);
+ ar_ptr = arena_get_retry(ar_ptr, bytes);
+ if (__builtin_expect(ar_ptr != NULL, 1)) {
victim = _int_malloc(ar_ptr, bytes);
(void)mutex_unlock(&ar_ptr->mutex);
- } else {
- /* ... or sbrk() has failed and there is still a chance to mmap()
- Grab ar_ptr->next prior to releasing its lock. */
- mstate prev = ar_ptr->next ? ar_ptr : 0;
- (void)mutex_unlock(&ar_ptr->mutex);
- ar_ptr = arena_get2(prev, bytes, ar_ptr);
- if(ar_ptr) {
- victim = _int_malloc(ar_ptr, bytes);
- (void)mutex_unlock(&ar_ptr->mutex);
- }
}
} else
(void)mutex_unlock(&ar_ptr->mutex);
@@ -3038,23 +3025,10 @@
return 0;
p = _int_memalign(ar_ptr, alignment, bytes);
if(!p) {
- /* Maybe the failure is due to running out of mmapped areas. */
- if(ar_ptr != &main_arena) {
- (void)mutex_unlock(&ar_ptr->mutex);
- ar_ptr = &main_arena;
- (void)mutex_lock(&ar_ptr->mutex);
+ ar_ptr = arena_get_retry (ar_ptr, bytes);
+ if (__builtin_expect(ar_ptr != NULL, 1)) {
p = _int_memalign(ar_ptr, alignment, bytes);
(void)mutex_unlock(&ar_ptr->mutex);
- } else {
- /* ... or sbrk() has failed and there is still a chance to mmap()
- Grab ar_ptr->next prior to releasing its lock. */
- mstate prev = ar_ptr->next ? ar_ptr : 0;
- (void)mutex_unlock(&ar_ptr->mutex);
- ar_ptr = arena_get2(prev, bytes, ar_ptr);
- if(ar_ptr) {
- p = _int_memalign(ar_ptr, alignment, bytes);
- (void)mutex_unlock(&ar_ptr->mutex);
- }
}
} else
(void)mutex_unlock(&ar_ptr->mutex);
@@ -3088,23 +3062,10 @@
return 0;
p = _int_valloc(ar_ptr, bytes);
if(!p) {
- /* Maybe the failure is due to running out of mmapped areas. */
- if(ar_ptr != &main_arena) {
- (void)mutex_unlock(&ar_ptr->mutex);
- ar_ptr = &main_arena;
- (void)mutex_lock(&ar_ptr->mutex);
+ ar_ptr = arena_get_retry (ar_ptr, bytes);
+ if (__builtin_expect(ar_ptr != NULL, 1)) {
p = _int_memalign(ar_ptr, pagesz, bytes);
(void)mutex_unlock(&ar_ptr->mutex);
- } else {
- /* ... or sbrk() has failed and there is still a chance to mmap()
- Grab ar_ptr->next prior to releasing its lock. */
- mstate prev = ar_ptr->next ? ar_ptr : 0;
- (void)mutex_unlock(&ar_ptr->mutex);
- ar_ptr = arena_get2(prev, bytes, ar_ptr);
- if(ar_ptr) {
- p = _int_memalign(ar_ptr, pagesz, bytes);
- (void)mutex_unlock(&ar_ptr->mutex);
- }
}
} else
(void)mutex_unlock (&ar_ptr->mutex);
@@ -3136,23 +3097,10 @@
arena_get(ar_ptr, bytes + 2*pagesz + MINSIZE);
p = _int_pvalloc(ar_ptr, bytes);
if(!p) {
- /* Maybe the failure is due to running out of mmapped areas. */
- if(ar_ptr != &main_arena) {
- (void)mutex_unlock(&ar_ptr->mutex);
- ar_ptr = &main_arena;
- (void)mutex_lock(&ar_ptr->mutex);
+ ar_ptr = arena_get_retry (ar_ptr, bytes + 2*pagesz + MINSIZE);
+ if (__builtin_expect(ar_ptr != NULL, 1)) {
p = _int_memalign(ar_ptr, pagesz, rounded_bytes);
(void)mutex_unlock(&ar_ptr->mutex);
- } else {
- /* ... or sbrk() has failed and there is still a chance to mmap()
- Grab ar_ptr->next prior to releasing its lock. */
- mstate prev = ar_ptr->next ? ar_ptr : 0;
- (void)mutex_unlock(&ar_ptr->mutex);
- ar_ptr = arena_get2(prev, bytes + 2*pagesz + MINSIZE, ar_ptr);
- if(ar_ptr) {
- p = _int_memalign(ar_ptr, pagesz, rounded_bytes);
- (void)mutex_unlock(&ar_ptr->mutex);
- }
}
} else
(void)mutex_unlock(&ar_ptr->mutex);
@@ -3225,22 +3173,10 @@
av == arena_for_chunk(mem2chunk(mem)));
if (mem == 0) {
- /* Maybe the failure is due to running out of mmapped areas. */
- if(av != &main_arena) {
+ av = arena_get_retry (av, sz);
+ if (__builtin_expect(av != NULL, 1)) {
+ mem = _int_malloc(av, sz);
(void)mutex_unlock(&av->mutex);
- (void)mutex_lock(&main_arena.mutex);
- mem = _int_malloc(&main_arena, sz);
- (void)mutex_unlock(&main_arena.mutex);
- } else {
- /* ... or sbrk() has failed and there is still a chance to mmap()
- Grab av->next prior to releasing its lock. */
- mstate prev = av->next ? av : 0;
- (void)mutex_unlock(&av->mutex);
- av = arena_get2(prev, sz, av);
- if(av) {
- mem = _int_malloc(av, sz);
- (void)mutex_unlock(&av->mutex);
- }
}
if (mem == 0) return 0;
} else
Modified: fsf/trunk/libc/manual/arith.texi
==============================================================================
--- fsf/trunk/libc/manual/arith.texi (original)
+++ fsf/trunk/libc/manual/arith.texi Sat Sep 8 00:01:44 2012
@@ -1966,10 +1966,10 @@
These functions return the argument of the complex number @var{z}.
The argument of a complex number is the angle in the complex plane
between the positive real axis and a line passing through zero and the
-number. This angle is measured in the usual fashion and ranges from @math{0}
-to @math{2@pi{}}.
-
-@code{carg} has a branch cut along the positive real axis.
+number. This angle is measured in the usual fashion and ranges from
+@math{-@pi{}} to @math{@pi{}}.
+
+@code{carg} has a branch cut along the negative real axis.
@end deftypefun
@comment complex.h
Modified: fsf/trunk/libc/manual/examples/inetcli.c
==============================================================================
--- fsf/trunk/libc/manual/examples/inetcli.c (original)
+++ fsf/trunk/libc/manual/examples/inetcli.c Sat Sep 8 00:01:44 2012
@@ -26,7 +26,7 @@
#define PORT 5555
#define MESSAGE "Yow!!! Are we having fun yet?!?"
-#define SERVERHOST "mescaline.gnu.org"
+#define SERVERHOST "www.gnu.org"
void
write_to_server (int filedes)
Modified: fsf/trunk/libc/manual/memory.texi
==============================================================================
--- fsf/trunk/libc/manual/memory.texi (original)
+++ fsf/trunk/libc/manual/memory.texi Sat Sep 8 00:01:44 2012
@@ -16,8 +16,8 @@
@menu
* Memory Concepts:: An introduction to concepts and terminology.
* Memory Allocation:: Allocating storage for your program data
+* Resizing the Data Segment:: @code{brk}, @code{sbrk}
* Locking Pages:: Preventing page faults
-* Resizing the Data Segment:: @code{brk}, @code{sbrk}
@end menu
Memory mapped I/O is not discussed in this chapter. @xref{Memory-mapped I/O}.
Modified: fsf/trunk/libc/manual/socket.texi
==============================================================================
--- fsf/trunk/libc/manual/socket.texi (original)
+++ fsf/trunk/libc/manual/socket.texi Sat Sep 8 00:01:44 2012
@@ -809,7 +809,7 @@
colons, as in @samp{5f03:1200:836f:c100::1}.
Each computer also has one or more @dfn{host names}, which are strings
-of words separated by periods, as in @samp{mescaline.gnu.org}.
+of words separated by periods, as in @samp{www.gnu.org}.
Programs that let the user specify a host typically accept both numeric
addresses and host names. To open a connection a program needs a
Modified: fsf/trunk/libc/nptl/ChangeLog
==============================================================================
--- fsf/trunk/libc/nptl/ChangeLog (original)
+++ fsf/trunk/libc/nptl/ChangeLog Sat Sep 8 00:01:44 2012
@@ -1,3 +1,8 @@
+2012-09-07 H.J. Lu <hongjiu.lu@xxxxxxxxx>
+
+ * debug/Makefile (LDFLAGS-tst-cancel24): Renamed to ...
+ (LDLIBS-tst-cancel24): This.
+
2012-09-06 H.J. Lu <hongjiu.lu@xxxxxxxxx>
[BZ #14545]
Modified: fsf/trunk/libc/nptl/Makefile
==============================================================================
--- fsf/trunk/libc/nptl/Makefile (original)
+++ fsf/trunk/libc/nptl/Makefile Sat Sep 8 00:01:44 2012
@@ -507,7 +507,7 @@
$(objpfx)tst-rwlock14: $(common-objpfx)rt/librt.a
endif
-LDFLAGS-tst-cancel24 = $(no-as-needed) -lstdc++
+LDLIBS-tst-cancel24 = $(no-as-needed) -lstdc++
extra-B-pthread.so = -B$(common-objpfx)nptl/
$(objpfx)libpthread.so: $(addprefix $(objpfx),$(crti-objs) $(crtn-objs))
Modified: fsf/trunk/libc/scripts/check-local-headers.sh
==============================================================================
--- fsf/trunk/libc/scripts/check-local-headers.sh (original)
+++ fsf/trunk/libc/scripts/check-local-headers.sh Sat Sep 8 00:01:44 2012
@@ -1,5 +1,5 @@
#! /bin/bash
-# Copyright (C) 2005,2007,2009,2011 Free Software Foundation, Inc.
+# Copyright (C) 2005-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
@@ -22,6 +22,9 @@
# To avoid long paths.
cd "$objpfx"
+# OK if *.os is missing.
+shopt -s nullglob
+
# Search all dependency files for file names in the include directory.
# There are a few system headers we are known to use.
exec ${AWK} -v includedir="$includedir" '
_______________________________________________
Commits mailing list
Commits@xxxxxxxxxx
http://eglibc.org/cgi-bin/mailman/listinfo/commits