rpms/glibc/FC-5 glibc-aio-misc-notify.patch, NONE, 1.1 glibc-bz2775.patch, NONE, 1.1 glibc-bz2821.patch, NONE, 1.1 glibc-bz3123.patch, NONE, 1.1 glibc-bz3124.patch, NONE, 1.1 glibc-bz3155.patch, NONE, 1.1 glibc-rh184086.patch, NONE, 1.1 glibc-rh197790.patch, NONE, 1.1 glibc-rh202991.patch, NONE, 1.1 glibc-rh203915.patch, NONE, 1.1 glibc-rh205113.patch, NONE, 1.1 glibc-nscd-addinitgroups.patch, 1.1, 1.2 glibc.spec, 1.236, 1.237 glibc-rh198762.patch, 1.1, NONE

fedora-cvs-commits at redhat.com fedora-cvs-commits at redhat.com
Tue Sep 12 14:27:57 UTC 2006


Author: jakub

Update of /cvs/dist/rpms/glibc/FC-5
In directory cvs.devel.redhat.com:/tmp/cvs-serv26095

Modified Files:
	glibc-nscd-addinitgroups.patch glibc.spec 
Added Files:
	glibc-aio-misc-notify.patch glibc-bz2775.patch 
	glibc-bz2821.patch glibc-bz3123.patch glibc-bz3124.patch 
	glibc-bz3155.patch glibc-rh184086.patch glibc-rh197790.patch 
	glibc-rh202991.patch glibc-rh203915.patch glibc-rh205113.patch 
Removed Files:
	glibc-rh198762.patch 
Log Message:
2.4-11

glibc-aio-misc-notify.patch:
 aio_misc.h |    2 +-
 1 files changed, 1 insertion(+), 1 deletion(-)

--- NEW FILE glibc-aio-misc-notify.patch ---
2006-09-05  Jakub Jelinek  <jakub at redhat.com>
            Ulrich Drepper  <drepper at redhat.com>

	* sysdeps/pthread/aio_misc.h (AIO_MISC_NOTIFY): Don't decrement
	counterp if it is already zero.

--- libc/nptl/sysdeps/pthread/aio_misc.h	8 Jan 2006 01:51:18 -0000	1.2
+++ libc/nptl/sysdeps/pthread/aio_misc.h	5 Sep 2006 15:22:18 -0000	1.3
@@ -29,7 +29,7 @@
 
 #define AIO_MISC_NOTIFY(waitlist) \
   do {									      \
-    if (--*waitlist->counterp == 0)					      \
+    if (*waitlist->counterp > 0 && --*waitlist->counterp == 0)		      \
       lll_futex_wake (waitlist->counterp, 1);				      \
   } while (0)
 

glibc-bz2775.patch:
 arena.c  |    2 +-
 malloc.c |    3 ++-
 2 files changed, 3 insertions(+), 2 deletions(-)

--- NEW FILE glibc-bz2775.patch ---
2006-09-07  Jakub Jelinek  <jakub at redhat.com>

	[BZ #2775]
	* malloc/malloc.c (sYSMALLOc): Only call grow_heap if
	(long) (MINSIZE + nb - old_size) is positive.

	* malloc/arena.c (grow_heap): When growing bail even if new_size
	is negative.

--- libc/malloc/arena.c	22 Aug 2006 06:39:51 -0000	1.23
+++ libc/malloc/arena.c	7 Sep 2006 16:04:22 -0000	1.24
@@ -712,7 +712,7 @@ grow_heap(h, diff) heap_info *h; long di
   if(diff >= 0) {
     diff = (diff + page_mask) & ~page_mask;
     new_size = (long)h->size + diff;
-    if(new_size > HEAP_MAX_SIZE)
+    if((unsigned long) new_size > (unsigned long) HEAP_MAX_SIZE)
       return -1;
     if(mprotect((char *)h + h->size, diff, PROT_READ|PROT_WRITE) != 0)
       return -2;
--- libc/malloc/malloc.c	28 Aug 2006 00:57:31 -0000	1.167
+++ libc/malloc/malloc.c	7 Sep 2006 16:06:02 -0000	1.168
@@ -2970,7 +2970,8 @@ static Void_t* sYSMALLOc(nb, av) INTERNA
     /* First try to extend the current heap. */
     old_heap = heap_for_ptr(old_top);
     old_heap_size = old_heap->size;
-    if (grow_heap(old_heap, MINSIZE + nb - old_size) == 0) {
+    if ((long) (MINSIZE + nb - old_size) > 0
+	&& grow_heap(old_heap, MINSIZE + nb - old_size) == 0) {
       av->system_mem += old_heap->size - old_heap_size;
       arena_mem += old_heap->size - old_heap_size;
 #if 0

glibc-bz2821.patch:
 Makefile      |    2 +-
 bug-mktime1.c |   17 +++++++++++++++++
 mktime.c      |    7 ++++---
 3 files changed, 22 insertions(+), 4 deletions(-)

--- NEW FILE glibc-bz2821.patch ---
2006-09-09  Ulrich Drepper  <drepper at redhat.com>

	[BZ #2821]
	* time/mktime.c (guess_time_tm): Fix overflow detection.
	* time/Makefile (tests): Add bug-mktime1.
	* time/bug-mktime1.c: New file.

--- libc/time/Makefile	14 Oct 2005 15:16:17 -0000	1.109
+++ libc/time/Makefile	9 Sep 2006 16:54:49 -0000	1.110
@@ -35,7 +35,7 @@ distribute := datemsk
 
 tests	:= test_time clocktest tst-posixtz tst-strptime tst_wcsftime \
 	   tst-getdate tst-mktime tst-mktime2 tst-ftime_l tst-strftime \
-	   tst-mktime3 tst-strptime2 bug-asctime bug-asctime_r
+	   tst-mktime3 tst-strptime2 bug-asctime bug-asctime_r bug-mktime1
 
 include ../Rules
 
--- libc/time/bug-mktime1.c	1 Jan 1970 00:00:00 -0000
+++ libc/time/bug-mktime1.c	9 Sep 2006 16:54:23 -0000	1.1
@@ -0,0 +1,17 @@
+#include <stdio.h>
+#include <time.h>
+
+
+static int
+do_test (void)
+{
+  struct tm t2 = { 0, 0, 0, 1, 1, 2050 - 1900, 1, 1, 1 };
+  time_t tt2 = mktime (&t2);
+  printf ("%ld\n", (long int) tt2);
+  if (sizeof (time_t) == 4 && tt2 != -1)
+    return 1;
+  return 0;
+}
+
+#define TEST_FUNCTION do_test ()
+#include "../test-skeleton.c"
--- libc/time/mktime.c	8 Sep 2005 08:09:07 -0000	1.66
+++ libc/time/mktime.c	9 Sep 2006 16:56:18 -0000	1.67
@@ -216,10 +216,11 @@ guess_time_tm (long int year, long int y
   /* Overflow occurred one way or another.  Return the nearest result
      that is actually in range, except don't report a zero difference
      if the actual difference is nonzero, as that would cause a false
-     match.  */
+     match; and don't oscillate between two values, as that would
+     confuse the spring-forward gap detector.  */
   return (*t < TIME_T_MIDPOINT
-	  ? TIME_T_MIN + (*t == TIME_T_MIN)
-	  : TIME_T_MAX - (*t == TIME_T_MAX));
+	  ? (*t <= TIME_T_MIN + 1 ? *t + 1 : TIME_T_MIN)
+	  : (TIME_T_MAX - 1 <= *t ? *t - 1 : TIME_T_MAX));
 }
 
 /* Use CONVERT to convert *T to a broken down time in *TP.

glibc-bz3123.patch:
 Makefile                                                   |    2 
 sysdeps/pthread/pthread_cond_wait.c                        |   12 
 sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S |   16 +
 sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S      |   16 +
 sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S         |    8 
 tst-cond22.c                                               |  160 +++++++++++++
 6 files changed, 203 insertions(+), 11 deletions(-)

--- NEW FILE glibc-bz3123.patch ---
2006-09-12  Ulrich Drepper  <drepper at redhat.com>

	* tst-cond22.c (tf): Slight changes to the pthread_cond_wait use
	to guarantee the thread is always canceled.

2006-09-08  Jakub Jelinek  <jakub at redhat.com>

	* tst-cond22.c: Include pthread.h instead of pthreadP.h.
	Include stdlib.h.
	* sysdeps/pthread/pthread_cond_wait.c (__condvar_cleanup): Only
	increase FUTEX if increasing WAKEUP_SEQ.  Fix comment typo.
	* sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Likewise.
	* sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
	* sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Likewise.

2006-09-08  Ulrich Drepper  <drepper at redhat.com>

	[BZ #3123]
	* sysdeps/pthread/pthread_cond_wait.c (__condvar_cleanup): Don't
	increment WAKEUP_SEQ if this would increase the value beyond TOTAL_SEQ.
	* sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Likewise.
	* sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
	* sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Likewise.
	* Makefile (tests): Add tst-cond22.
	* tst-cond22.c: New file.

--- libc/nptl/Makefile	21 Aug 2006 21:02:10 -0000	1.186
+++ libc/nptl/Makefile	8 Sep 2006 10:40:49 -0000	1.188
@@ -207,7 +207,7 @@ tests = tst-typesizes \
 	tst-cond1 tst-cond2 tst-cond3 tst-cond4 tst-cond5 tst-cond6 tst-cond7 \
 	tst-cond8 tst-cond9 tst-cond10 tst-cond11 tst-cond12 tst-cond13 \
 	tst-cond14 tst-cond15 tst-cond16 tst-cond17 tst-cond18 tst-cond19 \
-	tst-cond20 tst-cond21 \
+	tst-cond20 tst-cond21 tst-cond22 \
 	tst-robust1 tst-robust2 tst-robust3 tst-robust4 tst-robust5 \
 	tst-robust6 tst-robust7 tst-robust8 \
 	tst-robustpi1 tst-robustpi2 tst-robustpi3 tst-robustpi4 \
--- libc/nptl/tst-cond22.c	1 Jan 1970 00:00:00 -0000
+++ libc/nptl/tst-cond22.c	12 Sep 2006 12:24:28 -0000	1.5
@@ -0,0 +1,160 @@
+#include <pthread.h>
+#include <stdio.h>
+#include <stdlib.h>
+
+
+static pthread_barrier_t b;
+static pthread_cond_t c = PTHREAD_COND_INITIALIZER;
+static pthread_mutex_t m = PTHREAD_MUTEX_INITIALIZER;
+
+
+static void
+cl (void *arg)
+{
+  pthread_mutex_unlock (&m);
+}
+
+
+static void *
+tf (void *arg)
+{
+  if (pthread_mutex_lock (&m) != 0)
+    {
+      printf ("%s: mutex_lock failed\n", __func__);
+      exit (1);
+    }
+  int e = pthread_barrier_wait (&b);
+  if (e != 0 && e != PTHREAD_BARRIER_SERIAL_THREAD)
+    {
+      printf ("%s: barrier_wait failed\n", __func__);
+      exit (1);
+    }
+  pthread_cleanup_push (cl, NULL);
+  /* We have to loop here because the cancellation might come after
+     the cond_wait call left the cancelable area and is then waiting
+     on the mutex.  In this case the beginning of the second cond_wait
+     call will cause the cancellation to happen.  */
+  do
+    if (pthread_cond_wait (&c, &m) != 0)
+      {
+	printf ("%s: cond_wait failed\n", __func__);
+	exit (1);
+      }
+  while (arg == NULL);
+  pthread_cleanup_pop (0);
+  if (pthread_mutex_unlock (&m) != 0)
+    {
+      printf ("%s: mutex_unlock failed\n", __func__);
+      exit (1);
+    }
+  return NULL;
+}
+
+
+static int
+do_test (void)
+{
+  int status = 0;
+
+  if (pthread_barrier_init (&b, NULL, 2) != 0)
+    {
+      puts ("barrier_init failed");
+      return 1;
+    }
+
+  pthread_t th;
+  if (pthread_create (&th, NULL, tf, NULL) != 0)
+    {
+      puts ("1st create failed");
+      return 1;
+    }
+  int e = pthread_barrier_wait (&b);
+  if (e != 0 && e != PTHREAD_BARRIER_SERIAL_THREAD)
+    {
+      puts ("1st barrier_wait failed");
+      return 1;
+    }
+  if (pthread_mutex_lock (&m) != 0)
+    {
+      puts ("1st mutex_lock failed");
+      return 1;
+    }
+  if (pthread_cond_signal (&c) != 0)
+    {
+      puts ("1st cond_signal failed");
+      return 1;
+    }
+  if (pthread_cancel (th) != 0)
+    {
+      puts ("cancel failed");
+      return 1;
+    }
+  if (pthread_mutex_unlock (&m) != 0)
+    {
+      puts ("1st mutex_unlock failed");
+      return 1;
+    }
+  void *res;
+  if (pthread_join (th, &res) != 0)
+    {
+      puts ("1st join failed");
+      return 1;
+    }
+  if (res != PTHREAD_CANCELED)
+    {
+      puts ("first thread not canceled");
+      status = 1;
+    }
+
+  printf ("cond = { %d, %x, %lld, %lld, %lld, %p, %u, %u }\n",
+  	  c.__data.__lock, c.__data.__futex, c.__data.__total_seq,
+	  c.__data.__wakeup_seq, c.__data.__woken_seq, c.__data.__mutex,
+	  c.__data.__nwaiters, c.__data.__broadcast_seq);
+
+  if (pthread_create (&th, NULL, tf, (void *) 1l) != 0)
+    {
+      puts ("2nd create failed");
+      return 1;
+    }
+  e = pthread_barrier_wait (&b);
+  if (e != 0 && e != PTHREAD_BARRIER_SERIAL_THREAD)
+    {
+      puts ("2nd barrier_wait failed");
+      return 1;
+    }
+  if (pthread_mutex_lock (&m) != 0)
+    {
+      puts ("2nd mutex_lock failed");
+      return 1;
+    }
+  if (pthread_cond_signal (&c) != 0)
+    {
+      puts ("2nd cond_signal failed");
+      return 1;
+    }
+  if (pthread_mutex_unlock (&m) != 0)
+    {
+      puts ("2nd mutex_unlock failed");
+      return 1;
+    }
+  if (pthread_join (th, &res) != 0)
+    {
+      puts ("2nd join failed");
+      return 1;
+    }
+  if (res != NULL)
+    {
+      puts ("2nd thread canceled");
+      status = 1;
+    }
+
+  printf ("cond = { %d, %x, %lld, %lld, %lld, %p, %u, %u }\n",
+  	  c.__data.__lock, c.__data.__futex, c.__data.__total_seq,
+	  c.__data.__wakeup_seq, c.__data.__woken_seq, c.__data.__mutex,
+	  c.__data.__nwaiters, c.__data.__broadcast_seq);
+
+  return status;
+}
+
+#define TEST_FUNCTION do_test ()
+#include "../test-skeleton.c"
--- libc/nptl/sysdeps/pthread/pthread_cond_wait.c	2 Sep 2004 18:49:34 -0000	1.16
+++ libc/nptl/sysdeps/pthread/pthread_cond_wait.c	9 Sep 2006 11:21:23 -0000	1.18
@@ -50,10 +50,16 @@ __condvar_cleanup (void *arg)
   if (cbuffer->bc_seq == cbuffer->cond->__data.__broadcast_seq)
     {
       /* This thread is not waiting anymore.  Adjust the sequence counters
-	 appropriately.  */
-      ++cbuffer->cond->__data.__wakeup_seq;
+	 appropriately.  We do not increment WAKEUP_SEQ if this would
+	 bump it over the value of TOTAL_SEQ.  This can happen if a thread
+	 was woken and then canceled.  */
+      if (cbuffer->cond->__data.__wakeup_seq
+	  < cbuffer->cond->__data.__total_seq)
+	{
+	  ++cbuffer->cond->__data.__wakeup_seq;
+	  ++cbuffer->cond->__data.__futex;
+	}
       ++cbuffer->cond->__data.__woken_seq;
-      ++cbuffer->cond->__data.__futex;
     }
 
   cbuffer->cond->__data.__nwaiters -= 1 << COND_CLOCK_BITS;
--- libc/nptl/sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S	2 Sep 2004 18:53:10 -0000	1.37
+++ libc/nptl/sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S	9 Sep 2006 11:21:23 -0000	1.39
@@ -406,12 +406,22 @@ __condvar_tw_cleanup:
 	cmpl	20(%esp), %eax
 	jne	3f
 
-	addl	$1, wakeup_seq(%ebx)
-	adcl	$0, wakeup_seq+4(%ebx)
+	/* We increment the wakeup_seq counter only if it is lower than
+	   total_seq.  If this is not the case the thread was woken and
+	   then canceled.  In this case we ignore the signal.  */
+	movl	total_seq(%ebx), %eax
+	movl	total_seq+4(%ebx), %edi
+	cmpl	wakeup_seq+4(%ebx), %edi
+	jb	6f
+	ja	7f
+	cmpl	wakeup_seq(%ebx), %eax
+	jbe	7f
 
+6:	addl	$1, wakeup_seq(%ebx)
+	adcl	$0, wakeup_seq+4(%ebx)
 	addl	$1, cond_futex(%ebx)
 
-	addl	$1, woken_seq(%ebx)
+7:	addl	$1, woken_seq(%ebx)
 	adcl	$0, woken_seq+4(%ebx)
 
 3:	subl	$(1 << clock_bits), cond_nwaiters(%ebx)
--- libc/nptl/sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S	2 Sep 2004 18:52:38 -0000	1.32
+++ libc/nptl/sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S	9 Sep 2006 11:21:23 -0000	1.34
@@ -297,12 +297,22 @@ __condvar_w_cleanup:
 	cmpl	12(%esp), %eax
 	jne	3f
 
-	addl	$1, wakeup_seq(%ebx)
-	adcl	$0, wakeup_seq+4(%ebx)
+	/* We increment the wakeup_seq counter only if it is lower than
+	   total_seq.  If this is not the case the thread was woken and
+	   then canceled.  In this case we ignore the signal.  */
+	movl	total_seq(%ebx), %eax
+	movl	total_seq+4(%ebx), %edi
+	cmpl	wakeup_seq+4(%ebx), %edi
+	jb	6f
+	ja	7f
+	cmpl	wakeup_seq(%ebx), %eax
+	jbe	7f
 
+6:	addl	$1, wakeup_seq(%ebx)
+	adcl	$0, wakeup_seq+4(%ebx)
 	addl	$1, cond_futex(%ebx)
 
-	addl	$1, woken_seq(%ebx)
+7:	addl	$1, woken_seq(%ebx)
 	adcl	$0, woken_seq+4(%ebx)
 
 3:	subl	$(1 << clock_bits), cond_nwaiters(%ebx)
--- libc/nptl/sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S	31 Mar 2005 10:00:15 -0000	1.22
+++ libc/nptl/sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S	9 Sep 2006 11:21:23 -0000	1.24
@@ -67,9 +67,15 @@ __condvar_cleanup:
 	cmpl	4(%r8), %edx
 	jne	3f
 
+	/* We increment the wakeup_seq counter only if it is lower than
+	   total_seq.  If this is not the case the thread was woken and
+	   then canceled.  In this case we ignore the signal.  */
+	movq	total_seq(%rdi), %rax
+	cmpq	wakeup_seq(%rdi), %rax
+	jbe	6f
 	incq	wakeup_seq(%rdi)
-	incq	woken_seq(%rdi)
 	incl	cond_futex(%rdi)
+6:	incq	woken_seq(%rdi)
 
 3:	subl	$(1 << clock_bits), cond_nwaiters(%rdi)
 

glibc-bz3124.patch:
 Makefile                       |    2 
 descr.h                        |    4 
 pthread_create.c               |   13 +++
 sysdeps/pthread/createthread.c |    1 
 tst-cancel25.c                 |  171 +++++++++++++++++++++++++++++++++++++++++
 5 files changed, 190 insertions(+), 1 deletion(-)

--- NEW FILE glibc-bz3124.patch ---
2006-09-05  Ulrich Drepper  <drepper at redhat.com>

	[BZ #3124]
	* descr.h (struct pthread): Add parent_cancelhandling.
	* sysdeps/pthread/createthread.c (create_thread): Pass parent
	cancelhandling value to child.
	* pthread_create.c (start_thread): If parent thread was canceled
	reset the SIGCANCEL mask.
	* Makefile (tests): Add tst-cancel25.
	* tst-cancel25.c: New file.

--- libc/nptl/Makefile	21 Aug 2006 21:02:10 -0000	1.186
+++ libc/nptl/Makefile	8 Sep 2006 10:40:49 -0000	1.188
@@ -235,7 +235,7 @@ tests = tst-typesizes \
 	tst-cancel6 tst-cancel7 tst-cancel8 tst-cancel9 tst-cancel10 \
 	tst-cancel11 tst-cancel12 tst-cancel13 tst-cancel14 tst-cancel15 \
 	tst-cancel16 tst-cancel17 tst-cancel18 tst-cancel19 tst-cancel20 \
-	tst-cancel21 tst-cancel22 tst-cancel23 tst-cancel24 \
+	tst-cancel21 tst-cancel22 tst-cancel23 tst-cancel24 tst-cancel25 \
 	tst-cleanup0 tst-cleanup1 tst-cleanup2 tst-cleanup3 tst-cleanup4 \
 	tst-flock1 tst-flock2 \
 	tst-signal1 tst-signal2 tst-signal3 tst-signal4 tst-signal5 \
--- libc/nptl/descr.h	14 Aug 2006 22:58:59 -0000	1.36
+++ libc/nptl/descr.h	5 Sep 2006 17:14:03 -0000	1.37
@@ -296,6 +296,10 @@ struct pthread
   /* True if thread must stop at startup time.  */
   bool stopped_start;
 
+  /* The parent's cancel handling at the time of the pthread_create
+     call.  This might be needed to undo the effects of a cancellation.  */
+  int parent_cancelhandling;
+
   /* Lock to synchronize access to the descriptor.  */
   lll_lock_t lock;
 
--- libc/nptl/pthread_create.c	14 Aug 2006 23:06:09 -0000	1.53
+++ libc/nptl/pthread_create.c	5 Sep 2006 17:12:15 -0000	1.54
@@ -251,6 +251,19 @@ start_thread (void *arg)
     }
 #endif
 
+  /* If the parent was running cancellation handlers while creating
+     the thread the new thread inherited the signal mask.  Reset the
+     cancellation signal mask.  */
+  if (__builtin_expect (pd->parent_cancelhandling & CANCELING_BITMASK, 0))
+    {
+      INTERNAL_SYSCALL_DECL (err);
+      sigset_t mask;
+      __sigemptyset (&mask);
+      __sigaddset (&mask, SIGCANCEL);
+      (void) INTERNAL_SYSCALL (rt_sigprocmask, err, 4, SIG_UNBLOCK, &mask,
+			       NULL, _NSIG / 8);
+    }
+
   /* This is where the try/finally block should be created.  For
      compilers without that support we do use setjmp.  */
   struct pthread_unwind_buf unwind_buf;
--- libc/nptl/tst-cancel25.c	1 Jan 1970 00:00:00 -0000
+++ libc/nptl/tst-cancel25.c	5 Sep 2006 17:11:13 -0000	1.1
@@ -0,0 +1,171 @@
+#include <pthreadP.h>
+#include <signal.h>
+#include <stdio.h>
+#include <stdlib.h>
+
+
+static pthread_barrier_t b;
+static pthread_t th2;
+
+
+static void *
+tf2 (void *arg)
+{
+  sigset_t mask;
+  if (pthread_sigmask (SIG_SETMASK, NULL, &mask) != 0)
+    {
+      puts ("pthread_sigmask failed");
+      exit (1);
+    }
+  if (sigismember (&mask, SIGCANCEL))
+    {
+      puts ("SIGCANCEL blocked in new thread");
+      exit (1);
+    }
+
+  /* Sync with the main thread so that we do not test anything else.  */
+  int e = pthread_barrier_wait (&b);
+  if (e != 0  && e != PTHREAD_BARRIER_SERIAL_THREAD)
+    {
+      puts ("barrier_wait failed");
+      exit (1);
+    }
+
+  while (1)
+    {
+      /* Just a cancelable call.  */
+      struct timespec ts = { 10000, 0 };
+      nanosleep (&ts, 0);
+    }
+
+  return NULL;
+}
+
+
+static void
+unwhand (void *arg)
+{
+  if (pthread_create (&th2, NULL, tf2, NULL) != 0)
+    {
+      puts ("unwhand: create failed");
+      exit (1);
+    }
+}
+
+
+static void *
+tf (void *arg)
+{
+  pthread_cleanup_push (unwhand, NULL);
+
+  /* Sync with the main thread so that we do not test anything else.  */
+  int e = pthread_barrier_wait (&b);
+  if (e != 0  && e != PTHREAD_BARRIER_SERIAL_THREAD)
+    {
+      puts ("barrier_wait failed");
+      exit (1);
+    }
+
+  while (1)
+    {
+      /* Just a cancelable call.  */
+      struct timespec ts = { 10000, 0 };
+      nanosleep (&ts, 0);
+    }
+
+  pthread_cleanup_pop (0);
+
+  return NULL;
+}
+
+
+static int
+do_test (void)
+{
+  if (pthread_barrier_init (&b, NULL, 2) != 0)
+    {
+      puts ("barrier_init failed");
+      return 1;
+    }
+
+  pthread_t th1;
+  if (pthread_create (&th1, NULL, tf, NULL) != 0)
+    {
+      puts ("create failed");
+      return 1;
+    }
+
+  int e = pthread_barrier_wait (&b);
+  if (e != 0  && e != PTHREAD_BARRIER_SERIAL_THREAD)
+    {
+      puts ("barrier_wait failed");
+      return 1;
+    }
+
+  /* Make sure tf1 enters nanosleep.  */
+  struct timespec ts = { 0, 500000000 };
+  while (nanosleep (&ts, &ts) != 0)
+    ;
+
+  if (pthread_cancel (th1) != 0)
+    {
+      puts ("1st cancel failed");
+      return 1;
+    }
+
+  void *res;
+  if (pthread_join (th1, &res) != 0)
+    {
+      puts ("1st join failed");
+      return 1;
+    }
+  if (res != PTHREAD_CANCELED)
+    {
+      puts ("1st thread not canceled");
+      return 1;
+    }
+
+  e = pthread_barrier_wait (&b);
+  if (e != 0  && e != PTHREAD_BARRIER_SERIAL_THREAD)
+    {
+      puts ("barrier_wait failed");
+      return 1;
+    }
+
+  /* Make sure tf2 enters nanosleep.  */
+  ts.tv_sec = 0;
+  ts.tv_nsec = 500000000;
+  while (nanosleep (&ts, &ts) != 0)
+    ;
+
+  puts ("calling pthread_cancel the second time");
+  if (pthread_cancel (th2) != 0)
+    {
+      puts ("2nd cancel failed");
+      return 1;
+    }
+
+  puts ("calling pthread_join the second time");
+  if (pthread_join (th2, &res) != 0)
+    {
+      puts ("2nd join failed");
+      return 1;
+    }
+  if (res != PTHREAD_CANCELED)
+    {
+      puts ("2nd thread not canceled");
+      return 1;
+    }
+
+  if (pthread_barrier_destroy (&b) != 0)
+    {
+      puts ("barrier_destroy failed");
+      return 0;
+    }
+
+  return 0;
+}
+
+#define TEST_FUNCTION do_test ()
+#define TIMEOUT 4
+#include "../test-skeleton.c"
--- libc/nptl/sysdeps/pthread/createthread.c	20 Nov 2004 07:12:45 -0000	1.27
+++ libc/nptl/sysdeps/pthread/createthread.c	5 Sep 2006 17:13:14 -0000	1.28
@@ -242,6 +242,7 @@ create_thread (struct pthread *pd, const
 		       || (attr->flags & ATTR_FLAG_NOTINHERITSCHED) != 0))
     stopped = true;
   pd->stopped_start = stopped;
+  pd->parent_cancelhandling = THREAD_GETMEM (THREAD_SELF, cancelhandling);
 
   /* Actually create the thread.  */
   int res = do_clone (pd, attr, clone_flags, start_thread,

glibc-bz3155.patch:
 s_lrint.S |    8 +++++---
 1 files changed, 5 insertions(+), 3 deletions(-)

--- NEW FILE glibc-bz3155.patch ---
2006-09-07  Jakub Jelinek  <jakub at redhat.com>

	[BZ #3155]
	* sysdeps/powerpc/powerpc32/fpu/s_lrint.S (__lrint): Don't access
	stack below r1.

--- libc/sysdeps/powerpc/powerpc32/fpu/s_lrint.S	28 Jan 2006 00:07:39 -0000	1.2
+++ libc/sysdeps/powerpc/powerpc32/fpu/s_lrint.S	7 Sep 2006 13:46:45 -0000	1.3
@@ -21,13 +21,15 @@
 #include <math_ldbl_opt.h>
 
 /* long int[r3] __lrint (double x[fp1])  */
-ENTRY (__lrint)	
+ENTRY (__lrint)
+	stwu	r1,-16(r1)
 	fctiw	fp13,fp1
-	stfd	fp13,-8(r1)
+	stfd	fp13,8(r1)
 	nop	/* Insure the following load is in a different dispatch group */
 	nop	/* to avoid pipe stall on POWER4&5.  */
 	nop
-	lwz	r3,-4(r1)	
+	lwz	r3,12(r1)
+	addi	r1,r1,16
 	blr
 	END (__lrint)
 

glibc-rh184086.patch:
 kaio_misc.c |   11 +++++++----
 1 files changed, 7 insertions(+), 4 deletions(-)

--- NEW FILE glibc-rh184086.patch ---
2006-07-19  Jakub Jelinek  <jakub at redhat.com>

	* sysdeps/unix/sysv/linux/kaio_misc.c: Include atomic.h.
	(kernel_callback): Ensure __return_value is updated before
	__error_code is set.

--- libc/rtkaio/sysdeps/unix/sysv/linux/kaio_misc.c.jj	2006-08-29 05:07:55.000000000 -0400
+++ libc/rtkaio/sysdeps/unix/sysv/linux/kaio_misc.c	2006-08-30 10:48:45.000000000 -0400
@@ -27,6 +27,7 @@
 
 #include <aio.h>
 #include <assert.h>
+#include <atomic.h>
 #include <errno.h>
 #include <limits.h>
 #include <pthread.h>
@@ -381,14 +382,16 @@ static void
 kernel_callback (kctx_t ctx, struct kiocb *kiocb, long res, long res2)
 {
   struct requestlist *req = (struct requestlist *)kiocb;
+  long errcode = 0;
 
-  req->aiocbp->aiocb.__error_code = 0;
-  req->aiocbp->aiocb.__return_value = res;
   if (res < 0 && res > -1000)
     {
-      req->aiocbp->aiocb.__error_code = -res;
-      req->aiocbp->aiocb.__return_value = -1;
+      errcode = -res;
+      res = -1;
     }
+  req->aiocbp->aiocb.__return_value = res;
+  atomic_write_barrier ();
+  req->aiocbp->aiocb.__error_code = errcode;
   __aio_notify (req);
   assert (req->running == allocated);
   req->running = done;

glibc-rh197790.patch:
 malloc.c |   29 +++++++++++++++++++++++++----
 1 files changed, 25 insertions(+), 4 deletions(-)

--- NEW FILE glibc-rh197790.patch ---
2006-08-31  Jakub Jelinek  <jakub at redhat.com>

	* malloc/malloc.c (_int_malloc): Use full list insert and not
	shortcut which assumes the list is empty for large requests
	too.

2006-08-26  Ulrich Drepper  <drepper at redhat.com>

	* malloc/malloc.c (_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.

2006-08-19  Ulrich Drepper  <drepper at redhat.com>

	* malloc/malloc.c (_int_malloc): Limit number of unsorted blocks
	to sort in each call.

--- libc/malloc/malloc.c	9 Aug 2006 21:50:30 -0000
+++ libc/malloc/malloc.c	7 Sep 2006 16:06:02 -0000
@@ -4055,6 +4096,8 @@ _int_malloc(mstate av, size_t bytes)
 
   for(;;) {
 
+    int iters = 0;
+    bool any_larger = false;
     while ( (victim = unsorted_chunks(av)->bk) != unsorted_chunks(av)) {
       bck = victim->bk;
       if (__builtin_expect (victim->size <= 2 * SIZE_SZ, 0)
@@ -4150,6 +4193,12 @@ _int_malloc(mstate av, size_t bytes)
       victim->fd = fwd;
       fwd->bk = victim;
       bck->fd = victim;
+
+      if (size >= nb + MINSIZE)
+	any_larger = true;
+#define MAX_ITERS	10000
+      if (++iters >= MAX_ITERS)
+	break;
     }
 
     /*
@@ -4182,8 +4231,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);
@@ -4268,8 +4323,15 @@ _int_malloc(mstate av, size_t bytes)
         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;

glibc-rh202991.patch:
 Makefile         |    3 +
 bug-regex26.c    |   38 +++++++++++++++++++
 regex_internal.c |  106 ++++++++++++++++++++++++++++++++++++++++++++-----------
 3 files changed, 126 insertions(+), 21 deletions(-)

--- NEW FILE glibc-rh202991.patch ---
2006-09-06  Jakub Jelinek  <jakub at redhat.com>

	* posix/regex_internal.c (re_string_reconstruct): Handle
	offset < pstr->valid_raw_len && pstr->offsets_needed case.
	Ensure no bytes read before raw_mbs array.  Pass a saved copy of
	pstr->valid_len - 1 rather than pstr->valid_raw_len - 1 to
	re_string_context_at.
	* posix/Makefile: Add rules to build and run bug-regex26 test.
	* posix/bug-regex26.c: New test.

--- libc/posix/Makefile	2 Aug 2006 16:43:46 -0000	1.192
+++ libc/posix/Makefile	7 Sep 2006 13:50:05 -0000	1.193
@@ -81,7 +81,7 @@ tests		:= tstgetopt testfnm runtests run
 		   bug-regex13 bug-regex14 bug-regex15 bug-regex16 \
 		   bug-regex17 bug-regex18 bug-regex19 bug-regex20 \
 		   bug-regex21 bug-regex22 bug-regex23 bug-regex24 \
-		   bug-regex25 tst-nice tst-nanosleep tst-regex2 \
+		   bug-regex25 bug-regex26 tst-nice tst-nanosleep tst-regex2 \
 		   transbug tst-rxspencer tst-pcre tst-boost \
 		   bug-ga1 tst-vfork1 tst-vfork2 tst-waitid \
 		   tst-getaddrinfo2 bug-glob1 bug-glob2 tst-sysconf \
@@ -189,6 +189,7 @@ bug-regex20-ENV = LOCPATH=$(common-objpf
 bug-regex22-ENV = LOCPATH=$(common-objpfx)localedata
 bug-regex23-ENV = LOCPATH=$(common-objpfx)localedata
 bug-regex25-ENV = LOCPATH=$(common-objpfx)localedata
+bug-regex26-ENV = LOCPATH=$(common-objpfx)localedata
 tst-rxspencer-ARGS = --utf8 rxspencer/tests
 tst-rxspencer-ENV = LOCPATH=$(common-objpfx)localedata
 tst-pcre-ARGS = PCRE.tests
--- libc/posix/bug-regex26.c	1 Jan 1970 00:00:00 -0000
+++ libc/posix/bug-regex26.c	7 Sep 2006 13:49:22 -0000	1.2
@@ -0,0 +1,38 @@
+/* Test re_search with dotless i.
+   Copyright (C) 2006 Free Software Foundation, Inc.
+   This file is part of the GNU C Library.
+   Contributed by Jakub Jelinek <jakub at redhat.com>, 2006.
+
+   The GNU C Library is free software; you can redistribute it and/or
+   modify it under the terms of the GNU Lesser General Public
+   License as published by the Free Software Foundation; either
+   version 2.1 of the License, or (at your option) any later version.
+
+   The GNU C Library is distributed in the hope that it will be useful,
+   but WITHOUT ANY WARRANTY; without even the implied warranty of
+   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+   Lesser General Public License for more details.
+
+   You should have received a copy of the GNU Lesser General Public
+   License along with the GNU C Library; if not, write to the Free
+   Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
+   02111-1307 USA.  */
+
+#include <locale.h>
+#include <regex.h>
+#include <string.h>
+
+int
+main (void)
+{
+  struct re_pattern_buffer r;
+  struct re_registers s;
+  setlocale (LC_ALL, "en_US.UTF-8");
+  memset (&r, 0, sizeof (r));
+  memset (&s, 0, sizeof (s));
+  re_set_syntax (RE_SYNTAX_GREP | RE_HAT_LISTS_NOT_NEWLINE | RE_ICASE);
+  re_compile_pattern ("insert into", 11, &r);
+  re_search (&r, "\xFF\0\x12\xA2\xAA\xC4\xB1,K\x12\xC4\xB1*\xACK",
+	     15, 0, 15, &s);
+  return 0;
+}
--- libc/posix/regex_internal.c	4 Jun 2006 04:57:19 -0000	1.66
+++ libc/posix/regex_internal.c	7 Sep 2006 13:48:12 -0000	1.67
@@ -585,34 +585,98 @@ re_string_reconstruct (re_string_t *pstr
 
   if (BE (offset != 0, 1))
     {
-      /* Are the characters which are already checked remain?  */
-      if (BE (offset < pstr->valid_raw_len, 1)
-#ifdef RE_ENABLE_I18N
-	  /* Handling this would enlarge the code too much.
-	     Accept a slowdown in that case.  */
-	  && pstr->offsets_needed == 0
-#endif
-	 )
+      /* Should the already checked characters be kept?  */
+      if (BE (offset < pstr->valid_raw_len, 1))
 	{
 	  /* Yes, move them to the front of the buffer.  */
-	  pstr->tip_context = re_string_context_at (pstr, offset - 1, eflags);
 #ifdef RE_ENABLE_I18N
-	  if (pstr->mb_cur_max > 1)
-	    memmove (pstr->wcs, pstr->wcs + offset,
-		     (pstr->valid_len - offset) * sizeof (wint_t));
+	  if (BE (pstr->offsets_needed, 0))
+	    {
+	      int low = 0, high = pstr->valid_len, mid;
+	      do
+		{
+		  mid = (high + low) / 2;
+		  if (pstr->offsets[mid] > offset)
+		    high = mid;
+		  else if (pstr->offsets[mid] < offset)
+		    low = mid + 1;
+		  else
+		    break;
+		}
+	      while (low < high);
+	      if (pstr->offsets[mid] < offset)
+		++mid;
+	      pstr->tip_context = re_string_context_at (pstr, mid - 1,
+							eflags);
+	      /* This can be quite complicated, so handle specially
+		 only the common and easy case where the character with
+		 different length representation of lower and upper
+		 case is present at or after offset.  */
+	      if (pstr->valid_len > offset
+		  && mid == offset && pstr->offsets[mid] == offset)
+		{
+		  memmove (pstr->wcs, pstr->wcs + offset,
+			   (pstr->valid_len - offset) * sizeof (wint_t));
+		  memmove (pstr->mbs, pstr->mbs + offset, pstr->valid_len - offset);
+		  pstr->valid_len -= offset;
+		  pstr->valid_raw_len -= offset;
+		  for (low = 0; low < pstr->valid_len; low++)
+		    pstr->offsets[low] = pstr->offsets[low + offset] - offset;
+		}
+	      else
+		{
+		  /* Otherwise, just find out how long the partial multibyte
+		     character at offset is and fill it with WEOF/255.  */
+		  pstr->len = pstr->raw_len - idx + offset;
+		  pstr->stop = pstr->raw_stop - idx + offset;
+		  pstr->offsets_needed = 0;
+		  while (mid > 0 && pstr->offsets[mid - 1] == offset)
+		    --mid;
+		  while (mid < pstr->valid_len)
+		    if (pstr->wcs[mid] != WEOF)
+		      break;
+		    else
+		      ++mid;
+		  if (mid == pstr->valid_len)
+		    pstr->valid_len = 0;
+		  else
+		    {
+		      pstr->valid_len = pstr->offsets[mid] - offset;
+		      if (pstr->valid_len)
+			{
+			  for (low = 0; low < pstr->valid_len; ++low)
+			    pstr->wcs[low] = WEOF;
+			  memset (pstr->mbs, 255, pstr->valid_len);
+			}
+		    }
+		  pstr->valid_raw_len = pstr->valid_len;
+		}
+	    }
+	  else
+#endif
+	    {
+	      pstr->tip_context = re_string_context_at (pstr, offset - 1,
+							eflags);
+#ifdef RE_ENABLE_I18N
+	      if (pstr->mb_cur_max > 1)
+		memmove (pstr->wcs, pstr->wcs + offset,
+			 (pstr->valid_len - offset) * sizeof (wint_t));
 #endif /* RE_ENABLE_I18N */
-	  if (BE (pstr->mbs_allocated, 0))
-	    memmove (pstr->mbs, pstr->mbs + offset,
-		     pstr->valid_len - offset);
-	  pstr->valid_len -= offset;
-	  pstr->valid_raw_len -= offset;
+	      if (BE (pstr->mbs_allocated, 0))
+		memmove (pstr->mbs, pstr->mbs + offset,
+			 pstr->valid_len - offset);
+	      pstr->valid_len -= offset;
+	      pstr->valid_raw_len -= offset;
 #if DEBUG
-	  assert (pstr->valid_len > 0);
+	      assert (pstr->valid_len > 0);
 #endif
+	    }
 	}
       else
 	{
 	  /* No, skip all characters until IDX.  */
+	  int prev_valid_len = pstr->valid_len;
+
 #ifdef RE_ENABLE_I18N
 	  if (BE (pstr->offsets_needed, 0))
 	    {
@@ -636,6 +700,8 @@ re_string_reconstruct (re_string_t *pstr
 		     byte other than 0x80 - 0xbf.  */
 		  raw = pstr->raw_mbs + pstr->raw_mbs_idx;
 		  end = raw + (offset - pstr->mb_cur_max);
+		  if (end < pstr->raw_mbs)
+		    end = pstr->raw_mbs;
 		  p = raw + offset - 1;
 #ifdef _LIBC
 		  /* We know the wchar_t encoding is UCS4, so for the simple
@@ -643,7 +709,7 @@ re_string_reconstruct (re_string_t *pstr
 		  if (isascii (*p) && BE (pstr->trans == NULL, 1))
 		    {
 		      memset (&pstr->cur_state, '\0', sizeof (mbstate_t));
-		      pstr->valid_len = 0;
+		      /* pstr->valid_len = 0; */
 		      wc = (wchar_t) *p;
 		    }
 		  else
@@ -686,7 +752,7 @@ re_string_reconstruct (re_string_t *pstr
 		pstr->valid_len = re_string_skip_chars (pstr, idx, &wc) - idx;
 	      if (wc == WEOF)
 		pstr->tip_context
-		  = re_string_context_at (pstr, pstr->valid_raw_len - 1, eflags);
+		  = re_string_context_at (pstr, prev_valid_len - 1, eflags);
 	      else
 		pstr->tip_context = ((BE (pstr->word_ops_used != 0, 0)
 				      && IS_WIDE_WORD_CHAR (wc))

glibc-rh203915.patch:
 malloc.c     |    6 ++++++
 tst-malloc.c |   12 +++++++++++-
 2 files changed, 17 insertions(+), 1 deletion(-)

--- NEW FILE glibc-rh203915.patch ---
2006-08-24  Jakub Jelinek  <jakub at redhat.com>

	* malloc/malloc.c (sYSMALLOc): Avoid infinite loop if MMAP
	keeps failing and heap growth or new heap creation isn't
	successful either.
	* malloc/tst-malloc.c (main): Add new tests.

--- libc/malloc/malloc.c	9 Aug 2006 21:50:30 -0000	1.159
+++ libc/malloc/malloc.c	7 Sep 2006 16:06:02 -0000	1.168
@@ -2851,6 +2862,7 @@ static Void_t* sYSMALLOc(nb, av) INTERNA
   unsigned long   sum;            /* for updating stats */
 
   size_t          pagemask  = mp_.pagesize - 1;
+  bool            tried_mmap = false;
 
 
 #if HAVE_MMAP
@@ -2867,12 +2879,14 @@ static Void_t* sYSMALLOc(nb, av) INTERNA
 
     char* mm;             /* return value from mmap call*/
 
+  try_mmap:
     /*
       Round up size to nearest page.  For mmapped chunks, the overhead
       is one SIZE_SZ unit larger than for normal chunks, because there
       is no following chunk whose prev_size field could be used.
     */
     size = (nb + SIZE_SZ + MALLOC_ALIGN_MASK + pagemask) & ~pagemask;
+    tried_mmap = true;
 
     /* Don't try if size wraps around 0 */
     if ((unsigned long)(size) > (unsigned long)(nb)) {
@@ -2996,6 +3011,9 @@ static Void_t* sYSMALLOc(nb, av) INTERNA
 	set_foot(old_top, (old_size + 2*SIZE_SZ));
       }
     }
+    else if (!tried_mmap)
+      /* We can at least try to use to mmap memory.  */
+      goto try_mmap;
 
   } else { /* av == main_arena */
 
--- libc/malloc/tst-malloc.c	6 Jul 2001 04:55:35 -0000	1.2
+++ libc/malloc/tst-malloc.c	24 Aug 2006 17:30:10 -0000	1.3
@@ -33,7 +33,7 @@ merror (const char *msg)
 int
 main (void)
 {
-  void *p;
+  void *p, *q;
   int save;
 
   errno = 0;
@@ -64,5 +64,15 @@ main (void)
   if (p != NULL)
     merror ("realloc (p, 0) failed.");
 
+  p = malloc (513 * 1024);
+  if (p == NULL)
+    merror ("malloc (513K) failed.");
+
+  q = malloc (-512 * 1024);
+  if (q != NULL)
+    merror ("malloc (-512K) succeeded.");
+
+  free (p);
+
   return errors != 0;
 }

glibc-rh205113.patch:
 res_init.c    |    5 +----
 res_mkquery.c |   12 ++++--------
 2 files changed, 5 insertions(+), 12 deletions(-)

--- NEW FILE glibc-rh205113.patch ---
2006-09-04  Jakub Jelinek  <jakub at redhat.com>

	* resolv/res_mkquery.c (res_nmkquery): Set hp->id to statp->id after
	randomization rather than before.
	* resolv/res_init.c (res_randomid): Don't call gettimeofday here.

--- libc/resolv/res_init.c	1 Nov 2005 00:05:17 -0000	1.43
+++ libc/resolv/res_init.c	4 Sep 2006 17:59:54 -0000	1.44
@@ -537,10 +537,7 @@ net_mask(in)		/* XXX - should really use
 
 u_int
 res_randomid(void) {
-	struct timeval now;
-
-	__gettimeofday(&now, NULL);
-	return (0xffff & (now.tv_sec ^ now.tv_usec ^ __getpid()));
+	return 0xffff & __getpid();
 }
 #ifdef _LIBC
 libc_hidden_def (__res_randomid)
--- libc/resolv/res_mkquery.c	6 May 2006 18:04:12 -0000	1.16
+++ libc/resolv/res_mkquery.c	4 Sep 2006 17:57:02 -0000	1.17
@@ -124,24 +124,20 @@ res_nmkquery(res_state statp,
 	   incremented by one after the initial randomization which
 	   still predictable if the application does multiple
 	   requests.  */
-#if 0
-	hp->id = htons(++statp->id);
-#else
-	hp->id = htons(statp->id);
 	int randombits;
 	do
 	  {
-# ifdef RANDOM_BITS
+#ifdef RANDOM_BITS
 	    RANDOM_BITS (randombits);
-# else
+#else
 	    struct timeval tv;
 	    __gettimeofday (&tv, NULL);
 	    randombits = (tv.tv_sec << 8) ^ tv.tv_usec;
-# endif
+#endif
 	  }
 	while ((randombits & 0xffff) == 0);
 	statp->id = (statp->id + randombits) & 0xffff;
-#endif
+	hp->id = statp->id;
 	hp->opcode = op;
 	hp->rd = (statp->options & RES_RECURSE) != 0;
 	hp->rcode = NOERROR;

glibc-nscd-addinitgroups.patch:
 initgrcache.c |    5 ++++-
 1 files changed, 4 insertions(+), 1 deletion(-)

Index: glibc-nscd-addinitgroups.patch
===================================================================
RCS file: /cvs/dist/rpms/glibc/FC-5/glibc-nscd-addinitgroups.patch,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -r1.1 -r1.2
--- glibc-nscd-addinitgroups.patch	4 Sep 2006 07:30:41 -0000	1.1
+++ glibc-nscd-addinitgroups.patch	12 Sep 2006 14:27:54 -0000	1.2
@@ -1,18 +1,24 @@
+2006-09-05  Jakub Jelinek  <jakub at redhat.com>
+
+        * nscd/initgrcache.c (addinitgroupsX): Move any_success
+        decl before first goto out.
+
 2006-08-01  Ulrich Drepper  <drepper at redhat.com>
 
+	[BZ #2098]
 	* nscd/initgrcache.c (addinitgroupsX): Judge successful lookups by
 	status of NSS calls, not the number of returned entries.
 
 --- libc/nscd/initgrcache.c	6 Jan 2006 19:12:48 -0000	1.8
-+++ libc/nscd/initgrcache.c	2 Aug 2006 00:07:31 -0000	1.9
-@@ -117,6 +117,7 @@ addinitgroupsX (struct database_dyn *db,
-     goto out;
++++ libc/nscd/initgrcache.c	5 Sep 2006 14:35:00 -0000	1.10
+@@ -107,6 +107,7 @@ addinitgroupsX (struct database_dyn *db,
  
-   /* Nothing added yet.  */
+   long int start = 0;
+   bool all_tryagain = true;
 +  bool any_success = false;
-   while (! no_more)
-     {
-       long int prev_start = start;
+ 
+   /* This is temporary memory, we need not (ad must not) call
+      mempool_alloc.  */
 @@ -158,6 +159,8 @@ addinitgroupsX (struct database_dyn *db,
        if (NSS_STATUS_TRYAGAIN > status || status > NSS_STATUS_RETURN)
  	__libc_fatal ("illegal status in internal_getgrouplist");


Index: glibc.spec
===================================================================
RCS file: /cvs/dist/rpms/glibc/FC-5/glibc.spec,v
retrieving revision 1.236
retrieving revision 1.237
diff -u -r1.236 -r1.237
--- glibc.spec	4 Sep 2006 07:30:41 -0000	1.236
+++ glibc.spec	12 Sep 2006 14:27:54 -0000	1.237
@@ -3,7 +3,7 @@
 %define glibcsrcdir glibc-20060519T1550
 %define glibc_release_tarballs 0
 %define glibcversion 2.4
-%define glibcrelease 10
+%define glibcrelease 11
 %define auxarches i586 i686 athlon sparcv9 alphaev6
 %define prelinkarches noarch
 %define xenarches i686 athlon
@@ -54,12 +54,22 @@
 Patch21: glibc-rh193873.patch
 Patch22: glibc-rh194321.patch
 Patch23: glibc-rh197932.patch
-Patch24: glibc-rh198762.patch
+Patch24: glibc-rh184086.patch
 Patch25: glibc-rh201748.patch
 Patch26: glibc-rh201826.patch
 Patch27: glibc-rh203728.patch
 Patch28: glibc-rtld-nonexistent-dir-cache.patch
 Patch29: glibc-nscd-SIGHUP.patch
+Patch30: glibc-aio-misc-notify.patch
+Patch31: glibc-bz2775.patch
+Patch32: glibc-bz2821.patch
+Patch33: glibc-bz3123.patch
+Patch34: glibc-bz3124.patch
+Patch35: glibc-bz3155.patch
+Patch36: glibc-rh197790.patch
+Patch37: glibc-rh202991.patch
+Patch38: glibc-rh203915.patch
+Patch39: glibc-rh205113.patch
 Buildroot: %{_tmppath}/glibc-%{PACKAGE_VERSION}-root
 Obsoletes: zoneinfo, libc-static, libc-devel, libc-profile, libc-headers,
 Obsoletes: gencat, locale, ldconfig, locale-ja, glibc-profile
@@ -299,6 +309,16 @@
 %patch27 -p1
 %patch28 -p1
 %patch29 -p1
+%patch30 -p1
+%patch31 -p1
+%patch32 -p1
+%patch33 -p1
+%patch34 -p1
+%patch35 -p1
+%patch36 -p1
+%patch37 -p1
+%patch38 -p1
+%patch39 -p1
 
 # Hack till glibc-kernheaders get updated, argh
 mkdir -p override_headers/linux
@@ -1463,6 +1483,21 @@
 %endif
 
 %changelog
+* Tue Sep 13 2006 Jakub Jelinek <jakub at redhat.com> 2.4-11
+- fix pthread_cond_{,timed}wait cancellation (BZ#3123)
+- fix lrint on ppc32 (BZ#3155)
+- fix malloc allocating more than half of address space (BZ#2775)
+- fix mktime on 32-bit arches a few years after 2038 (BZ#2821)
+- fix pthread_create called from cancellation handlers (BZ#3124)
+- fix regex case insensitive searches with characters where upper
+  and lower case multibyte representations have different length
+  (e.g. I and dotless i, #202991)
+- randomize resolver query ids before use instead after use (#205113)
+- avoid malloc infinite looping for allocations larger than
+  the system can allocate (#203915)
+- in malloc limit number of unsorted block sort iterations (#197790)
+- fix aio_suspend
+
 * Mon Sep  4 2006 Jakub Jelinek <jakub at redhat.com> 2.4-10
 - NIS+ fixes and updates (#190803)
 - fix regcomp and regexec with multibyte locales other than UTF-8 (#193873)


--- glibc-rh198762.patch DELETED ---




More information about the fedora-cvs-commits mailing list