+2006-08-28 Jakub Jelinek <jakub@redhat.com>
+
+ * inet/getnameinfo.c (getnameinfo): For AF_INET, check errno
+ only if herrno is NETDB_INTERNAL. Handle errors other than
+ ERANGE outside of the loops, handle TRY_AGAIN.
+
+ * locale/programs/ld-ctype.c (translit_flatten): Issue error
+ if other's ctype category was missing.
+ * locale/programs/ld-collate.c (collate_read): Return if
+ copy_locale's collate category is missing.
+
+2006-08-27 Ulrich Drepper <drepper@redhat.com>
+
+ [BZ #2684]
+ * malloc/malloc.c (public_rEALLOc): Try harder by using other
+ arenas if allocation failed.
+ Patch mostly by Jan Edler <jan.edler@indexengines.com>.
+
+2006-08-26 Ulrich Drepper <drepper@redhat.com>
+
+ * malloc/malloc.c (bin_at): Rewrite to be more clear and to not
+ waste bins[0..1].
+ (malloc_state): Reduce bins size by 2.
+ (_int_malloc): Fix test for large enough buffer for early termination.
+ When no unsorted block matches perfectly and an exiting block has
+ to be split, use full list insert and not shortcut which assumes
+ the list is empty.
+
+ * locale/programs/ld-ctype.c (ctype_read): Better patch for read
+ failure.
+
2006-08-24 Ulrich Drepper <drepper@redhat.com>
* locale/programs/ld-ctype.c (ctype_read): If CTYPE is NULL, don't
glibc-base := HEAD
DIST_BRANCH := devel
COLLECTION := dist-fc4
-fedora-sync-date := 2006-08-25 06:39 UTC
-fedora-sync-tag := fedora-glibc-20060825T0639
+fedora-sync-date := 2006-08-28 19:03 UTC
+fedora-sync-tag := fedora-glibc-20060828T1903
-%define glibcrelease 24
+%define glibcrelease 26
%define auxarches i586 i686 athlon sparcv9 alphaev6
%define xenarches i686 athlon
%ifarch %{xenarches}
%endif
%changelog
-* Fri Aug 25 2006 Jakub Jelinek <jakub@redhat.com> 2.4.90-24
+* Mon Aug 28 2006 Jakub Jelinek <jakub@redhat.com> 2.4.90-26
+- real fix for the doubly linked list corruption problem
+- try harder in realloc to allocate memory (BZ#2684)
+- fix getnameinfo error reporting (#204122)
+- make localedef more robust on invalid input (#203728)
+
+* Fri Aug 25 2006 Jakub Jelinek <jakub@redhat.com> 2.4.90-25
- temporarily back out code to limit number of unsorted block
sort iterations (#203735, #204027)
- handle PLT symbols in dladdr properly (BZ#2683)
if (!(flags & NI_NUMERICHOST))
{
struct hostent *h = NULL;
+ if (sa->sa_family == AF_INET6)
+ {
+ while (__gethostbyaddr_r ((const void *) &(((const struct sockaddr_in6 *) sa)->sin6_addr),
+ sizeof(struct in6_addr),
+ AF_INET6, &th, tmpbuf, tmpbuflen,
+ &h, &herrno))
+ if (herrno == NETDB_INTERNAL && errno == ERANGE)
+ tmpbuf = extend_alloca (tmpbuf, tmpbuflen, 2 * tmpbuflen);
+ else
+ break;
+ }
+ else
+ {
+ while (__gethostbyaddr_r ((const void *) &(((const struct sockaddr_in *)sa)->sin_addr),
+ sizeof(struct in_addr), AF_INET,
+ &th, tmpbuf, tmpbuflen,
+ &h, &herrno))
+ if (herrno == NETDB_INTERNAL && errno == ERANGE)
+ tmpbuf = extend_alloca (tmpbuf, tmpbuflen, 2 * tmpbuflen);
+ else
+ break;
+ }
+
if (h == NULL)
{
- if (sa->sa_family == AF_INET6)
+ if (herrno == NETDB_INTERNAL)
{
- while (__gethostbyaddr_r ((const void *) &(((const struct sockaddr_in6 *) sa)->sin6_addr),
- sizeof(struct in6_addr),
- AF_INET6, &th, tmpbuf, tmpbuflen,
- &h, &herrno))
- {
- if (herrno == NETDB_INTERNAL)
- {
- if (errno == ERANGE)
- tmpbuf = extend_alloca (tmpbuf, tmpbuflen,
- 2 * tmpbuflen);
- else
- {
- __set_h_errno (herrno);
- __set_errno (serrno);
- return EAI_SYSTEM;
- }
- }
- else
- {
- break;
- }
- }
+ __set_h_errno (herrno);
+ return EAI_SYSTEM;
}
- else
+ if (herrno == TRY_AGAIN)
{
- while (__gethostbyaddr_r ((const void *) &(((const struct sockaddr_in *)sa)->sin_addr),
- sizeof(struct in_addr), AF_INET,
- &th, tmpbuf, tmpbuflen,
- &h, &herrno))
- {
- if (errno == ERANGE)
- tmpbuf = extend_alloca (tmpbuf, tmpbuflen,
- 2 * tmpbuflen);
- else
- {
- break;
- }
- }
+ __set_h_errno (herrno);
+ return EAI_AGAIN;
}
}
(const void *) &(((const struct sockaddr_in *) sa)->sin_addr),
host, hostlen);
if (c == NULL)
- {
- __set_errno (serrno);
- return EAI_SYSTEM;
- }
+ return EAI_SYSTEM;
}
ok = 1;
}
-/* Copyright (C) 1995-2002, 2003, 2005 Free Software Foundation, Inc.
+/* Copyright (C) 1995-2002, 2003, 2005, 2006 Free Software Foundation, Inc.
This file is part of the GNU C Library.
Contributed by Ulrich Drepper <drepper@gnu.org>, 1995.
if (locfile_read (copy_locale, charmap) != 0)
goto skip_category;
}
+
+ if (copy_locale->categories[LC_COLLATE].collate == NULL)
+ return;
}
lr_ignore_rest (ldfile, 1);
if (locfile_read (copy_locale, charmap) != 0)
goto skip_category;
}
+
+ if (copy_locale->categories[LC_CTYPE].ctype == NULL)
+ return;
}
lr_ignore_rest (ldfile, 1);
/* Prepare the data structures. */
ctype_startup (ldfile, result, charmap, copy_locale, ignore_content);
ctype = result->categories[LC_CTYPE].ctype;
- if (ctype == NULL)
- return;
/* Remember the repertoire we use. */
if (!ignore_content)
other = find_locale (LC_CTYPE, copy_locale, copy_repertoire, charmap);
- if (other == NULL)
+ if (other == NULL || other->categories[LC_CTYPE].ctype == NULL)
{
WITH_CUR_LOCALE (error (0, 0, _("\
%s: transliteration data from locale `%s' not available"),
typedef struct malloc_chunk* mbinptr;
/* addressing -- note that bin_at(0) does not exist */
-#define bin_at(m, i) ((mbinptr)((char*)&((m)->bins[(i)<<1]) - (SIZE_SZ<<1)))
+#define bin_at(m, i) \
+ (mbinptr) (((char *) &((m)->bins[((i) - 1) * 2])) \
+ - offsetof (struct malloc_chunk, fd))
/* analog of ++bin */
#define next_bin(b) ((mbinptr)((char*)(b) + (sizeof(mchunkptr)<<1)))
mchunkptr last_remainder;
/* Normal bins packed as described above */
- mchunkptr bins[NBINS * 2];
+ mchunkptr bins[NBINS * 2 - 2];
/* Bitmap of bins */
unsigned int binmap[BINMAPSIZE];
(void)mutex_unlock(&ar_ptr->mutex);
assert(!newp || chunk_is_mmapped(mem2chunk(newp)) ||
ar_ptr == arena_for_chunk(mem2chunk(newp)));
+
+ if (newp == NULL)
+ {
+ /* Try harder to allocate memory in other arenas. */
+ newp = public_mALLOc(bytes);
+ if (newp != NULL)
+ {
+ MALLOC_COPY (newp, oldmem, oldsize - 2 * SIZE_SZ);
+#if THREAD_STATS
+ if(!mutex_trylock(&ar_ptr->mutex))
+ ++(ar_ptr->stat_lock_direct);
+ else {
+ (void)mutex_lock(&ar_ptr->mutex);
+ ++(ar_ptr->stat_lock_wait);
+ }
+#else
+ (void)mutex_lock(&ar_ptr->mutex);
+#endif
+ _int_free(ar_ptr, oldmem);
+ (void)mutex_unlock(&ar_ptr->mutex);
+ }
+ }
+
return newp;
}
#ifdef libc_hidden_def
*/
for(;;) {
-#if 0
+
int iters = 0;
bool any_larger = false;
-#endif
while ( (victim = unsorted_chunks(av)->bk) != unsorted_chunks(av)) {
bck = victim->bk;
if (__builtin_expect (victim->size <= 2 * SIZE_SZ, 0)
fwd->bk = victim;
bck->fd = victim;
-#if 0
- if (size >= nb)
+ if (size >= nb + MINSIZE)
any_larger = true;
#define MAX_ITERS 10000
if (++iters >= MAX_ITERS)
break;
-#endif
}
/*
else {
remainder = chunk_at_offset(victim, nb);
- unsorted_chunks(av)->bk = unsorted_chunks(av)->fd = remainder;
- remainder->bk = remainder->fd = unsorted_chunks(av);
+ /* We cannot assume the unsorted list is empty and therefore
+ have to perform a complete insert here. */
+ bck = unsorted_chunks(av);
+ fwd = bck->fd;
+ remainder->bk = bck;
+ remainder->fd = fwd;
+ bck->fd = remainder;
+ fwd->bk = remainder;
+
/* advertise as last remainder */
if (in_smallbin_range(nb))
av->last_remainder = remainder;
+2006-08-25 Jakub Jelinek <jakub@redhat.com>
+
+ * sysdeps/unix/sysv/linux/libc_pthread_init.c (freeres_libpthread):
+ Only define ifdef SHARED.
+
2006-08-23 Ulrich Drepper <drepper@redhat.com>
* allocatestack.c (queue_stack): Move freeing of surplus stacks to...
#endif
}
-
+#ifdef SHARED
libc_freeres_fn (freeres_libptread)
{
if (__libc_pthread_functions.ptr_freeres != NULL)
__libc_pthread_functions.ptr_freeres ();
}
+#endif