]> git.ipfire.org Git - thirdparty/glibc.git/commitdiff
Updated to fedora-glibc-20060831T1812 cvs/fedora-glibc-2_4_90-28
authorJakub Jelinek <jakub@redhat.com>
Thu, 31 Aug 2006 18:54:54 +0000 (18:54 +0000)
committerJakub Jelinek <jakub@redhat.com>
Thu, 31 Aug 2006 18:54:54 +0000 (18:54 +0000)
ChangeLog
dlfcn/Makefile
elf/tst-addr1.c
fedora/branch.mk
fedora/glibc.spec.in
malloc/malloc.c
nptl/ChangeLog
nptl/pthread_rwlock_trywrlock.c
nptl/sysdeps/pthread/pthread_rwlock_timedwrlock.c
nptl/sysdeps/pthread/pthread_rwlock_wrlock.c

index a75ac8b23b17ec77aee6ef59710ebb3630dc8207..54dc010a072881b9ccd4ff7002ee23322c3be43a 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,14 @@
+2006-08-31  Jakub Jelinek  <jakub@redhat.com>
+
+       * dlfcn/Makefile (LDLIBS-bug-atexit3-lib.so): Add
+       ld.so.
+
+       * malloc/malloc.c (_int_malloc): Use full list insert and not
+       shortcut which assumes the list is empty for large requests
+       too.
+
+       * elf/tst-addr1.c (do_test): Allow i.dli_sname "_IO_printf".
+
 2006-08-30  Jakub Jelinek  <jakub@redhat.com>
 
        * sysdeps/unix/sysv/linux/alpha/bits/fcntl.h (splice): Add offin
index ffdb70ea6833b138c8e398f6ac27334c1ea69aa6..63e7b31b2a9b147cb31b08d16c6ef1c18523e6ed 100644 (file)
@@ -136,7 +136,8 @@ $(objpfx)bug-atexit2.out: $(objpfx)bug-atexit2-lib.so
 $(objpfx)bug-atexit2-lib.so: $(common-objpfx)libc.so \
                             $(common-objpfx)libc_nonshared.a
 
-LDLIBS-bug-atexit3-lib.so = -lstdc++ -lgcc_eh $(common-objpfx)libc_nonshared.a
+LDLIBS-bug-atexit3-lib.so = -lstdc++ -lgcc_eh $(common-objpfx)elf/ld.so \
+                           $(common-objpfx)libc_nonshared.a
 $(objpfx)bug-atexit3: $(libdl)
 $(objpfx)bug-atexit3.out: $(objpfx)bug-atexit3-lib.so
 $(objpfx)bug-atexit3-lib.so: $(common-objpfx)libc.so \
index 3a2cbb668f4e3e4d3cece15594e614770f8eb332..637906e2060e976a4011f5d45edb756904cd93da 100644 (file)
@@ -12,7 +12,14 @@ do_test (void)
       return 1;
     }
   printf ("found symbol %s in %s\n", i.dli_sname, i.dli_fname);
-  return i.dli_sname == NULL || strcmp (i.dli_sname, "printf") != 0;
+  return i.dli_sname == NULL
+        || (strcmp (i.dli_sname, "printf") != 0
+            /* On architectures which create PIC code by default
+               &printf may resolve to an address in libc.so
+               rather than in the binary.  printf and _IO_printf
+               are aliased and which one comes first in the
+               hash table is up to the linker.  */
+            && strcmp (i.dli_sname, "_IO_printf") != 0);
 }
 
 #define TEST_FUNCTION do_test ()
index 32a0feccd124bcdbad25e2aaf6aaeb519c7b281b..42e132217e756b5834d2c326f05e8f1bbfd7758c 100644 (file)
@@ -3,5 +3,5 @@ glibc-branch := fedora
 glibc-base := HEAD
 DIST_BRANCH := devel
 COLLECTION := dist-fc4
-fedora-sync-date := 2006-08-31 06:40 UTC
-fedora-sync-tag := fedora-glibc-20060831T0640
+fedora-sync-date := 2006-08-31 18:12 UTC
+fedora-sync-tag := fedora-glibc-20060831T1812
index 519c50d449ebb6bc01cf88ee220210f9a05b6ca2..820e98a3035f2d81f2d7adb3ba0cdf65d854656f 100644 (file)
@@ -1,4 +1,4 @@
-%define glibcrelease 27
+%define glibcrelease 28
 %define auxarches i586 i686 athlon sparcv9 alphaev6
 %define xenarches i686 athlon
 %ifarch %{xenarches}
@@ -1448,6 +1448,9 @@ rm -f *.filelist*
 %endif
 
 %changelog
+* Thu Aug 31 2006 Jakub Jelinek <jakub@redhat.com> 2.4.90-28
+- another malloc doubly linked list corruption problem fix (#204653)
+
 * Thu Aug 31 2006 Jakub Jelinek <jakub@redhat.com> 2.4.90-27
 - allow $LIB and $PLATFORM in dlopen parameters even in suid/sgid (#204399)
 - fix splice prototype (#204530)
index d37e5213671079d51e4dd439911cadffb5682863..206f3e1b6a9dac3a9d75ab1cc01793ba6d57c819 100644 (file)
@@ -4230,8 +4230,14 @@ _int_malloc(mstate av, size_t bytes)
         /* Split */
         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;
           set_head(victim, nb | PREV_INUSE |
                   (av != &main_arena ? NON_MAIN_ARENA : 0));
           set_head(remainder, remainder_size | PREV_INUSE);
index 2c9c9e2732a9fcd2e6c3781593f0ea9facdc271e..4e3bf38bfd922a296a95062e2b1ea9291068c22d 100644 (file)
@@ -1,3 +1,13 @@
+2006-08-31  Ulrich Drepper  <drepper@redhat.com>
+
+       * pthread_rwlock_trywrlock.c (__pthread_rwlock_trywrlock): Undo last
+       change because it can disturb too much existing code.  If real hard
+       reader preference is needed we'll introduce another type.
+       * sysdeps/pthread/pthread_rwlock_timedwrlock.c
+       (pthread_rwlock_timedwrlock): Likewise.
+       * sysdeps/pthread/pthread_rwlock_wrlock.c (__pthread_rwlock_wrlock):
+       Likewise.
+
 2006-08-30  Ulrich Drepper  <drepper@redhat.com>
 
        * pthread_rwlock_trywrlock.c (__pthread_rwlock_trywrlock): Respect
index 63760064c5d6f1b13639b3a097dd40b19d6ffdce..b754a1956549c85b69b6fa2d8c80b519be7caa6b 100644 (file)
@@ -1,4 +1,4 @@
-/* Copyright (C) 2002, 2003, 2006 Free Software Foundation, Inc.
+/* Copyright (C) 2002, 2003 Free Software Foundation, Inc.
    This file is part of the GNU C Library.
    Contributed by Ulrich Drepper <drepper@redhat.com>, 2002.
 
@@ -30,10 +30,7 @@ __pthread_rwlock_trywrlock (rwlock)
 
   lll_mutex_lock (rwlock->__data.__lock);
 
-  if (rwlock->__data.__writer == 0 && rwlock->__data.__nr_readers == 0
-      /* Respect the preference.  */
-      && (rwlock->__data.__flags != 0
-         || rwlock->__data.__nr_readers_queued == 0))
+  if (rwlock->__data.__writer == 0 && rwlock->__data.__nr_readers == 0)
     {
       rwlock->__data.__writer = THREAD_GETMEM (THREAD_SELF, tid);
       result = 0;
index ab7bc7babbcaa9427970ee2e670e4cbe3b2114a7..97c0598f96f9866558e493799269559572a8262f 100644 (file)
@@ -1,4 +1,4 @@
-/* Copyright (C) 2003, 2004, 2006 Free Software Foundation, Inc.
+/* Copyright (C) 2003, 2004 Free Software Foundation, Inc.
    This file is part of the GNU C Library.
    Contributed by Martin Schwidefsky <schwidefsky@de.ibm.com>, 2003.
 
@@ -40,9 +40,7 @@ pthread_rwlock_timedwrlock (rwlock, abstime)
       int err;
 
       /* Get the rwlock if there is no writer and no reader.  */
-      if (rwlock->__data.__writer == 0 && rwlock->__data.__nr_readers == 0
-         && (rwlock->__data.__flags != 0
-             || rwlock->__data.__nr_readers_queued == 0))
+      if (rwlock->__data.__writer == 0 && rwlock->__data.__nr_readers == 0)
        {
          /* Mark self as writer.  */
          rwlock->__data.__writer = THREAD_GETMEM (THREAD_SELF, tid);
index 4d967f2496debd5b9e5acc56dddf2855220201e8..822aeed79c77dd525eefb3d5a4d481ae1f6875d4 100644 (file)
@@ -1,4 +1,4 @@
-/* Copyright (C) 2003, 2006 Free Software Foundation, Inc.
+/* Copyright (C) 2003 Free Software Foundation, Inc.
    This file is part of the GNU C Library.
    Contributed by Martin Schwidefsky <schwidefsky@de.ibm.com>, 2003.
 
@@ -37,9 +37,7 @@ __pthread_rwlock_wrlock (rwlock)
   while (1)
     {
       /* Get the rwlock if there is no writer and no reader.  */
-      if (rwlock->__data.__writer == 0 && rwlock->__data.__nr_readers == 0
-         && (rwlock->__data.__flags != 0
-             || rwlock->__data.__nr_readers_queued == 0))
+      if (rwlock->__data.__writer == 0 && rwlock->__data.__nr_readers == 0)
        {
          /* Mark self as writer.  */
          rwlock->__data.__writer = THREAD_GETMEM (THREAD_SELF, tid);