From: Jakub Jelinek Date: Mon, 2 Oct 2006 19:02:41 +0000 (+0000) Subject: Updated to fedora-glibc-20061002T1858 X-Git-Tag: cvs/fedora-2_5-base X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=16d1b47b4f3f9ae13535ea7a2c02bd207c069d5c;p=thirdparty%2Fglibc.git Updated to fedora-glibc-20061002T1858 --- diff --git a/ChangeLog b/ChangeLog index e7e5d7dc2d6..7c213e12cd9 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,5 +1,51 @@ +2006-10-02 Jakub Jelinek + + [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 + + * elf/rtld.c (dl_main): Don't use prelinking if LD_DYNAMIC_WEAK is + used. + +2006-10-02 Jakub Jelinek + + * 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 + + * 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 + + * posix/glob.c (glob_in_dir): Add some comments and asserts to + explain why there are no leaks. + 2006-09-29 Ulrich Drepper + * libio/wmemstream.c: Include . + * 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 2b9495d0f9d..97b3a61e064 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 5e22a270b5d..02ef86c5941 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 718fa13b71c..7746377f371 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 67c94d15371..5c112f20906 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 b7ef376ca21..37cda6065d3 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 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 2.5-1 - glibc 2.5 release diff --git a/io/fts.c b/io/fts.c index 6383fe8f179..532743fb3e0 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 2190593c933..22d67f71e93 100644 --- a/libio/bug-wmemstream1.c +++ b/libio/bug-wmemstream1.c @@ -1,5 +1,6 @@ #include #include +#include static int diff --git a/libio/tst-wmemstream1.c b/libio/tst-wmemstream1.c index 0c59c1adcba..f8b308bc6cc 100644 --- a/libio/tst-wmemstream1.c +++ b/libio/tst-wmemstream1.c @@ -1,3 +1,5 @@ +#include + #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 f51a1db20c0..e2442ebfac7 100644 --- a/libio/tst-wmemstream2.c +++ b/libio/tst-wmemstream2.c @@ -1,3 +1,5 @@ +#include + #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 85ea64991a8..577931888de 100644 --- a/libio/wmemstream.c +++ b/libio/wmemstream.c @@ -20,6 +20,7 @@ #include "strfile.h" #include #include +#include struct _IO_FILE_wmemstream diff --git a/localedata/ChangeLog b/localedata/ChangeLog index aea3f35551d..78414d58e75 100644 --- a/localedata/ChangeLog +++ b/localedata/ChangeLog @@ -1,3 +1,7 @@ +2006-10-01 Ulrich Drepper + + * locales/en_GB: Use more complete en_US data in LC_NAME. + 2006-09-29 Ulrich Drepper [BZ #39] diff --git a/localedata/locales/en_GB b/localedata/locales/en_GB index fdd2f49511f..a42fb6a8d90 100644 --- a/localedata/locales/en_GB +++ b/localedata/locales/en_GB @@ -146,8 +146,7 @@ measurement 1 END LC_MEASUREMENT LC_NAME -name_fmt "/ -" +copy "en_US" END LC_NAME LC_ADDRESS diff --git a/manual/message.texi b/manual/message.texi index eab98e93389..1507a6d04af 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 a41c0bdb074..5206c5af38b 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 , 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 440697f1bec..0fd2d9f547e 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 1dfe746d7a2..7c459815866 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 630d54063ae..0079a15a929 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 dd5a57d9e0b..9387e20db24 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 2ec5bd39adf..e399e7c7eb1 100644 --- a/sysdeps/unix/sysv/linux/sparc/sparc64/pause.c +++ b/sysdeps/unix/sysv/linux/sparc/sparc64/pause.c @@ -1 +1,9 @@ +#include +#include +#include +#include + +#define __sigprocmask(how, set, oset) \ + INLINE_SYSCALL (rt_sigprocmask, 4, how, set, oset, _NSIG / 8) + #include