aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--ChangeLog46
-rw-r--r--README7
-rw-r--r--README.template7
-rw-r--r--elf/rtld.c3
-rw-r--r--fedora/branch.mk4
-rw-r--r--fedora/glibc.spec.in6
-rw-r--r--io/fts.c11
-rw-r--r--libio/bug-wmemstream1.c1
-rw-r--r--libio/tst-wmemstream1.c2
-rw-r--r--libio/tst-wmemstream2.c2
-rw-r--r--libio/wmemstream.c1
-rw-r--r--localedata/ChangeLog4
-rw-r--r--localedata/locales/en_GB3
-rw-r--r--manual/message.texi4
-rw-r--r--nscd/mem.c6
-rw-r--r--nscd/nscd-client.h1
-rw-r--r--nscd/nscd_helper.c17
-rw-r--r--posix/glob.c18
-rw-r--r--sysdeps/posix/getaddrinfo.c4
-rw-r--r--sysdeps/unix/sysv/linux/sparc/sparc64/pause.c8
20 files changed, 112 insertions, 43 deletions
diff --git a/ChangeLog b/ChangeLog
index e7e5d7d..7c213e1 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,51 @@
+2006-10-02 Jakub Jelinek <jakub@redhat.com>
+
+ [BZ #3291]
+ * sysdeps/unix/sysv/linux/sparc/sparc64/pause.c: Include
+ errno.h, signal.h, unistd.h and sysdep-cancel.h.
+ (__sigprocmask): Define.
+
+2006-10-02 Ulrich Drepper <drepper@redhat.com>
+
+ * elf/rtld.c (dl_main): Don't use prelinking if LD_DYNAMIC_WEAK is
+ used.
+
+2006-10-02 Jakub Jelinek <jakub@redhat.com>
+
+ * nscd/mem.c (mempool_alloc): Round array size to 16 bytes
+ in oldtotal and newtotal calculation.
+ * nscd/nscd-client.h (struct mapped_database): Add datasize
+ field.
+ * nscd/nscd_helper.c (get_mapping): Initialize datasize field.
+ (__nscd_get_map_ref): Get a new mapping even if mapping's data_size
+ increased.
+ (__nscd_cache_search): Add checks to make sure we never reference
+ data beyond the current mapping.
+
+2006-10-02 Dmitry V. Levin <ldv@altlinux.org>
+
+ * sysdeps/posix/getaddrinfo.c (match_prefix): Make mask and val
+ variables const to avoid compiler warnings.
+
+ * io/fts.c (fts_close): Remove redundant checks.
+ (fts_build): Likewise.
+ (fts_palloc): Likewise.
+
+ * manual/message.texi (Advanced gettext functions,
+ Using gettextized software): Fix typos.
+
+2006-09-30 Ulrich Drepper <drepper@redhat.com>
+
+ * posix/glob.c (glob_in_dir): Add some comments and asserts to
+ explain why there are no leaks.
+
2006-09-29 Ulrich Drepper <drepper@redhat.com>
+ * libio/wmemstream.c: Include <wchar.h>.
+ * libio/bug-wmemstream1.c: Likewise.
+ * libio/tst-wmemstream1.c: Likewise.
+ * libio/tst-wmemstream2.c: Likewise.
+
* version.h (RELEASE): Bump to 2.5.
* README: Regenerated.
diff --git a/README b/README
index 2b9495d..97b3a61 100644
--- a/README
+++ b/README
@@ -10,13 +10,6 @@ In GNU/Linux systems, the C library works with the Linux kernel to
implement the operating system behavior seen by user applications.
In GNU/Hurd systems, it works with a microkernel and Hurd servers.
-Version 2.4 is the first release after a long period of development, and
-introduces changes to the API and a new ABI for all configurations. It
-has been tested and deployed in new production systems, but should still
-be considered somewhat experimental. The stable 2.3 release series
-continues to be maintained, and implements a widely-deployed ABI.
-Version 2.3.6 is available, and we will release 2.3.7 with more bug fixes.
-
The GNU C Library implements much of the POSIX.1 functionality in the
GNU/Hurd system, using configurations i[34567]86-*-gnu.
diff --git a/README.template b/README.template
index 5e22a27..02ef86c 100644
--- a/README.template
+++ b/README.template
@@ -10,13 +10,6 @@ In GNU/Linux systems, the C library works with the Linux kernel to
implement the operating system behavior seen by user applications.
In GNU/Hurd systems, it works with a microkernel and Hurd servers.
-Version 2.4 is the first release after a long period of development, and
-introduces changes to the API and a new ABI for all configurations. It
-has been tested and deployed in new production systems, but should still
-be considered somewhat experimental. The stable 2.3 release series
-continues to be maintained, and implements a widely-deployed ABI.
-Version 2.3.6 is available, and we will release 2.3.7 with more bug fixes.
-
The GNU C Library implements much of the POSIX.1 functionality in the
GNU/Hurd system, using configurations i[34567]86-*-gnu.
diff --git a/elf/rtld.c b/elf/rtld.c
index 718fa13..7746377 100644
--- a/elf/rtld.c
+++ b/elf/rtld.c
@@ -2087,7 +2087,8 @@ ERROR: ld.so: object '%s' cannot be loaded as audit interface: %s; ignored.\n",
}
if (main_map->l_info[ADDRIDX (DT_GNU_LIBLIST)]
- && ! __builtin_expect (GLRO(dl_profile) != NULL, 0))
+ && ! __builtin_expect (GLRO(dl_profile) != NULL, 0)
+ && ! __builtin_expect (GLRO(dl_dynamic_weak), 0))
{
ElfW(Lib) *liblist, *liblistend;
struct link_map **r_list, **r_listend, *l;
diff --git a/fedora/branch.mk b/fedora/branch.mk
index 67c94d1..5c112f2 100644
--- a/fedora/branch.mk
+++ b/fedora/branch.mk
@@ -3,5 +3,5 @@ glibc-branch := fedora
glibc-base := HEAD
DIST_BRANCH := devel
COLLECTION := dist-fc4
-fedora-sync-date := 2006-09-29 20:37 UTC
-fedora-sync-tag := fedora-glibc-20060929T2037
+fedora-sync-date := 2006-10-02 18:58 UTC
+fedora-sync-tag := fedora-glibc-20061002T1858
diff --git a/fedora/glibc.spec.in b/fedora/glibc.spec.in
index b7ef376..37cda60 100644
--- a/fedora/glibc.spec.in
+++ b/fedora/glibc.spec.in
@@ -1,4 +1,4 @@
-%define glibcrelease 1
+%define glibcrelease 2
%define auxarches i586 i686 athlon sparcv9 alphaev6
%define xenarches i686 athlon
%ifarch %{xenarches}
@@ -1528,6 +1528,10 @@ rm -f *.filelist*
%endif
%changelog
+* Mon Oct 2 2006 Jakub Jelinek <jakub@redhat.com> 2.5-2
+- fix nscd database growing (#207928)
+- bypass prelinking when LD_DYNAMIC_WEAK=1 is in the environment
+
* Fri Sep 29 2006 Jakub Jelinek <jakub@redhat.com> 2.5-1
- glibc 2.5 release
diff --git a/io/fts.c b/io/fts.c
index 6383fe8..532743f 100644
--- a/io/fts.c
+++ b/io/fts.c
@@ -251,8 +251,7 @@ fts_close(sp)
/* Free up child linked list, sort array, path buffer. */
if (sp->fts_child)
fts_lfree(sp->fts_child);
- if (sp->fts_array)
- free(sp->fts_array);
+ free(sp->fts_array);
free(sp->fts_path);
/* Return to original directory, save errno if necessary. */
@@ -705,8 +704,7 @@ fts_build(sp, type)
* structures already allocated.
*/
mem1: saved_errno = errno;
- if (p)
- free(p);
+ free(p);
fts_lfree(head);
(void)__closedir(dirp);
cur->fts_info = FTS_ERR;
@@ -1043,10 +1041,7 @@ fts_palloc(sp, more)
* We limit fts_pathlen to USHRT_MAX to be safe in both cases.
*/
if (sp->fts_pathlen < 0 || sp->fts_pathlen >= USHRT_MAX) {
- if (sp->fts_path) {
- free(sp->fts_path);
- sp->fts_path = NULL;
- }
+ free(sp->fts_path);
sp->fts_path = NULL;
__set_errno (ENAMETOOLONG);
return (1);
diff --git a/libio/bug-wmemstream1.c b/libio/bug-wmemstream1.c
index 2190593..22d67f7 100644
--- a/libio/bug-wmemstream1.c
+++ b/libio/bug-wmemstream1.c
@@ -1,5 +1,6 @@
#include <stdio.h>
#include <string.h>
+#include <wchar.h>
static int
diff --git a/libio/tst-wmemstream1.c b/libio/tst-wmemstream1.c
index 0c59c1a..f8b308b 100644
--- a/libio/tst-wmemstream1.c
+++ b/libio/tst-wmemstream1.c
@@ -1,3 +1,5 @@
+#include <wchar.h>
+
#define CHAR_T wchar_t
#define W(o) L##o
#define OPEN_MEMSTREAM open_wmemstream
diff --git a/libio/tst-wmemstream2.c b/libio/tst-wmemstream2.c
index f51a1db..e2442eb 100644
--- a/libio/tst-wmemstream2.c
+++ b/libio/tst-wmemstream2.c
@@ -1,3 +1,5 @@
+#include <wchar.h>
+
#define CHAR_T wchar_t
#define W(o) L##o
#define OPEN_MEMSTREAM open_wmemstream
diff --git a/libio/wmemstream.c b/libio/wmemstream.c
index 85ea649..5779318 100644
--- a/libio/wmemstream.c
+++ b/libio/wmemstream.c
@@ -20,6 +20,7 @@
#include "strfile.h"
#include <stdio.h>
#include <stdlib.h>
+#include <wchar.h>
struct _IO_FILE_wmemstream
diff --git a/localedata/ChangeLog b/localedata/ChangeLog
index aea3f35..78414d5 100644
--- a/localedata/ChangeLog
+++ b/localedata/ChangeLog
@@ -1,3 +1,7 @@
+2006-10-01 Ulrich Drepper <drepper@redhat.com>
+
+ * locales/en_GB: Use more complete en_US data in LC_NAME.
+
2006-09-29 Ulrich Drepper <drepper@redhat.com>
[BZ #39]
diff --git a/localedata/locales/en_GB b/localedata/locales/en_GB
index fdd2f49..a42fb6a 100644
--- a/localedata/locales/en_GB
+++ b/localedata/locales/en_GB
@@ -146,8 +146,7 @@ measurement 1
END LC_MEASUREMENT
LC_NAME
-name_fmt "<U0025><U0064><U0025><U0074><U0025><U0067><U0025><U0074>/
-<U0025><U006D><U0025><U0074><U0025><U0066>"
+copy "en_US"
END LC_NAME
LC_ADDRESS
diff --git a/manual/message.texi b/manual/message.texi
index eab98e9..1507a6d 100644
--- a/manual/message.texi
+++ b/manual/message.texi
@@ -1189,7 +1189,7 @@ the rules of how to select the plural form. Since the formula varies
with every language this is the only viable solution except for
hardcoding the information in the code (which still would require the
possibility of extensions to not prevent the use of new languages). The
-details are explained in the GNU @code{gettext} manual. Here only a a
+details are explained in the GNU @code{gettext} manual. Here only a
bit of information is provided.
The information about the plural form selection has to be stored in the
@@ -1590,7 +1590,7 @@ the user to select the message s/he wants to see. S/He must understand
them.
The POSIX locale model uses the environment variables @code{LC_COLLATE},
-@code{LC_CTYPE}, @code{LC_MESSAGES}, @code{LC_MONETARY}, @code{NUMERIC},
+@code{LC_CTYPE}, @code{LC_MESSAGES}, @code{LC_MONETARY}, @code{LC_NUMERIC},
and @code{LC_TIME} to select the locale which is to be used. This way
the user can influence lots of functions. As we mentioned above the
@code{gettext} functions also take advantage of this.
diff --git a/nscd/mem.c b/nscd/mem.c
index a41c0bd..5206c5a 100644
--- a/nscd/mem.c
+++ b/nscd/mem.c
@@ -1,5 +1,5 @@
/* Cache memory handling.
- Copyright (C) 2004, 2005 Free Software Foundation, Inc.
+ Copyright (C) 2004, 2005, 2006 Free Software Foundation, Inc.
This file is part of the GNU C Library.
Contributed by Ulrich Drepper <drepper@redhat.com>, 2004.
@@ -480,12 +480,12 @@ mempool_alloc (struct database_dyn *db, size_t len)
{
/* Try to resize the database. Grow size of 1/8th. */
size_t oldtotal = (sizeof (struct database_pers_head)
- + db->head->module * sizeof (ref_t)
+ + roundup (db->head->module * sizeof (ref_t), ALIGN)
+ db->head->data_size);
size_t new_data_size = (db->head->data_size
+ MAX (2 * len, db->head->data_size / 8));
size_t newtotal = (sizeof (struct database_pers_head)
- + db->head->module * sizeof (ref_t)
+ + roundup (db->head->module * sizeof (ref_t), ALIGN)
+ new_data_size);
if (newtotal > db->max_db_size)
{
diff --git a/nscd/nscd-client.h b/nscd/nscd-client.h
index 440697f..0fd2d9f 100644
--- a/nscd/nscd-client.h
+++ b/nscd/nscd-client.h
@@ -258,6 +258,7 @@ struct mapped_database
const char *data;
size_t mapsize;
int counter; /* > 0 indicates it is usable. */
+ size_t datasize;
};
#define NO_MAPPING ((struct mapped_database *) -1l)
diff --git a/nscd/nscd_helper.c b/nscd/nscd_helper.c
index 1dfe746..7c45981 100644
--- a/nscd/nscd_helper.c
+++ b/nscd/nscd_helper.c
@@ -290,6 +290,7 @@ get_mapping (request_type type, const char *key,
newp->data = ((char *) mapping + head.header_size
+ roundup (head.module * sizeof (ref_t), ALIGN));
newp->mapsize = size;
+ newp->datasize = head.data_size;
/* Set counter to 1 to show it is usable. */
newp->counter = 1;
@@ -340,7 +341,8 @@ __nscd_get_map_ref (request_type type, const char *name,
/* If not mapped or timestamp not updated, request new map. */
if (cur == NULL
|| (cur->head->nscd_certainly_running == 0
- && cur->head->timestamp + MAPPING_TIMEOUT < time (NULL)))
+ && cur->head->timestamp + MAPPING_TIMEOUT < time (NULL))
+ || cur->head->data_size > cur->datasize)
cur = get_mapping (type, name,
(struct mapped_database **) &mapptr->mapped);
@@ -365,14 +367,18 @@ __nscd_cache_search (request_type type, const char *key, size_t keylen,
const struct mapped_database *mapped)
{
unsigned long int hash = __nis_hash (key, keylen) % mapped->head->module;
+ size_t datasize = mapped->datasize;
ref_t work = mapped->head->array[hash];
- while (work != ENDREF)
+ while (work != ENDREF && work + sizeof (struct hashentry) <= datasize)
{
struct hashentry *here = (struct hashentry *) (mapped->data + work);
- if (type == here->type && keylen == here->len
- && memcmp (key, mapped->data + here->key, keylen) == 0)
+ if (type == here->type
+ && keylen == here->len
+ && here->key + here->len <= datasize
+ && memcmp (key, mapped->data + here->key, keylen) == 0
+ && here->packet + sizeof (struct datahead) <= datasize)
{
/* We found the entry. Increment the appropriate counter. */
const struct datahead *dh
@@ -380,8 +386,7 @@ __nscd_cache_search (request_type type, const char *key, size_t keylen,
/* See whether we must ignore the entry or whether something
is wrong because garbage collection is in progress. */
- if (dh->usable && ((char *) dh + dh->allocsize
- <= (char *) mapped->head + mapped->mapsize))
+ if (dh->usable && here->packet + dh->allocsize <= datasize)
return dh;
}
diff --git a/posix/glob.c b/posix/glob.c
index 630d540..0079a15 100644
--- a/posix/glob.c
+++ b/posix/glob.c
@@ -1287,8 +1287,15 @@ glob_in_dir (const char *pattern, const char *directory, int flags,
for (size_t i = 0; i < cur; ++i)
free (names->name[i]);
names = names->next;
+ /* NB: we will not leak memory here if we exit without
+ freeing the current block assigned to OLD. At least
+ the very first block is always allocated on the stack
+ and this is the block assigned to OLD here. */
if (names == NULL)
- break;
+ {
+ assert (old == &init_names);
+ break;
+ }
cur = names->count;
if (old == names_alloca)
names_alloca = names;
@@ -1306,8 +1313,15 @@ glob_in_dir (const char *pattern, const char *directory, int flags,
new_gl_pathv[pglob->gl_offs + pglob->gl_pathc++]
= names->name[i];
names = names->next;
+ /* NB: we will not leak memory here if we exit without
+ freeing the current block assigned to OLD. At least
+ the very first block is always allocated on the stack
+ and this is the block assigned to OLD here. */
if (names == NULL)
- break;
+ {
+ assert (old == &init_names);
+ break;
+ }
cur = names->count;
if (old == names_alloca)
names_alloca = names;
diff --git a/sysdeps/posix/getaddrinfo.c b/sysdeps/posix/getaddrinfo.c
index dd5a57d..9387e20 100644
--- a/sysdeps/posix/getaddrinfo.c
+++ b/sysdeps/posix/getaddrinfo.c
@@ -1291,8 +1291,8 @@ match_prefix (const struct sockaddr_storage *ss,
for (idx = 0; ; ++idx)
{
unsigned int bits = list[idx].bits;
- uint8_t *mask = list[idx].prefix.s6_addr;
- uint8_t *val = in6->sin6_addr.s6_addr;
+ const uint8_t *mask = list[idx].prefix.s6_addr;
+ const uint8_t *val = in6->sin6_addr.s6_addr;
while (bits >= 8)
{
diff --git a/sysdeps/unix/sysv/linux/sparc/sparc64/pause.c b/sysdeps/unix/sysv/linux/sparc/sparc64/pause.c
index 2ec5bd3..e399e7c 100644
--- a/sysdeps/unix/sysv/linux/sparc/sparc64/pause.c
+++ b/sysdeps/unix/sysv/linux/sparc/sparc64/pause.c
@@ -1 +1,9 @@
+#include <errno.h>
+#include <signal.h>
+#include <unistd.h>
+#include <sysdep-cancel.h>
+
+#define __sigprocmask(how, set, oset) \
+ INLINE_SYSCALL (rt_sigprocmask, 4, how, set, oset, _NSIG / 8)
+
#include <sysdeps/posix/pause.c>