[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[commits] r10110 - in /fsf/trunk/libc: ./ csu/ elf/ locale/ malloc/ stdio-common/ sysdeps/generic/ sysdeps/posix/ sysdeps/unix/sysv/li...
- To: commits@xxxxxxxxxx
- Subject: [commits] r10110 - in /fsf/trunk/libc: ./ csu/ elf/ locale/ malloc/ stdio-common/ sysdeps/generic/ sysdeps/posix/ sysdeps/unix/sysv/li...
- From: eglibc@xxxxxxxxxx
- Date: Fri, 26 Mar 2010 20:47:19 -0000
Author: eglibc
Date: Fri Mar 26 13:47:17 2010
New Revision: 10110
Log:
Import glibc-mainline for 2010-03-26
Modified:
fsf/trunk/libc/ChangeLog
fsf/trunk/libc/csu/gmon-start.c
fsf/trunk/libc/elf/dl-sysdep.c
fsf/trunk/libc/locale/setlocale.c
fsf/trunk/libc/malloc/malloc.c
fsf/trunk/libc/malloc/tst-mallocstate.c
fsf/trunk/libc/stdio-common/psiginfo.c
fsf/trunk/libc/sysdeps/generic/ldsodefs.h
fsf/trunk/libc/sysdeps/posix/getaddrinfo.c
fsf/trunk/libc/sysdeps/unix/sysv/linux/dl-sysdep.c
Modified: fsf/trunk/libc/ChangeLog
==============================================================================
--- fsf/trunk/libc/ChangeLog (original)
+++ fsf/trunk/libc/ChangeLog Fri Mar 26 13:47:17 2010
@@ -1,3 +1,32 @@
+2010-03-26 Richard Henderson <rth@xxxxxxxxxx>
+
+ * sysdeps/generic/ldsodefs.h (_dl_random): Mark attribute_relro;
+
+ * stdio-common/psiginfo.c (psiginfo): Fix printf format
+ warning for si_band.
+
+ * locale/setlocale.c (free_category): Finish renaming
+ struct locale_data to __locale_data.
+
+ * csu/gmon-start.c (ENTRY_POINT, etext): Declare as char[], not void.
+ * elf/dl-sysdep.c (_end): Likewise.
+ * sysdeps/unix/sysv/dl-sysdep.c (frob_brk): Likewise with locally
+ declared _end, and associated variables.
+
+2010-03-26 Ulrich Drepper <drepper@xxxxxxxxxx>
+
+ * sysdeps/posix/getaddrinfo.c (gaih_inet): Don't assume success always
+ means aborting the loop over the NSS methods.
+
+2010-03-25 Andreas Schwab <schwab@xxxxxxxxxx>
+
+ * sysdeps/posix/getaddrinfo.c (gaih_inet): Reset no_data before
+ each action.
+
+2010-03-26 Ulrich Drepper <drepper@xxxxxxxxxx>
+
+ * malloc/malloc.c: Remove stale reference to website.
+
2010-03-24 Ulrich Drepper <drepper@xxxxxxxxxx>
[BZ #11389]
Modified: fsf/trunk/libc/csu/gmon-start.c
==============================================================================
--- fsf/trunk/libc/csu/gmon-start.c (original)
+++ fsf/trunk/libc/csu/gmon-start.c Fri Mar 26 13:47:17 2010
@@ -31,9 +31,9 @@
#ifdef ENTRY_POINT_DECL
ENTRY_POINT_DECL(extern)
#else
-extern void ENTRY_POINT;
+extern char ENTRY_POINT[];
#endif
-extern void etext;
+extern char etext[];
#ifndef TEXT_START
# ifdef ENTRY_POINT_DECL
Modified: fsf/trunk/libc/elf/dl-sysdep.c
==============================================================================
--- fsf/trunk/libc/elf/dl-sysdep.c (original)
+++ fsf/trunk/libc/elf/dl-sysdep.c Fri Mar 26 13:47:17 2010
@@ -47,7 +47,7 @@
#endif
extern char **_environ attribute_hidden;
-extern void _end attribute_hidden;
+extern char _end[] attribute_hidden;
/* Protect SUID program against misuse of file descriptors. */
extern void __libc_check_standard_fds (void);
@@ -226,14 +226,14 @@
if (GLRO(dl_platform) != NULL)
GLRO(dl_platformlen) = strlen (GLRO(dl_platform));
- if (__sbrk (0) == &_end)
+ if (__sbrk (0) == _end)
/* The dynamic linker was run as a program, and so the initial break
starts just after our bss, at &_end. The malloc in dl-minimal.c
will consume the rest of this page, so tell the kernel to move the
break up that far. When the user program examines its break, it
will see this new value and not clobber our data. */
__sbrk (GLRO(dl_pagesize)
- - ((&_end - (void *) 0) & (GLRO(dl_pagesize) - 1)));
+ - ((_end - (char *) 0) & (GLRO(dl_pagesize) - 1)));
/* If this is a SUID program we make sure that FDs 0, 1, and 2 are
allocated. If necessary we are doing it ourself. If it is not
Modified: fsf/trunk/libc/locale/setlocale.c
==============================================================================
--- fsf/trunk/libc/locale/setlocale.c (original)
+++ fsf/trunk/libc/locale/setlocale.c Fri Mar 26 13:47:17 2010
@@ -465,7 +465,7 @@
static void __libc_freeres_fn_section
free_category (int category,
- struct __locale_data *here, struct locale_data *c_data)
+ struct __locale_data *here, struct __locale_data *c_data)
{
struct loaded_l10nfile *runp = _nl_locale_file_list[category];
@@ -481,7 +481,7 @@
while (runp != NULL)
{
struct loaded_l10nfile *curr = runp;
- struct __locale_data *data = (struct locale_data *) runp->data;
+ struct __locale_data *data = (struct __locale_data *) runp->data;
if (data != NULL && data != c_data)
_nl_unload_locale (data);
Modified: fsf/trunk/libc/malloc/malloc.c
==============================================================================
--- fsf/trunk/libc/malloc/malloc.c (original)
+++ fsf/trunk/libc/malloc/malloc.c Fri Mar 26 13:47:17 2010
@@ -148,8 +148,7 @@
Thread-safety: thread-safe unless NO_THREADS is defined
Compliance: I believe it is compliant with the 1997 Single Unix Specification
- (See http://www.opennc.org). Also SVID/XPG, ANSI C, and probably
- others as well.
+ Also SVID/XPG, ANSI C, and probably others as well.
* Synopsis of compile-time options:
@@ -4852,8 +4851,7 @@
free_perturb (chunk2mem(p), size - SIZE_SZ);
set_fastchunks(av);
- unsigned int idx = fastbin_index(size);
- fb = &fastbin (av, idx);
+ fb = &fastbin (av, fastbin_index(size));
#ifdef ATOMIC_FASTBINS
mchunkptr fd;
@@ -4867,12 +4865,6 @@
errstr = "double free or corruption (fasttop)";
goto errout;
}
- if (old != NULL
- && __builtin_expect (fastbin_index(chunksize(old)) != idx, 0))
- {
- errstr = "invalid fastbin entry (free)";
- goto errout;
- }
p->fd = fd = old;
}
while ((old = catomic_compare_and_exchange_val_rel (fb, p, fd)) != fd);
@@ -4882,12 +4874,6 @@
if (__builtin_expect (*fb == p, 0))
{
errstr = "double free or corruption (fasttop)";
- goto errout;
- }
- if (*fb != NULL
- && __builtin_expect (fastbin_index(chunksize(*fb)) != idx, 0))
- {
- errstr = "invalid fastbin entry (free)";
goto errout;
}
Modified: fsf/trunk/libc/malloc/tst-mallocstate.c
==============================================================================
--- fsf/trunk/libc/malloc/tst-mallocstate.c (original)
+++ fsf/trunk/libc/malloc/tst-mallocstate.c Fri Mar 26 13:47:17 2010
@@ -51,7 +51,6 @@
for (i=0; i<100; ++i)
{
-printf("round %li\n", i);
save_state = malloc_get_state ();
if (save_state == NULL)
{
@@ -65,18 +64,13 @@
merror ("realloc (i*4) failed.");
free (save_state);
}
-puts("done");
p1 = realloc (p1, 40);
-puts("after realloc");
free (p2);
-puts("after free 1");
p2 = malloc (10);
-puts("after malloc");
if (p2 == NULL)
merror ("malloc (10) failed.");
free (p1);
-puts("after free 2");
return errors != 0;
}
Modified: fsf/trunk/libc/stdio-common/psiginfo.c
==============================================================================
--- fsf/trunk/libc/stdio-common/psiginfo.c (original)
+++ fsf/trunk/libc/stdio-common/psiginfo.c Fri Mar 26 13:47:17 2010
@@ -170,7 +170,7 @@
fprintf (fp, "%ld %d %ld)", (long int) pinfo->si_pid, pinfo->si_status,
(long int) pinfo->si_uid);
else if (pinfo->si_signo == SIGPOLL)
- fprintf (fp, "%ld)", pinfo->si_band);
+ fprintf (fp, "%ld)", (long int) pinfo->si_band);
else
fprintf (fp, "%ld %ld)",
(long int) pinfo->si_pid, (long int) pinfo->si_uid);
Modified: fsf/trunk/libc/sysdeps/generic/ldsodefs.h
==============================================================================
--- fsf/trunk/libc/sysdeps/generic/ldsodefs.h (original)
+++ fsf/trunk/libc/sysdeps/generic/ldsodefs.h Fri Mar 26 13:47:17 2010
@@ -748,7 +748,7 @@
#endif
/* Random data provided by the kernel. */
-extern void *_dl_random attribute_hidden;
+extern void *_dl_random attribute_hidden attribute_relro;
/* OS-dependent function to open the zero-fill device. */
extern int _dl_sysdep_open_zero_fill (void); /* dl-sysdep.c */
Modified: fsf/trunk/libc/sysdeps/posix/getaddrinfo.c
==============================================================================
--- fsf/trunk/libc/sysdeps/posix/getaddrinfo.c (original)
+++ fsf/trunk/libc/sysdeps/posix/getaddrinfo.c Fri Mar 26 13:47:17 2010
@@ -702,6 +702,7 @@
while (!no_more)
{
+ no_data = 0;
nss_gethostbyname4_r fct4
= __nss_lookup_function (nip, "gethostbyname4_r");
if (fct4 != NULL)
@@ -816,17 +817,18 @@
canon = name;
}
}
-
- break;
+ status = NSS_STATUS_SUCCESS;
}
-
- /* We can have different states for AF_INET and
- AF_INET6. Try to find a useful one for both. */
- if (inet6_status == NSS_STATUS_TRYAGAIN)
- status = NSS_STATUS_TRYAGAIN;
- else if (status == NSS_STATUS_UNAVAIL
- && inet6_status != NSS_STATUS_UNAVAIL)
- status = inet6_status;
+ else
+ {
+ /* We can have different states for AF_INET and
+ AF_INET6. Try to find a useful one for both. */
+ if (inet6_status == NSS_STATUS_TRYAGAIN)
+ status = NSS_STATUS_TRYAGAIN;
+ else if (status == NSS_STATUS_UNAVAIL
+ && inet6_status != NSS_STATUS_UNAVAIL)
+ status = inet6_status;
+ }
}
else
status = NSS_STATUS_UNAVAIL;
Modified: fsf/trunk/libc/sysdeps/unix/sysv/linux/dl-sysdep.c
==============================================================================
--- fsf/trunk/libc/sysdeps/unix/sysv/linux/dl-sysdep.c (original)
+++ fsf/trunk/libc/sysdeps/unix/sysv/linux/dl-sysdep.c Fri Mar 26 13:47:17 2010
@@ -47,12 +47,12 @@
Later Linux kernels have changed this behavior so that the initial
break value is rounded up to the page boundary before we start. */
- extern void *__curbrk attribute_hidden;
- extern void _end attribute_hidden;
- void *const endpage = (void *) 0 + (((__curbrk - (void *) 0)
+ extern char *__curbrk attribute_hidden;
+ extern char _end[] attribute_hidden;
+ char *const endpage = (void *) 0 + (((__curbrk - (char *) 0)
+ GLRO(dl_pagesize) - 1)
& -GLRO(dl_pagesize));
- if (__builtin_expect (__curbrk >= &_end && __curbrk < endpage, 0))
+ if (__builtin_expect (__curbrk >= _end && __curbrk < endpage, 0))
__brk (endpage);
#endif
}