+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.
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.
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.
}
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;
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
-%define glibcrelease 1
+%define glibcrelease 2
%define auxarches i586 i686 athlon sparcv9 alphaev6
%define xenarches i686 athlon
%ifarch %{xenarches}
%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
/* 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. */
* structures already allocated.
*/
mem1: saved_errno = errno;
- if (p)
- free(p);
+ free(p);
fts_lfree(head);
(void)__closedir(dirp);
cur->fts_info = FTS_ERR;
* 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);
#include <stdio.h>
#include <string.h>
+#include <wchar.h>
static int
+#include <wchar.h>
+
#define CHAR_T wchar_t
#define W(o) L##o
#define OPEN_MEMSTREAM open_wmemstream
+#include <wchar.h>
+
#define CHAR_T wchar_t
#define W(o) L##o
#define OPEN_MEMSTREAM open_wmemstream
#include "strfile.h"
#include <stdio.h>
#include <stdlib.h>
+#include <wchar.h>
struct _IO_FILE_wmemstream
+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]
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
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
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.
/* 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.
{
/* 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)
{
const char *data;
size_t mapsize;
int counter; /* > 0 indicates it is usable. */
+ size_t datasize;
};
#define NO_MAPPING ((struct mapped_database *) -1l)
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;
/* 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);
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
/* 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;
}
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;
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;
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)
{
+#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>