Skip to content

Commit

Permalink
Updated to fedora-glibc-20061002T1858
Browse files Browse the repository at this point in the history
  • Loading branch information
Jakub Jelinek committed Oct 2, 2006
1 parent af47bc4 commit 16d1b47
Show file tree
Hide file tree
Showing 20 changed files with 112 additions and 43 deletions.
46 changes: 46 additions & 0 deletions ChangeLog
Original file line number Diff line number Diff line change
@@ -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.

Expand Down
7 changes: 0 additions & 7 deletions README
Original file line number Diff line number Diff line change
Expand Up @@ -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.

Expand Down
7 changes: 0 additions & 7 deletions README.template
Original file line number Diff line number Diff line change
Expand Up @@ -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.

Expand Down
3 changes: 2 additions & 1 deletion elf/rtld.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
4 changes: 2 additions & 2 deletions fedora/branch.mk
Original file line number Diff line number Diff line change
Expand Up @@ -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
6 changes: 5 additions & 1 deletion fedora/glibc.spec.in
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
%define glibcrelease 1
%define glibcrelease 2
%define auxarches i586 i686 athlon sparcv9 alphaev6
%define xenarches i686 athlon
%ifarch %{xenarches}
Expand Down Expand Up @@ -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

Expand Down
11 changes: 3 additions & 8 deletions io/fts.c
Original file line number Diff line number Diff line change
Expand Up @@ -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. */
Expand Down Expand Up @@ -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;
Expand Down Expand Up @@ -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);
Expand Down
1 change: 1 addition & 0 deletions libio/bug-wmemstream1.c
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
#include <stdio.h>
#include <string.h>
#include <wchar.h>


static int
Expand Down
2 changes: 2 additions & 0 deletions libio/tst-wmemstream1.c
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
#include <wchar.h>

#define CHAR_T wchar_t
#define W(o) L##o
#define OPEN_MEMSTREAM open_wmemstream
Expand Down
2 changes: 2 additions & 0 deletions libio/tst-wmemstream2.c
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
#include <wchar.h>

#define CHAR_T wchar_t
#define W(o) L##o
#define OPEN_MEMSTREAM open_wmemstream
Expand Down
1 change: 1 addition & 0 deletions libio/wmemstream.c
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@
#include "strfile.h"
#include <stdio.h>
#include <stdlib.h>
#include <wchar.h>


struct _IO_FILE_wmemstream
Expand Down
4 changes: 4 additions & 0 deletions localedata/ChangeLog
Original file line number Diff line number Diff line change
@@ -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]
Expand Down
3 changes: 1 addition & 2 deletions localedata/locales/en_GB
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
4 changes: 2 additions & 2 deletions manual/message.texi
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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.
Expand Down
6 changes: 3 additions & 3 deletions nscd/mem.c
Original file line number Diff line number Diff line change
@@ -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.
Expand Down Expand Up @@ -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)
{
Expand Down
1 change: 1 addition & 0 deletions nscd/nscd-client.h
Original file line number Diff line number Diff line change
Expand Up @@ -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)

Expand Down
17 changes: 11 additions & 6 deletions nscd/nscd_helper.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;

Expand Down Expand Up @@ -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);

Expand All @@ -365,23 +367,26 @@ __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
= (struct datahead *) (mapped->data + here->packet);

/* 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;
}

Expand Down
18 changes: 16 additions & 2 deletions posix/glob.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand All @@ -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;
Expand Down
4 changes: 2 additions & 2 deletions sysdeps/posix/getaddrinfo.c
Original file line number Diff line number Diff line change
Expand Up @@ -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)
{
Expand Down
8 changes: 8 additions & 0 deletions sysdeps/unix/sysv/linux/sparc/sparc64/pause.c
Original file line number Diff line number Diff line change
@@ -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>

0 comments on commit 16d1b47

Please sign in to comment.