[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]

rpms/glibc/F-7 glibc-fedora.patch, 1.225, 1.226 glibc.spec, 1.308, 1.309 sources, 1.229, 1.230



Author: jakub

Update of /cvs/pkgs/rpms/glibc/F-7
In directory cvs-int.fedora.redhat.com:/tmp/cvs-serv13084/F-7

Modified Files:
	glibc-fedora.patch glibc.spec sources 
Log Message:
2.6-2


glibc-fedora.patch:

Index: glibc-fedora.patch
===================================================================
RCS file: /cvs/pkgs/rpms/glibc/F-7/glibc-fedora.patch,v
retrieving revision 1.225
retrieving revision 1.226
diff -u -r1.225 -r1.226
--- glibc-fedora.patch	15 May 2007 20:59:30 -0000	1.225
+++ glibc-fedora.patch	21 May 2007 20:22:38 -0000	1.226
@@ -1,6 +1,65 @@
 --- glibc-20070515T2025/ChangeLog	15 May 2007 20:24:57 -0000	1.10641
-+++ glibc-20070515T2025-fedora/ChangeLog	15 May 2007 20:34:27 -0000	1.8782.2.244
-@@ -71,6 +71,13 @@
++++ glibc-20070515T2025-fedora/ChangeLog	21 May 2007 20:00:48 -0000	1.8782.2.245
+@@ -1,3 +1,58 @@
++2007-05-21  Ulrich Drepper  <drepper redhat com>
++
++	* sysdeps/unix/sysv/linux/i386/epoll_pwait.S: New file.
++
++2007-05-21  Jakub Jelinek  <jakub redhat com>
++
++	[BZ #4525]
++	* sysdeps/unix/sysv/linux/Makefile (sysdep_routines): Add epoll_pwait.
++	* sysdeps/unix/sysv/linux/epoll_pwait.c: New file.
++	* sysdeps/unix/sysv/linux/syscalls.list (epoll_pwait): Remove.
++
++	* sysdeps/unix/sysv/linux/x86_64/sys/epoll.h (epoll_pwait): Declare.
++
++	[BZ #4514]
++	* stdio-common/vfprintf.c (vfprintf): Don't shadow workstart variable,
++	reinitialize workend at the start of each do_positional format spec
++	loop, free workstart before do_positional loops.
++	(printf_unknown): Fix size of work_buffer.
++	* stdio-common/tst-sprintf.c (main): Add 3 new testcases.
++
++	* malloc/hooks.c (MALLOC_STATE_VERSION): Bump.
++	(public_sET_STATe): If ms->version < 3, put all chunks into
++	unsorted chunks and clear {fd,bk}_nextsize fields of largebin
++	chunks.
++
++	* malloc/malloc.c [MALLOC_DEBUG]: Revert 2007-05-13 changes.
++	* malloc/hooks.c: Likewise.
++	* malloc/arena.c: Likewise.
++	* malloc/malloc.c (do_check_malloc_state): Don't assert
++	n_mmaps is not greater than n_mmaps_max.  This removes the need
++	for the previous change.
++
++	* malloc/Makefile (CFLAGS-malloc.c): Revert accidental
++	2007-05-07 commit.
++
++2007-05-18  Ulrich Drepper  <drepper redhat com>
++
++	* malloc/malloc.c (do_check_chunk): Correct check for mmaped block
++	not overlapping with arena.
++
++	* malloc/mcheck.c (reallochook): If size==0, free the block.
++
++	* rt/tst-shm.c: Use fstat64 instead of fstat.
++
++	* sysdeps/unix/sysv/linux/i386/sync_file_range.S: Fix case where
++	__NR_sync_file_range is not defined.
++
++2007-05-17  Ulrich Drepper  <drepper redhat com>
++
++	Dummy files to prevent stub versions from being used.
++	* sysdeps/x86_64/fpu/k_cosl.c: New file.
++	* sysdeps/x86_64/fpu/k_rem_pio2l.c: New file.
++	* sysdeps/x86_64/fpu/k_sinl.c: New file.
++	* sysdeps/x86_64/fpu/k_tanl.c: New file.
++
+ 2007-05-14  Ulrich Drepper  <drepper redhat com>
+ 
+ 	* version.h (VERSION): Define to 6.
+@@ -71,6 +126,13 @@
  	* include/sys/cdefs.h: Redefine __nonnull so that test for
  	incorrect parameters in the libc code itself are not omitted.
  
@@ -14,7 +73,7 @@
  2007-05-09  Jakub Jelinek  <jakub redhat com>
  
  	* sysdeps/ia64/fpu/fraiseexcpt.c (feraiseexcept): Don't raise overflow
-@@ -366,6 +373,10 @@
+@@ -366,6 +428,10 @@
  	[BZ #4368]
  	* stdlib/stdlib.h: Remove obsolete part of comment for realpath.
  
@@ -25,7 +84,7 @@
  2007-04-16  Ulrich Drepper  <drepper redhat com>
  
  	[BZ #4364]
-@@ -1623,6 +1634,15 @@
+@@ -1623,6 +1689,15 @@
  	separators also if no non-zero digits found.
  	* stdlib/Makefile (tests): Add tst-strtod3.
  
@@ -973,8 +1032,180 @@
  revision   "0.2"
  date       "2000-08-02"
  %
+--- glibc-20070515T2025/malloc/Makefile	7 May 2007 15:30:57 -0000	1.54
++++ glibc-20070515T2025-fedora/malloc/Makefile	21 May 2007 20:01:05 -0000	1.47.2.8
+@@ -104,7 +104,6 @@ $(objpfx)memusagestat: $(memusagestat-mo
+ include ../Rules
+ 
+ CFLAGS-mcheck-init.c = $(PIC-ccflag)
+-CFLAGS-malloc.c += -DMALLOC_DEBUG
+ 
+ $(objpfx)libmcheck.a: $(objpfx)mcheck-init.o
+ 	-rm -f $@
+--- glibc-20070515T2025/malloc/arena.c	13 May 2007 20:32:57 -0000	1.27
++++ glibc-20070515T2025-fedora/malloc/arena.c	21 May 2007 20:01:06 -0000	1.8.2.20
+@@ -370,9 +370,6 @@ ptmalloc_init_minimal (void)
+   mp_.top_pad        = DEFAULT_TOP_PAD;
+ #endif
+   mp_.n_mmaps_max    = DEFAULT_MMAP_MAX;
+-#if MALLOC_DEBUG
+-  mp_.n_mmaps_cmax   = DEFAULT_MMAP_MAX;
+-#endif
+   mp_.mmap_threshold = DEFAULT_MMAP_THRESHOLD;
+   mp_.trim_threshold = DEFAULT_TRIM_THRESHOLD;
+   mp_.pagesize       = malloc_getpagesize;
+--- glibc-20070515T2025/malloc/hooks.c	13 May 2007 20:32:57 -0000	1.21
++++ glibc-20070515T2025-fedora/malloc/hooks.c	21 May 2007 20:01:06 -0000	1.15.2.7
+@@ -496,7 +496,7 @@ free_starter(mem, caller) Void_t* mem; c
+    then the hooks are reset to 0.  */
+ 
+ #define MALLOC_STATE_MAGIC   0x444c4541l
+-#define MALLOC_STATE_VERSION (0*0x100l + 2l) /* major*0x100 + minor */
++#define MALLOC_STATE_VERSION (0*0x100l + 3l) /* major*0x100 + minor */
+ 
+ struct malloc_save_state {
+   long          magic;
+@@ -507,9 +507,6 @@ struct malloc_save_state {
+   unsigned long trim_threshold;
+   unsigned long top_pad;
+   unsigned int  n_mmaps_max;
+-#if MALLOC_DEBUG
+-  unsigned int  n_mmaps_cmax;
+-#endif
+   unsigned long mmap_threshold;
+   int           check_action;
+   unsigned long max_sbrked_mem;
+@@ -553,9 +550,6 @@ public_gET_STATe(void)
+   ms->trim_threshold = mp_.trim_threshold;
+   ms->top_pad = mp_.top_pad;
+   ms->n_mmaps_max = mp_.n_mmaps_max;
+-#if MALLOC_DEBUG
+-  ms->n_mmaps_cmax = mp_.n_mmaps_cmax;
+-#endif
+   ms->mmap_threshold = mp_.mmap_threshold;
+   ms->check_action = check_action;
+   ms->max_sbrked_mem = main_arena.max_system_mem;
+@@ -601,8 +595,9 @@ public_sET_STATe(Void_t* msptr)
+       assert(ms->av[2*i+3] == 0);
+       first(b) = last(b) = b;
+     } else {
+-      if(i<NSMALLBINS || (largebin_index(chunksize(ms->av[2*i+2]))==i &&
+-			  largebin_index(chunksize(ms->av[2*i+3]))==i)) {
++      if(ms->version >= 3 &&
++	 (i<NSMALLBINS || (largebin_index(chunksize(ms->av[2*i+2]))==i &&
++			   largebin_index(chunksize(ms->av[2*i+3]))==i))) {
+ 	first(b) = ms->av[2*i+2];
+ 	last(b) = ms->av[2*i+3];
+ 	/* Make sure the links to the bins within the heap are correct.  */
+@@ -622,14 +617,22 @@ public_sET_STATe(Void_t* msptr)
+       }
+     }
+   }
++  if (ms->version < 3) {
++    /* Clear fd_nextsize and bk_nextsize fields.  */
++    b = unsorted_chunks(&main_arena)->fd;
++    while (b != unsorted_chunks(&main_arena)) {
++      if (!in_smallbin_range(chunksize(b))) {
++	b->fd_nextsize = NULL;
++	b->bk_nextsize = NULL;
++      }
++      b = b->fd;
++    }
++  }
+   mp_.sbrk_base = ms->sbrk_base;
+   main_arena.system_mem = ms->sbrked_mem_bytes;
+   mp_.trim_threshold = ms->trim_threshold;
+   mp_.top_pad = ms->top_pad;
+   mp_.n_mmaps_max = ms->n_mmaps_max;
+-#if MALLOC_DEBUG
+-  mp_.n_mmaps_cmax = ms->n_mmaps_cmax;
+-#endif
+   mp_.mmap_threshold = ms->mmap_threshold;
+   check_action = ms->check_action;
+   main_arena.max_system_mem = ms->max_sbrked_mem;
+--- glibc-20070515T2025/malloc/malloc.c	15 May 2007 01:51:17 -0000	1.178
++++ glibc-20070515T2025-fedora/malloc/malloc.c	21 May 2007 20:01:08 -0000	1.127.2.37
+@@ -2358,9 +2358,6 @@ struct malloc_par {
+   /* Memory map support */
+   int              n_mmaps;
+   int              n_mmaps_max;
+-#if MALLOC_DEBUG
+-  int              n_mmaps_cmax;
+-#endif
+   int              max_n_mmaps;
+   /* the mmap_threshold is dynamic, until the user sets
+      it manually, at which point we need to disable any
+@@ -2572,7 +2569,7 @@ static void do_check_chunk(av, p) mstate
+ #if HAVE_MMAP
+     /* address is outside main heap  */
+     if (contiguous(av) && av->top != initial_top(av)) {
+-      assert(((char*)p) < min_address || ((char*)p) > max_address);
++      assert(((char*)p) < min_address || ((char*)p) >= max_address);
+     }
+     /* chunk is page-aligned */
+     assert(((p->prev_size + sz) & (mp_.pagesize-1)) == 0);
+@@ -2876,8 +2873,6 @@ static void do_check_malloc_state(mstate
+   assert(total <= (unsigned long)(mp_.max_total_mem));
+   assert(mp_.n_mmaps >= 0);
+ #endif
+-  assert(mp_.n_mmaps <= mp_.n_mmaps_cmax);
+-  assert(mp_.n_mmaps_max <= mp_.n_mmaps_cmax);
+   assert(mp_.n_mmaps <= mp_.max_n_mmaps);
+ 
+   assert((unsigned long)(av->system_mem) <=
+@@ -3475,13 +3470,6 @@ munmap_chunk(p) mchunkptr p;
+     }
+ 
+   mp_.n_mmaps--;
+-#if MALLOC_DEBUG
+-  if (mp_.n_mmaps_cmax > mp_.n_mmaps_max)
+-    {
+-      assert (mp_.n_mmaps_cmax == mp_.n_mmaps + 1);
+-      mp_.n_mmaps_cmax = mp_.n_mmaps;
+-    }
+-#endif
+   mp_.mmapped_mem -= total_size;
+ 
+   int ret __attribute__ ((unused)) = munmap((char *)block, total_size);
+@@ -5397,9 +5385,6 @@ mstate av; size_t n_elements; size_t* si
+   mp_.n_mmaps_max = 0;
+   mem = _int_malloc(av, size);
+   mp_.n_mmaps_max = mmx;   /* reset mmap */
+-#if MALLOC_DEBUG
+-  mp_.n_mmaps_cmax = mmx;
+-#endif
+   if (mem == 0)
+     return 0;
+ 
+@@ -5725,17 +5710,8 @@ int mALLOPt(param_number, value) int par
+       res = 0;
+     else
+ #endif
+-      {
+-#if MALLOC_DEBUG
+-	if (mp_.n_mmaps <= value)
+-	  mp_.n_mmaps_cmax = value;
+-	else
+-	  mp_.n_mmaps_cmax = mp_.n_mmaps;
+-#endif
+-
+-	mp_.n_mmaps_max = value;
+-	mp_.no_dyn_threshold = 1;
+-      }
++      mp_.n_mmaps_max = value;
++      mp_.no_dyn_threshold = 1;
+     break;
+ 
+   case M_CHECK_ACTION:
 --- glibc-20070515T2025/malloc/mcheck.c	8 Sep 2004 20:36:02 -0000	1.18
-+++ glibc-20070515T2025-fedora/malloc/mcheck.c	20 Dec 2005 10:59:21 -0000	1.18.2.1
++++ glibc-20070515T2025-fedora/malloc/mcheck.c	21 May 2007 20:01:08 -0000	1.18.2.2
+@@ -1,5 +1,5 @@
+ /* Standard debugging hooks for `malloc'.
+-   Copyright (C) 1990-1997,99,2000,01,02 Free Software Foundation, Inc.
++   Copyright (C) 1990-1997,1999,2000-2002,2007 Free Software Foundation, Inc.
+    This file is part of the GNU C Library.
+    Written May 1989 by Mike Haertel.
+ 
 @@ -24,9 +24,25 @@
  # include <mcheck.h>
  # include <stdint.h>
@@ -1028,7 +1259,20 @@
    __memalign_hook = memalignhook;
    if (block == NULL)
      return NULL;
-@@ -294,8 +310,8 @@ reallochook (__ptr_t ptr, __malloc_size_
+@@ -264,6 +280,12 @@ memalignhook (__malloc_size_t alignment,
+ static __ptr_t
+ reallochook (__ptr_t ptr, __malloc_size_t size, const __ptr_t caller)
+ {
++  if (size == 0)
++    {
++      freehook (ptr, caller);
++      return NULL;
++    }
++
+   struct hdr *hdr;
+   __malloc_size_t osize;
+ 
+@@ -294,8 +316,8 @@ reallochook (__ptr_t ptr, __malloc_size_
  					      sizeof (struct hdr) + size + 1,
  					      caller);
    else
@@ -1039,7 +1283,7 @@
    __free_hook = freehook;
    __malloc_hook = mallochook;
    __memalign_hook = memalignhook;
-@@ -355,8 +371,8 @@ mcheck (func)
+@@ -355,8 +377,8 @@ mcheck (func)
    if (__malloc_initialized <= 0 && !mcheck_used)
      {
        /* We call malloc() once here to ensure it is initialized.  */
@@ -1127,8 +1371,25 @@
 -#SETENT_BATCH_READ=TRUE
 +SETENT_BATCH_READ=TRUE
 --- glibc-20070515T2025/nptl/ChangeLog	15 May 2007 06:32:02 -0000	1.970
-+++ glibc-20070515T2025-fedora/nptl/ChangeLog	15 May 2007 20:34:29 -0000	1.706.2.124
-@@ -1474,6 +1474,15 @@
++++ glibc-20070515T2025-fedora/nptl/ChangeLog	21 May 2007 20:01:10 -0000	1.706.2.125
+@@ -1,3 +1,16 @@
++2007-05-17  Ulrich Drepper  <drepper redhat com>
++
++	[BZ #4512]
++	* pthread_mutex_lock.c: Preserve FUTEX_WAITERS bit when dead owner
++	is detected.
++	* pthread_mutex_timedlock.c: Likewise.
++	* pthread_mutex_trylock.c: Likewise.
++	Patch in part by Atsushi Nemoto <anemo mba ocn ne jp>.
++
++	* Makefile (tests): Add tst-robust9 and tst-robustpi9.
++	* tst-robust9.c: New file.
++	* tst-robustpi9.c: New file.
++
+ 2007-05-14  Ulrich Drepper  <drepper redhat com>
+ 
+ 	* sysdeps/unix/sysv/linux/x86_64/sem_wait.S: Remove unnecessary
+@@ -1474,6 +1487,15 @@
  	Use __sigfillset.  Document that sigfillset does the right thing wrt
  	to SIGSETXID.
  
@@ -1144,7 +1405,7 @@
  2005-07-11  Jakub Jelinek  <jakub redhat com>
  
  	[BZ #1102]
-@@ -2210,6 +2219,11 @@
+@@ -2210,6 +2232,11 @@
  	Move definition inside libpthread, libc, librt check.  Provide
  	definition for rtld.
  
@@ -1156,7 +1417,7 @@
  2004-09-02  Ulrich Drepper  <drepper redhat com>
  
  	* sysdeps/alpha/jmpbuf-unwind.h: Define __libc_unwind_longjmp.
-@@ -4284,6 +4298,11 @@
+@@ -4284,6 +4311,11 @@
  
  	* Makefile [$(build-shared) = yes] (tests): Depend on $(test-modules).
  
@@ -1169,7 +1430,26 @@
  
  	* tst-cancel17.c (do_test): Check if aio_cancel failed.
 --- glibc-20070515T2025/nptl/Makefile	8 Sep 2006 10:40:49 -0000	1.188
-+++ glibc-20070515T2025-fedora/nptl/Makefile	28 Nov 2006 11:18:18 -0000	1.157.2.29
++++ glibc-20070515T2025-fedora/nptl/Makefile	21 May 2007 20:01:10 -0000	1.157.2.30
+@@ -1,4 +1,4 @@
+-# Copyright (C) 2002,2003,2004,2005,2006 Free Software Foundation, Inc.
++# Copyright (C) 2002,2003,2004,2005,2006,2007 Free Software Foundation, Inc.
+ # This file is part of the GNU C Library.
+ 
+ # The GNU C Library is free software; you can redistribute it and/or
+@@ -209,9 +209,9 @@ tests = tst-typesizes \
+ 	tst-cond14 tst-cond15 tst-cond16 tst-cond17 tst-cond18 tst-cond19 \
+ 	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 \
+-	tst-robustpi5 tst-robustpi6 tst-robustpi7 tst-robustpi8 \
++	tst-robust6 tst-robust7 tst-robust8 tst-robust9 \
++	tst-robustpi1 tst-robustpi2 tst-robustpi3 tst-robustpi4 tst-robustpi5 \
++	tst-robustpi6 tst-robustpi7 tst-robustpi8 tst-robustpi9 \
+ 	tst-rwlock1 tst-rwlock2 tst-rwlock3 tst-rwlock4 tst-rwlock5 \
+ 	tst-rwlock6 tst-rwlock7 tst-rwlock8 tst-rwlock9 tst-rwlock10 \
+ 	tst-rwlock11 tst-rwlock12 tst-rwlock13 tst-rwlock14 \
 @@ -340,7 +340,8 @@ endif
  extra-objs += $(crti-objs) $(crtn-objs)
  omit-deps += crti crtn
@@ -1202,6 +1482,156 @@
  else
  $(addprefix $(objpfx),$(tests) $(test-srcs)): $(objpfx)libpthread.a
  endif
+--- glibc-20070515T2025/nptl/pthread_mutex_lock.c	14 Aug 2006 23:01:26 -0000	1.15
++++ glibc-20070515T2025-fedora/nptl/pthread_mutex_lock.c	21 May 2007 20:01:11 -0000	1.8.2.7
+@@ -1,4 +1,4 @@
+-/* Copyright (C) 2002, 2003, 2004, 2005, 2006 Free Software Foundation, Inc.
++/* Copyright (C) 2002,2003,2004,2005,2006,2007 Free Software Foundation, Inc.
+    This file is part of the GNU C Library.
+    Contributed by Ulrich Drepper <drepper redhat com>, 2002.
+ 
+@@ -127,6 +127,8 @@ __pthread_mutex_lock (mutex)
+ 	      int newval = id;
+ #ifdef NO_INCR
+ 	      newval |= FUTEX_WAITERS;
++#else
++	      newval |= (oldval & FUTEX_WAITERS);
+ #endif
+ 
+ 	      newval
+--- glibc-20070515T2025/nptl/pthread_mutex_timedlock.c	14 Aug 2006 23:01:26 -0000	1.11
++++ glibc-20070515T2025-fedora/nptl/pthread_mutex_timedlock.c	21 May 2007 20:01:11 -0000	1.4.2.7
+@@ -1,4 +1,4 @@
+-/* Copyright (C) 2002, 2003, 2004, 2005, 2006 Free Software Foundation, Inc.
++/* Copyright (C) 2002,2003,2004,2005,2006,2007 Free Software Foundation, Inc.
+    This file is part of the GNU C Library.
+    Contributed by Ulrich Drepper <drepper redhat com>, 2002.
+ 
+@@ -119,9 +119,11 @@ pthread_mutex_timedlock (mutex, abstime)
+ 	  if ((oldval & FUTEX_OWNER_DIED) != 0)
+ 	    {
+ 	      /* The previous owner died.  Try locking the mutex.  */
+-	      int newval
++	      int newval = id | (oldval & FUTEX_WAITERS);
++
++	      newval
+ 		= atomic_compare_and_exchange_val_acq (&mutex->__data.__lock,
+-						       id, oldval);
++						       newval, oldval);
+ 	      if (newval != oldval)
+ 		{
+ 		  oldval = newval;
+--- glibc-20070515T2025/nptl/pthread_mutex_trylock.c	28 Apr 2007 04:23:43 -0000	1.13
++++ glibc-20070515T2025-fedora/nptl/pthread_mutex_trylock.c	21 May 2007 20:01:11 -0000	1.5.2.7
+@@ -84,9 +84,11 @@ __pthread_mutex_trylock (mutex)
+ 	  if ((oldval & FUTEX_OWNER_DIED) != 0)
+ 	    {
+ 	      /* The previous owner died.  Try locking the mutex.  */
+-	      int newval
++	      int newval = id | (oldval & FUTEX_WAITERS);
++
++	      newval
+ 		= atomic_compare_and_exchange_val_acq (&mutex->__data.__lock,
+-						       id, oldval);
++						       newval, oldval);
+ 
+ 	      if (newval != oldval)
+ 		{
+--- glibc-20070515T2025/nptl/tst-robust9.c 1 Jan 1970 00:00:00 -0000
++++ glibc-20070515T2025-fedora/nptl/tst-robust9.c	21 May 2007 20:01:11 -0000	1.1.2.1
+@@ -0,0 +1,87 @@
++#include <stdio.h>
++#include <stdlib.h>
++#include <errno.h>
++#include <pthread.h>
++#include <unistd.h>
++#include <sys/time.h>
++
++
++static pthread_mutex_t m;
++
++static void *
++tf (void *data)
++{
++  int err = pthread_mutex_lock (&m);
++  if (err == EOWNERDEAD)
++    {
++      err = pthread_mutex_consistent_np (&m);
++      if (err)
++	{
++	  puts ("pthread_mutex_consistent_np");
++	  exit (1);
++	}
++    }
++  else if (err)
++    {
++      puts ("pthread_mutex_lock");
++      exit (1);
++    }
++  printf ("thread%ld got the lock.\n", (long int) data);
++  sleep (1);
++  /* exit without unlock */
++  return NULL;
++}
++
++static int
++do_test (void)
++{
++  int err, i;
++  pthread_t t[3];
++  pthread_mutexattr_t ma;
++
++  pthread_mutexattr_init (&ma);
++  err = pthread_mutexattr_setrobust_np (&ma, PTHREAD_MUTEX_ROBUST_NP);
++  if (err)
++    {
++      puts ("pthread_mutexattr_setrobust_np");
++      return 1;
++    }
++#ifdef ENABLE_PI
++  if (pthread_mutexattr_setprotocol (&ma, PTHREAD_PRIO_INHERIT) != 0)
++    {
++      puts ("pthread_mutexattr_setprotocol failed");
++      return 1;
++    }
++#endif
++  err = pthread_mutex_init (&m, &ma);
++  if (err)
++    {
++      puts ("pthread_mutex_init");
++      return 1;
++    }
++
++  for (i = 0; i < sizeof (t) / sizeof (t[0]); i++)
++    {
++      err = pthread_create (&t[i], NULL, tf, (void *) (long int) i);
++      if (err)
++	{
++	  puts ("pthread_create");
++	  return 1;
++	}
++    }
++
++  for (i = 0; i < sizeof (t) / sizeof (t[0]); i++)
++    {
++      err = pthread_join (t[i], NULL);
++      if (err)
++	{
++	  puts ("pthread_join");
++	  return 1;
++	}
++    }
++  return 0;
++}
++
++#define TIMEOUT 5
++#define TEST_FUNCTION do_test ()
++#include "../test-skeleton.c"
+--- glibc-20070515T2025/nptl/tst-robustpi9.c 1 Jan 1970 00:00:00 -0000
++++ glibc-20070515T2025-fedora/nptl/tst-robustpi9.c	21 May 2007 20:01:11 -0000	1.1.2.1
+@@ -0,0 +1,2 @@
++#define ENABLE_PI 1
++#include "tst-robust9.c"
 --- glibc-20070515T2025/nptl/tst-stackguard1.c	26 Jun 2005 17:44:14 -0000	1.1
 +++ glibc-20070515T2025-fedora/nptl/tst-stackguard1.c	8 Aug 2005 21:24:28 -0000	1.1.2.3
 @@ -190,17 +190,21 @@ do_test (void)
@@ -1431,6 +1861,126 @@
 +"POSIX_V6_LPBIG_OFFBIG"
 +#endif
 +"";
+--- glibc-20070515T2025/rt/tst-shm.c	2 Apr 2002 23:51:07 -0000	1.5
++++ glibc-20070515T2025-fedora/rt/tst-shm.c	21 May 2007 20:01:11 -0000	1.5.2.1
+@@ -60,7 +60,7 @@ static void
+ worker (int write_now)
+ {
+   struct timespec ts;
+-  struct stat st;
++  struct stat64 st;
+   int i;
+   int fd = do_open ();
+   char *mem;
+@@ -68,8 +68,10 @@ worker (int write_now)
+   if (fd == -1)
+     exit (fd);
+ 
+-  if (fstat (fd, &st) == -1 || st.st_size != 4000)
++  if (fstat64 (fd, &st) == -1)
+     error (EXIT_FAILURE, 0, "stat failed");
++  if (st.st_size != 4000)
++    error (EXIT_FAILURE, 0, "size incorrect");
+ 
+   mem = mmap (NULL, 4000, PROT_READ | PROT_WRITE, MAP_SHARED, fd, 0);
+   if (mem == NULL)
+@@ -131,7 +133,7 @@ do_test (void)
+   pid_t pid2;
+   int status1;
+   int status2;
+-  struct stat st;
++  struct stat64 st;
+ 
+   /* Create the shared memory object.  */
+   fd = shm_open ("/shm-test", O_RDWR | O_CREAT | O_TRUNC | O_EXCL, 0600);
+@@ -155,11 +157,16 @@ do_test (void)
+       return 0;
+     }
+ 
+-  if (fstat (fd, &st) == -1 || st.st_size != 4000)
++  if (fstat64 (fd, &st) == -1)
+     {
+       shm_unlink ("/shm-test");
+       error (EXIT_FAILURE, 0, "initial stat failed");
+     }
++  if (st.st_size != 4000)
++    {
++      shm_unlink ("/shm-test");
++      error (EXIT_FAILURE, 0, "initial size not correct");
++    }
+ 
+   /* Spawn to processes which will do the work.  */
+   pid1 = fork ();
+--- glibc-20070515T2025/stdio-common/tst-sprintf.c	25 Jun 2003 11:04:49 -0000	1.3
++++ glibc-20070515T2025-fedora/stdio-common/tst-sprintf.c	21 May 2007 20:01:11 -0000	1.3.2.1
+@@ -37,5 +37,26 @@ main (void)
+       free (dst);
+     }
+ 
++  if (sprintf (buf, "%1$d%3$.*2$s%4$d", 7, 67108863, "x", 8) != 3
++      || strcmp (buf, "7x8") != 0)
++    {
++      printf ("sprintf (buf, \"%%1$d%%3$.*2$s%%4$d\", 7, 67108863, \"x\", 8) produced `%s' output", buf);
++      result = 1;
++    }
++
++  if (sprintf (buf, "%67108863.16\"%d", 7) != 14
++      || strcmp (buf, "%67108863.16\"7") != 0)
++    {
++      printf ("sprintf (buf, \"%%67108863.16\\\"%%d\", 7) produced `%s' output", buf);
++      result = 1;
++    }
++
++  if (sprintf (buf, "%*\"%d", 0x3ffffff, 7) != 11
++      || strcmp (buf, "%67108863\"7") != 0)
++    {
++      printf ("sprintf (buf, \"%%*\\\"%%d\", 0x3ffffff, 7) produced `%s' output", buf);
++      result = 1;
++    }
++
+   return result;
+ }
+--- glibc-20070515T2025/stdio-common/vfprintf.c	7 May 2007 03:43:55 -0000	1.139
++++ glibc-20070515T2025-fedora/stdio-common/vfprintf.c	21 May 2007 20:01:11 -0000	1.128.2.9
+@@ -1627,6 +1627,8 @@ do_positional:
+     /* Just a counter.  */
+     size_t cnt;
+ 
++    free (workstart);
++    workstart = NULL;
+ 
+     if (grouping == (const char *) -1)
+       {
+@@ -1801,7 +1803,9 @@ do_positional:
+ 	int use_outdigits = specs[nspecs_done].info.i18n;
+ 	char pad = specs[nspecs_done].info.pad;
+ 	CHAR_T spec = specs[nspecs_done].info.spec;
+-	CHAR_T *workstart = NULL;
++
++	workstart = NULL;
++	workend = &work_buffer[sizeof (work_buffer) / sizeof (CHAR_T)];
+ 
+ 	/* Fill in last information.  */
+ 	if (specs[nspecs_done].width_arg != -1)
+@@ -1897,8 +1901,7 @@ do_positional:
+ 	    break;
+ 	  }
+ 
+-	if (__builtin_expect (workstart != NULL, 0))
+-	  free (workstart);
++	free (workstart);
+ 	workstart = NULL;
+ 
+ 	/* Write the following constant string.  */
+@@ -1926,7 +1929,7 @@ printf_unknown (FILE *s, const struct pr
+ 
+ {
+   int done = 0;
+-  CHAR_T work_buffer[MAX (info->width, info->spec) + 32];
++  CHAR_T work_buffer[MAX (sizeof (info->width), sizeof (info->prec)) * 3];
+   CHAR_T *const workend
+     = &work_buffer[sizeof (work_buffer) / sizeof (CHAR_T)];
+   register CHAR_T *w;
 --- glibc-20070515T2025/sysdeps/generic/dl-cache.h	25 Jun 2003 08:01:22 -0000	1.13
 +++ glibc-20070515T2025-fedora/sysdeps/generic/dl-cache.h	22 Sep 2004 21:21:07 -0000	1.13.2.1
 @@ -36,6 +36,14 @@
@@ -1942,6 +2492,17 @@
    if (result == -1)
      {
        if (errno == EACCES)
+--- glibc-20070515T2025/sysdeps/unix/sysv/linux/Makefile	11 May 2007 06:39:01 -0000	1.151
++++ glibc-20070515T2025-fedora/sysdeps/unix/sysv/linux/Makefile	21 May 2007 20:01:11 -0000	1.142.2.10
+@@ -13,7 +13,7 @@ endif
+ 
+ ifeq ($(subdir),misc)
+ sysdep_routines += sysctl clone llseek umount umount2 readahead \
+-		   setfsuid setfsgid makedev
++		   setfsuid setfsgid makedev epoll_pwait
+ 
+ CFLAGS-gethostid.c = -fexceptions
+ 
 --- glibc-20070515T2025/sysdeps/unix/sysv/linux/check_pf.c	25 Apr 2007 16:05:18 -0000	1.10
 +++ glibc-20070515T2025-fedora/sysdeps/unix/sysv/linux/check_pf.c	4 May 2007 10:05:57 -0000	1.3.2.7
 @@ -27,13 +27,10 @@
@@ -2008,6 +2569,78 @@
 +  ret ^= stk;
    return ret;
  }
+--- glibc-20070515T2025/sysdeps/unix/sysv/linux/epoll_pwait.c 1 Jan 1970 00:00:00 -0000
++++ glibc-20070515T2025-fedora/sysdeps/unix/sysv/linux/epoll_pwait.c	21 May 2007 20:01:11 -0000	1.1.2.1
+@@ -0,0 +1,69 @@
++/* Copyright (C) 2007 Free Software Foundation, Inc.
++   This file is part of the GNU C Library.
++
++   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 <errno.h>
++#include <signal.h>
++#include <unistd.h>
++#include <sys/epoll.h>
++
++#include <sysdep-cancel.h>
++#include <sys/syscall.h>
++
++#ifdef __NR_epoll_pwait
++
++/* Wait for events on an epoll instance "epfd". Returns the number of
++   triggered events returned in "events" buffer. Or -1 in case of
++   error with the "errno" variable set to the specific error code. The
++   "events" parameter is a buffer that will contain triggered
++   events. The "maxevents" is the maximum number of events to be
++   returned ( usually size of "events" ). The "timeout" parameter
++   specifies the maximum wait time in milliseconds (-1 == infinite).
++   The thread's signal mask is temporarily and atomically replaced with
++   the one provided as parameter.  */
++
++int epoll_pwait (int epfd, struct epoll_event *events,
++		 int maxevents, int timeout,
++		 const sigset_t *set)
++{
++  if (SINGLE_THREAD_P)
++    return INLINE_SYSCALL (epoll_pwait, 6, epfd, events, maxevents, timeout,
++			   set, _NSIG / 8);
++
++  int oldtype = LIBC_CANCEL_ASYNC ();
++
++  int result = INLINE_SYSCALL (epoll_pwait, 6, epfd, events, maxevents,
++			       timeout, set, _NSIG / 8);
++
++  LIBC_CANCEL_RESET (oldtype);
++
++  return result;
++}
++
++#else
++
++int epoll_pwait (int epfd, struct epoll_event *events,
++		 int maxevents, int timeout,
++		 const sigset_t *set)
++{
++  __set_errno (ENOSYS);
++  return -1;
++}
++stub_warning (epoll_pwait)
++
++# include <stub-tag.h>
++#endif
 --- glibc-20070515T2025/sysdeps/unix/sysv/linux/futimesat.c	3 Feb 2006 05:26:34 -0000	1.6
 +++ glibc-20070515T2025-fedora/sysdeps/unix/sysv/linux/futimesat.c	3 Feb 2006 09:43:55 -0000	1.1.2.7
 @@ -37,14 +37,14 @@ futimesat (fd, file, tvp)
@@ -2090,6 +2723,16 @@
  #define _PATH_WTMP	"/var/log/wtmp"
  
  /* Provide trailing slash, since mostly used for building pathnames. */
+--- glibc-20070515T2025/sysdeps/unix/sysv/linux/syscalls.list	7 May 2007 03:58:18 -0000	1.130
++++ glibc-20070515T2025-fedora/sysdeps/unix/sysv/linux/syscalls.list	21 May 2007 20:01:11 -0000	1.114.2.15
+@@ -10,7 +10,6 @@ delete_module	EXTRA	delete_module	3	dele
+ epoll_create	EXTRA	epoll_create	i:i	epoll_create
+ epoll_ctl	EXTRA	epoll_ctl	i:iiip	epoll_ctl
+ epoll_wait	EXTRA	epoll_wait	Ci:ipii	epoll_wait
+-epoll_pwait	EXTRA	epoll_pwait	Ci:ipiipi	epoll_pwait
+ fdatasync	-	fdatasync	Ci:i	fdatasync
+ flock		-	flock		i:ii	__flock		flock
+ fork		-	fork		i:	__libc_fork	__fork fork
 --- glibc-20070515T2025/sysdeps/unix/sysv/linux/tcsetattr.c	10 Sep 2003 19:16:07 -0000	1.16
 +++ glibc-20070515T2025-fedora/sysdeps/unix/sysv/linux/tcsetattr.c	22 Sep 2004 21:21:08 -0000	1.16.2.1
 @@ -49,6 +49,7 @@ tcsetattr (fd, optional_actions, termios
@@ -2219,6 +2862,111 @@
 +  } while (0)
 +
 +#include_next <dl-cache.h>
+--- glibc-20070515T2025/sysdeps/unix/sysv/linux/i386/epoll_pwait.S 1 Jan 1970 00:00:00 -0000
++++ glibc-20070515T2025-fedora/sysdeps/unix/sysv/linux/i386/epoll_pwait.S	21 May 2007 20:01:11 -0000	1.2.2.1
+@@ -0,0 +1,80 @@
++/* Copyright (C) 2007 Free Software Foundation, Inc.
++   This file is part of the GNU C Library.
++
++   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 <sysdep.h>
++#define _ERRNO_H
++#include <bits/errno.h>
++#define _SIGNAL_H
++#include <bits/signum.h>
++
++
++	.text
++ENTRY (epoll_pwait)
++
++#ifdef __NR_epoll_pwait
++
++	/* Save registers.  */
++	pushl %ebp
++	cfi_adjust_cfa_offset (4)
++	pushl %ebx
++	cfi_adjust_cfa_offset (4)
++	pushl %esi
++	cfi_adjust_cfa_offset (4)
++	pushl %edi
++	cfi_adjust_cfa_offset (4)
++	cfi_rel_offset (edi, 0)
++	cfi_rel_offset (esi, 4)
++	cfi_rel_offset (ebx, 8)
++	cfi_rel_offset (ebp, 12)
++
++	movl 20(%esp), %ebx
++	movl 24(%esp), %ecx
++	movl 28(%esp), %edx
++	movl 32(%esp), %esi
++	movl 36(%esp), %edi
++	movl $_NSIG/8, %ebp
++	movl $__NR_epoll_pwait, %eax
++
++	ENTER_KERNEL
++
++	/* Restore registers.  */
++	popl %edi
++	cfi_adjust_cfa_offset (-4)
++	cfi_restore (edi)
++	popl %esi
++	cfi_adjust_cfa_offset (-4)
++	cfi_restore (esi)
++	popl %ebx
++	cfi_adjust_cfa_offset (-4)
++	cfi_restore (ebx)
++	popl %ebp
++	cfi_adjust_cfa_offset (-4)
++	cfi_restore (ebp)
++
++	/* If 0 > %eax > -4096 there was an error.  */
++	cmpl $-4096, %eax
++	ja SYSCALL_ERROR_LABEL
++
++	/* Successful; return the syscall's value.  */
++#else
++	movl $-ENOSYS, %eax
++	jmp SYSCALL_ERROR_LABEL
++#endif
++L(pseudo_end):
++	ret
++PSEUDO_END (epoll_pwait)
+--- glibc-20070515T2025/sysdeps/unix/sysv/linux/i386/sync_file_range.S	31 Mar 2006 21:47:34 -0000	1.1
++++ glibc-20070515T2025-fedora/sysdeps/unix/sysv/linux/i386/sync_file_range.S	21 May 2007 20:01:11 -0000	1.1.2.2
+@@ -1,5 +1,5 @@
+ /* Selective file content synch'ing.
+-   Copyright (C) 2006 Free Software Foundation, Inc.
++   Copyright (C) 2006, 2007 Free Software Foundation, Inc.
+    This file is part of the GNU C Library.
+ 
+    The GNU C Library is free software; you can redistribute it and/or
+@@ -63,10 +63,10 @@ ENTRY (sync_file_range)
+ 
+ 	cmpl	$-4095, %eax
+ 	jae	SYSCALL_ERROR_LABEL
+-L(pseudo_end):
+-	ret
+ #else
+ 	movl	$-ENOSYS, %eax
+ 	jmp	SYSCALL_ERROR_LABEL
+ #endif
++L(pseudo_end):
++	ret
+ PSEUDO_END (sync_file_range)
 --- glibc-20070515T2025/sysdeps/unix/sysv/linux/ia64/dl-cache.h	6 Jul 2001 04:56:17 -0000	1.2
 +++ glibc-20070515T2025-fedora/sysdeps/unix/sysv/linux/ia64/dl-cache.h	22 Sep 2004 21:21:09 -0000	1.2.4.1
 @@ -22,4 +22,31 @@
@@ -2294,3 +3042,59 @@
  
  	cfi_startproc;
  PSEUDO_END (BP_SYM (__clone))
+--- glibc-20070515T2025/sysdeps/unix/sysv/linux/x86_64/sys/epoll.h	22 Feb 2006 05:48:50 -0000	1.3
++++ glibc-20070515T2025-fedora/sysdeps/unix/sysv/linux/x86_64/sys/epoll.h	21 May 2007 20:01:11 -0000	1.2.2.2
+@@ -1,4 +1,4 @@
+-/* Copyright (C) 2002,2003,2004,2005,2006 Free Software Foundation, Inc.
++/* Copyright (C) 2002,2003,2004,2005,2006,2007 Free Software Foundation, Inc.
+    This file is part of the GNU C Library.
+ 
+    The GNU C Library is free software; you can redistribute it and/or
+@@ -22,6 +22,14 @@
+ #include <stdint.h>
+ #include <sys/types.h>
+ 
++/* Get __sigset_t.  */
++#include <bits/sigset.h>
++
++#ifndef __sigset_t_defined
++# define __sigset_t_defined
++typedef __sigset_t sigset_t;
++#endif
++
+ 
+ enum EPOLL_EVENTS
+   {
+@@ -105,6 +113,16 @@ extern int epoll_ctl (int __epfd, int __
+ extern int epoll_wait (int __epfd, struct epoll_event *__events,
+ 		       int __maxevents, int __timeout);
+ 
++
++/* Same as epoll_wait, but the thread's signal mask is temporarily
++   and atomically replaced with the one provided as parameter.
++
++   This function is a cancellation point and therefore not marked with
++   __THROW.  */
++extern int epoll_pwait (int __epfd, struct epoll_event *__events,
++			int __maxevents, int __timeout,
++			__const __sigset_t *__ss);
++
+ __END_DECLS
+ 
+ #endif /* sys/epoll.h */
+--- glibc-20070515T2025/sysdeps/x86_64/fpu/k_cosl.c 1 Jan 1970 00:00:00 -0000
++++ glibc-20070515T2025-fedora/sysdeps/x86_64/fpu/k_cosl.c	21 May 2007 20:01:15 -0000	1.1.2.1
+@@ -0,0 +1 @@
++/*  Not needed.  */
+--- glibc-20070515T2025/sysdeps/x86_64/fpu/k_rem_pio2l.c 1 Jan 1970 00:00:00 -0000
++++ glibc-20070515T2025-fedora/sysdeps/x86_64/fpu/k_rem_pio2l.c	21 May 2007 20:01:15 -0000	1.1.2.1
+@@ -0,0 +1 @@
++/*  Not needed.  */
+--- glibc-20070515T2025/sysdeps/x86_64/fpu/k_sinl.c 1 Jan 1970 00:00:00 -0000
++++ glibc-20070515T2025-fedora/sysdeps/x86_64/fpu/k_sinl.c	21 May 2007 20:01:15 -0000	1.1.2.1
+@@ -0,0 +1 @@
++/*  Not needed.  */
+--- glibc-20070515T2025/sysdeps/x86_64/fpu/k_tanl.c 1 Jan 1970 00:00:00 -0000
++++ glibc-20070515T2025-fedora/sysdeps/x86_64/fpu/k_tanl.c	21 May 2007 20:01:15 -0000	1.1.2.1
+@@ -0,0 +1 @@
++/*  Not needed.  */


Index: glibc.spec
===================================================================
RCS file: /cvs/pkgs/rpms/glibc/F-7/glibc.spec,v
retrieving revision 1.308
retrieving revision 1.309
diff -u -r1.308 -r1.309
--- glibc.spec	15 May 2007 20:59:30 -0000	1.308
+++ glibc.spec	21 May 2007 20:22:38 -0000	1.309
@@ -3,7 +3,7 @@
 %define glibcsrcdir glibc-20070515T2025
 %define glibc_release_tarballs 0
 %define glibcversion 2.6
-%define glibcrelease 1
+%define glibcrelease 2
 %define auxarches i586 i686 athlon sparcv9 alphaev6
 %define xenarches i686 athlon
 %ifarch %{xenarches}
@@ -1566,7 +1566,14 @@
 %endif
 
 %changelog
-* Tue May 15 2007 Roland McGrath <roland redhat com> - 2.6-1
+* Mon May 21 2007 Jakub Jelinek <jakub redhat com> 2.6-2
+- restore malloc_set_state backwards compatibility (#239344)
+- fix epoll_pwait (BZ#4525)
+- fix printf with unknown format spec or positional arguments
+  and large width and/or precision (BZ#4514)
+- robust mutexes fix (BZ#4512)
+
+* Tue May 15 2007 Roland McGrath <roland redhat com> 2.6-1
 - glibc 2.6 release
 
 * Fri May 11 2007 Jakub Jelinek <jakub redhat com> 2.5.90-24


Index: sources
===================================================================
RCS file: /cvs/pkgs/rpms/glibc/F-7/sources,v
retrieving revision 1.229
retrieving revision 1.230
diff -u -r1.229 -r1.230
--- sources	15 May 2007 20:59:30 -0000	1.229
+++ sources	21 May 2007 20:22:38 -0000	1.230
@@ -1,2 +1,2 @@
-1394656dacdf6b56f92b2922011e5763  glibc-20070515T2025.tar.bz2
-3d589fbdb896cec5c158cd8aaa442716  glibc-fedora-20070515T2025.tar.bz2
+9e33d4d525c8317685e925972f0f145b  glibc-20070515T2025.tar.bz2
+626a3d9974736400054a20355c2014c2  glibc-fedora-20070515T2025.tar.bz2


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]