Automatic import for version 2.15

This commit is contained in:
Rosa 2012-02-25 04:58:19 +04:00
parent 7ce45dd1e2
commit a8cecc9997
40 changed files with 2200 additions and 3360 deletions

View file

@ -1,7 +1,7 @@
---
sources:
crypt_blowfish-1.2.tar.gz: 306ff83af206fac786900ce5e4800516cae909d9
glibc-2.14-394-g8f3b1ff-fedora.tar.xz: 797a230fc2099d9a7bfc649adff5b1e6f26f8402
glibc-2.14-394-g8f3b1ff.tar.xz: 3f99a23b72539b29516c6cadc7fe2ab49430ab1e
glibc-2.15-a316c1f-fedora.tar.gz: fc08eb2483a8401fd324ffd36290d54a5b55bde3
glibc-2.15-a316c1f.tar.gz: aa07170ac6e14a2b3eecd45af19825fa36844dd6
glibc-manpages.tar.bz2: ca54bfb832b703c8e35170fcc1c1f5470b45ff0f
glibc-ports-2.14-25-gd3d9bde.tar.xz: 991870d43cbee8aa48a4b203b63021af516e2791
glibc-ports-2.15-ad8ae7d.tar.gz: 8626c7eb72f0cad6acf0b94d72b124b8d2dac825

View file

@ -1,23 +0,0 @@
--- glibc-2.14-121-g5551a7b/ports/sysdeps/unix/sysv/linux/arm/clone.S.orig 2011-11-18 20:28:25.598544826 -0200
+++ glibc-2.14-121-g5551a7b/ports/sysdeps/unix/sysv/linux/arm/clone.S 2011-11-18 20:29:20.812795485 -0200
@@ -81,8 +81,11 @@ ENTRY(__clone)
RETINSTR(, lr)
cfi_startproc
- cfi_undefined (lr)
+PSEUDO_END (__clone)
+
1:
+ .fnstart
+ .cantunwind
#ifdef RESET_PID
tst ip, #CLONE_THREAD
bne 3f
@@ -116,6 +119,6 @@ ENTRY(__clone)
@ and we are done, passing the return value through r0
b PLTJMP(HIDDEN_JUMPTARGET(_exit))
-PSEUDO_END (__clone)
+ .fnend
weak_alias (__clone, clone)

View file

@ -1,12 +0,0 @@
--- glibc-2.14-394-g8f3b1ff/sysdeps/unix/sysv/linux/check_pf.c.ark 2012-01-30 15:03:15.931233972 +0100
+++ glibc-2.14-394-g8f3b1ff/sysdeps/unix/sysv/linux/check_pf.c 2012-01-30 15:03:30.677233711 +0100
@@ -173,7 +173,8 @@ make_request (int fd, pid_t pid, bool *s
}
else
{
- if (!IN6_IS_ADDR_LOOPBACK (address))
+ if (!IN6_IS_ADDR_LOOPBACK (address) &&
+ !IN6_IS_ADDR_LINKLOCAL (address))
*seen_ipv6 = true;
}
}

View file

@ -1,11 +0,0 @@
--- glibc-2.14-121-g5551a7b/scripts/check-local-headers.sh.multiarch-check 2011-07-24 00:57:20.000000000 +0200
+++ glibc-2.14-121-g5551a7b/scripts/check-local-headers.sh 2011-07-24 00:59:27.656891856 +0200
@@ -29,7 +29,7 @@ exec ${AWK} -v includedir="$includedir"
BEGIN {
status = 0
exclude = "^" includedir \
- "/(asm[-/]|linux/|selinux/|gd|nss3/|sys/capability\\.h|sys/sdt(-config)?\\.h)"
+ "/(asm[-/]|linux/|selinux/|multiarch-|gd|nss3/|sys/capability\\.h|sys/sdt(-config)?\\.h)"
}
/^[^ ]/ && $1 ~ /.*:/ { obj = $1 }
{

View file

@ -0,0 +1,12 @@
--- glibc-2.15-a316c1f/nscd/nscd_helper.c.orig 2012-02-11 20:25:37.804514879 -0200
+++ glibc-2.15-a316c1f/nscd/nscd_helper.c 2012-02-11 20:26:07.428588082 -0200
@@ -414,7 +414,8 @@ __nscd_get_mapping (request_type type, c
struct mapped_database *oldval = *mappedp;
*mappedp = result;
- if (oldval != NULL && atomic_decrement_val (&oldval->counter) == 0)
+ if (oldval != NULL && oldval != NO_MAPPING
+ && atomic_decrement_val (&oldval->counter) == 0)
__nscd_unmap (oldval);
return result;

View file

@ -0,0 +1,12 @@
--- glibc-2.15-a316c1f/sysdeps/unix/sysv/linux/check_pf.c.orig 2012-02-11 15:25:40.066658360 -0200
+++ glibc-2.15-a316c1f/sysdeps/unix/sysv/linux/check_pf.c 2012-02-11 15:25:53.953718622 -0200
@@ -209,7 +209,8 @@ make_request (int fd, pid_t pid)
}
else
{
- if (!IN6_IS_ADDR_LOOPBACK (address))
+ if (!IN6_IS_ADDR_LOOPBACK (address) &&
+ !IN6_IS_ADDR_LINKLOCAL (address))
seen_ipv6 = true;
}
}

View file

@ -0,0 +1,11 @@
--- glibc-2.15-a316c1f/scripts/check-local-headers.sh.orig 2012-02-11 17:00:16.708816468 -0200
+++ glibc-2.15-a316c1f/scripts/check-local-headers.sh 2012-02-11 17:00:35.235895337 -0200
@@ -29,7 +29,7 @@ exec ${AWK} -v includedir="$includedir"
BEGIN {
status = 0
exclude = "^" includedir \
- "/(asm[-/]|linux/|selinux/|gd|nss3/|sys/capability\\.h|libaudit\\.h|sys/sdt(-config)?\\.h))"
+ "/(asm[-/]|linux/|selinux/|multiarch-|gd|nss3/|sys/capability\\.h|libaudit\\.h|sys/sdt(-config)?\\.h))"
}
/^[^ ]/ && $1 ~ /.*:/ { obj = $1 }
{

View file

@ -1,58 +0,0 @@
2006-11-30 Jan Kratochvil <jan.kratochvil@redhat.com>
* sysdeps/unix/sysv/linux/i386/clone.S: Provide CFI for the outermost
`clone' function to ensure proper unwinding stop of gdb.
* sysdeps/unix/sysv/linux/x86_64/clone.S: Likewise.
Index: sysdeps/unix/sysv/linux/i386/clone.S
===================================================================
RCS file: /cvs/glibc/libc/sysdeps/unix/sysv/linux/i386/clone.S,v
retrieving revision 1.26
retrieving revision 1.27
diff -u -p -r1.26 -r1.27
--- sysdeps/unix/sysv/linux/i386/clone.S 4 May 2005 17:52:08 -0000 1.26
+++ sysdeps/unix/sysv/linux/i386/clone.S 3 Dec 2006 23:12:36 -0000 1.27
@@ -120,6 +120,9 @@ L(pseudo_end):
ret
L(thread_start):
+ cfi_startproc;
+ /* Clearing frame pointer is insufficient, use CFI. */
+ cfi_undefined (eip);
/* Note: %esi is zero. */
movl %esi,%ebp /* terminate the stack frame */
#ifdef RESET_PID
@@ -152,6 +155,7 @@ L(nomoregetpid):
jmp L(haspid)
.previous
#endif
+ cfi_endproc;
cfi_startproc
PSEUDO_END (BP_SYM (__clone))
Index: sysdeps/unix/sysv/linux/x86_64/clone.S
===================================================================
RCS file: /cvs/glibc/libc/sysdeps/unix/sysv/linux/x86_64/clone.S,v
retrieving revision 1.6
retrieving revision 1.7
diff -u -p -r1.6 -r1.7
--- sysdeps/unix/sysv/linux/x86_64/clone.S 31 Mar 2005 10:00:12 -0000 1.6
+++ sysdeps/unix/sysv/linux/x86_64/clone.S 3 Dec 2006 23:12:36 -0000 1.7
@@ -89,6 +89,9 @@ L(pseudo_end):
ret
L(thread_start):
+ cfi_startproc;
+ /* Clearing frame pointer is insufficient, use CFI. */
+ cfi_undefined (rip);
/* Clear the frame pointer. The ABI suggests this be done, to mark
the outermost frame obviously. */
xorl %ebp, %ebp
@@ -113,6 +116,7 @@ L(thread_start):
/* Call exit with return value from function call. */
movq %rax, %rdi
call HIDDEN_JUMPTARGET (_exit)
+ cfi_endproc;
cfi_startproc;
PSEUDO_END (BP_SYM (__clone))

View file

@ -1,146 +0,0 @@
commit 77cdc054e02069d72dcf54a9ad7d7df3a24bcb01
Author: Andreas Schwab <schwab@redhat.com>
Date: Wed Nov 9 17:14:39 2011 +0100
Check malloc arana limit atomically
diff --git a/ChangeLog b/ChangeLog
index bf09161..edd7dd8 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,14 @@
+2011-11-14 Andreas Schwab <schwab@redhat.com>
+
+ * malloc/arena.c (arena_get2): Don't call reused_arena when
+ _int_new_arena failed.
+
+2011-11-10 Andreas Schwab <schwab@redhat.com>
+
+ * malloc/arena.c (_int_new_arena): Don't increment narenas.
+ (reused_arena): Don't check arena limit.
+ (arena_get2): Atomically check arena limit.
+
2011-10-19 Andreas Schwab <schwab@redhat.com>
* sysdeps/x86_64/fpu/math_private.h (libc_feupdateenv): Use
diff --git a/malloc/arena.c b/malloc/arena.c
index 9114fd2..042cac8 100644
--- a/malloc/arena.c
+++ b/malloc/arena.c
@@ -747,8 +747,6 @@ _int_new_arena(size_t size)
main_arena.next = a;
#ifdef PER_THREAD
- ++narenas;
-
(void)mutex_unlock(&list_lock);
#endif
@@ -786,30 +784,6 @@ get_free_list (void)
static mstate
reused_arena (void)
{
- if (narenas <= mp_.arena_test)
- return NULL;
-
- static int narenas_limit;
- if (narenas_limit == 0)
- {
- if (mp_.arena_max != 0)
- narenas_limit = mp_.arena_max;
- else
- {
- int n = __get_nprocs ();
-
- if (n >= 1)
- narenas_limit = NARENAS_FROM_NCORES (n);
- else
- /* We have no information about the system. Assume two
- cores. */
- narenas_limit = NARENAS_FROM_NCORES (2);
- }
- }
-
- if (narenas < narenas_limit)
- return NULL;
-
mstate result;
static mstate next_to_use;
if (next_to_use == NULL)
@@ -844,10 +818,41 @@ arena_get2(mstate a_tsd, size_t size)
mstate a;
#ifdef PER_THREAD
- if ((a = get_free_list ()) == NULL
- && (a = reused_arena ()) == NULL)
- /* Nothing immediately available, so generate a new arena. */
- a = _int_new_arena(size);
+ static size_t narenas_limit;
+
+ a = get_free_list ();
+ if (a == NULL)
+ {
+ /* Nothing immediately available, so generate a new arena. */
+ if (narenas_limit == 0)
+ {
+ if (mp_.arena_max != 0)
+ narenas_limit = mp_.arena_max;
+ else
+ {
+ int n = __get_nprocs ();
+
+ if (n >= 1)
+ narenas_limit = NARENAS_FROM_NCORES (n);
+ else
+ /* We have no information about the system. Assume two
+ cores. */
+ narenas_limit = NARENAS_FROM_NCORES (2);
+ }
+ }
+ repeat:;
+ size_t n = narenas;
+ if (__builtin_expect (n <= mp_.arena_test || n < narenas_limit, 0))
+ {
+ if (catomic_compare_and_exchange_bool_acq(&narenas, n + 1, n))
+ goto repeat;
+ a = _int_new_arena (size);
+ if (__builtin_expect (a != NULL, 1))
+ return a;
+ catomic_decrement(&narenas);
+ }
+ a = reused_arena ();
+ }
#else
if(!a_tsd)
a = a_tsd = &main_arena;
commit a5fb313cb7b7e692fd4684916aaa98e03ec7e8b6
Author: Andreas Schwab <schwab@redhat.com>
Date: Mon Nov 14 11:41:52 2011 +0100
Don't call reused_arena when _int_new_arena failed
diff --git a/malloc/arena.c b/malloc/arena.c
index 042cac8..cb8548b 100644
--- a/malloc/arena.c
+++ b/malloc/arena.c
@@ -844,14 +844,14 @@ arena_get2(mstate a_tsd, size_t size)
size_t n = narenas;
if (__builtin_expect (n <= mp_.arena_test || n < narenas_limit, 0))
{
- if (catomic_compare_and_exchange_bool_acq(&narenas, n + 1, n))
+ if (catomic_compare_and_exchange_bool_acq (&narenas, n + 1, n))
goto repeat;
a = _int_new_arena (size);
- if (__builtin_expect (a != NULL, 1))
- return a;
- catomic_decrement(&narenas);
+ if (__builtin_expect (a == NULL, 0))
+ catomic_decrement (&narenas);
}
- a = reused_arena ();
+ else
+ a = reused_arena ();
}
#else
if(!a_tsd)

File diff suppressed because it is too large Load diff

File diff suppressed because it is too large Load diff

View file

@ -1,24 +1,11 @@
From 7327af4c323f6d4f500bf4aaa66a9cac6236772f Mon Sep 17 00:00:00 2001
From: Jim Meyering <meyering@redhat.com>
Date: Wed, 26 Oct 2011 20:08:52 +0200
Subject: [PATCH] Revert "Use leaf function attribute in __THROW"
This reverts commit aa78043a4aafe5db1a1a76d544a833b63b4c5f5c
and the related 49a43d80ec5c97cf6136b1ee2687414773b2d5aa.
This fixes http://bugzilla.redhat.com/747377
---
misc/sys/cdefs.h | 15 +++------------
2 files changed, 3 insertions(+), 14 deletions(-)
diff --git a/misc/sys/cdefs.h b/misc/sys/cdefs.h
index 72073e8..165a94a 100644
--- a/misc/sys/cdefs.h
+++ b/misc/sys/cdefs.h
@@ -38,27 +38,18 @@
--- glibc-2.15-a316c1f/misc/sys/cdefs.h.orig 2012-02-11 15:42:05.510993089 -0200
+++ glibc-2.15-a316c1f/misc/sys/cdefs.h 2012-02-11 15:42:48.358183501 -0200
@@ -38,30 +38,20 @@
#ifdef __GNUC__
-/* All functions, except those with callbacks, are leaf functions. */
-/* All functions, except those with callbacks or those that
- synchronize memory, are leaf functions. */
-# if __GNUC_PREREQ (4, 6) && !defined _LIBC
-# define __LEAF , __leaf__
-# define __LEAF_ATTR __attribute__ ((__leaf__))
@ -34,16 +21,16 @@ index 72073e8..165a94a 100644
the -fexceptions options for C code as well. */
# if !defined __cplusplus && __GNUC_PREREQ (3, 3)
-# define __THROW __attribute__ ((__nothrow__ __LEAF))
-# define __NTH(fct) __attribute__ ((__nothrow__ __LEAF)) fct
+# define __THROW __attribute__ ((__nothrow__))
# define __THROWNL __attribute__ ((__nothrow__))
-# define __NTH(fct) __attribute__ ((__nothrow__ __LEAF)) fct
+# define __NTH(fct) __attribute__ ((__nothrow__)) fct
# else
# if defined __cplusplus && __GNUC_PREREQ (2,8)
# define __THROW throw ()
# define __THROWNL throw ()
-# define __NTH(fct) __LEAF_ATTR fct throw ()
+# define __NTH(fct) fct throw ()
# else
# define __THROW
# define __NTH(fct) fct
--
1.7.7.1
# define __THROWNL

157
glibc-rh179072.patch Normal file
View file

@ -0,0 +1,157 @@
diff -Nrup a/elf/dl-close.c b/elf/dl-close.c
--- a/elf/dl-close.c 2012-01-25 21:49:58.892869984 -0700
+++ b/elf/dl-close.c 2012-01-25 21:50:22.283882509 -0700
@@ -32,6 +32,7 @@
#include <sys/mman.h>
#include <sysdep-cancel.h>
#include <tls.h>
+#include <stap-probe.h>
/* Type of the constructor functions. */
@@ -469,6 +470,7 @@ _dl_close_worker (struct link_map *map)
struct r_debug *r = _dl_debug_initialize (0, nsid);
r->r_state = RT_DELETE;
_dl_debug_state ();
+ LIBC_PROBE (rtld_unmap_start, 2, nsid, r);
if (unload_global)
{
@@ -738,6 +740,7 @@ _dl_close_worker (struct link_map *map)
/* Notify the debugger those objects are finalized and gone. */
r->r_state = RT_CONSISTENT;
_dl_debug_state ();
+ LIBC_PROBE (rtld_unmap_complete, 2, nsid, r);
/* Recheck if we need to retry, release the lock. */
out:
diff -Nrup a/elf/dl-load.c b/elf/dl-load.c
--- a/elf/dl-load.c 2012-01-25 21:49:58.895869986 -0700
+++ b/elf/dl-load.c 2012-01-25 21:50:22.288882511 -0700
@@ -36,6 +36,7 @@
#include <stackinfo.h>
#include <caller.h>
#include <sysdep.h>
+#include <stap-probe.h>
#include <dl-dst.h>
@@ -881,7 +882,7 @@ _dl_init_paths (const char *llp)
static void
__attribute__ ((noreturn, noinline))
lose (int code, int fd, const char *name, char *realname, struct link_map *l,
- const char *msg, struct r_debug *r)
+ const char *msg, struct r_debug *r, Lmid_t nsid)
{
/* The file might already be closed. */
if (fd != -1)
@@ -895,6 +896,7 @@ lose (int code, int fd, const char *name
{
r->r_state = RT_CONSISTENT;
_dl_debug_state ();
+ LIBC_PROBE (rtld_map_complete, 2, nsid, r);
}
_dl_signal_error (code, name, NULL, msg);
@@ -933,7 +935,7 @@ _dl_map_object_from_fd (const char *name
errval = errno;
call_lose:
lose (errval, fd, name, realname, l, errstring,
- make_consistent ? r : NULL);
+ make_consistent ? r : NULL, nsid);
}
/* Look again to see if the real name matched another already loaded. */
@@ -1040,6 +1042,7 @@ _dl_map_object_from_fd (const char *name
linking has not been used before. */
r->r_state = RT_ADD;
_dl_debug_state ();
+ LIBC_PROBE (rtld_map_start, 2, nsid, r);
make_consistent = true;
}
else
@@ -1735,7 +1738,7 @@ open_verify (const char *name, struct fi
name = strdupa (realname);
free (realname);
}
- lose (errval, fd, name, NULL, NULL, errstring, NULL);
+ lose (errval, fd, name, NULL, NULL, errstring, NULL, 0);
}
/* See whether the ELF header is what we expect. */
diff -Nrup a/elf/dl-open.c b/elf/dl-open.c
--- a/elf/dl-open.c 2012-01-01 05:16:32.000000000 -0700
+++ b/elf/dl-open.c 2012-01-25 21:50:22.291882514 -0700
@@ -33,6 +33,7 @@
#include <caller.h>
#include <sysdep-cancel.h>
#include <tls.h>
+#include <stap-probe.h>
#include <dl-dst.h>
@@ -292,6 +293,7 @@ dl_open_worker (void *a)
struct r_debug *r = _dl_debug_initialize (0, args->nsid);
r->r_state = RT_CONSISTENT;
_dl_debug_state ();
+ LIBC_PROBE (rtld_map_complete, 2, args->nsid, r);
/* Print scope information. */
if (__builtin_expect (GLRO(dl_debug_mask) & DL_DEBUG_SCOPES, 0))
@@ -308,10 +310,18 @@ dl_open_worker (void *a)
struct link_map *l = new;
while (l->l_next)
l = l->l_next;
+ int relocation_in_progress = 0;
while (1)
{
if (! l->l_real->l_relocated)
{
+ if (! relocation_in_progress)
+ {
+ /* Notify the debugger that relocations are about to happen. */
+ LIBC_PROBE (rtld_reloc_start, 2, args->nsid, r);
+ relocation_in_progress = 1;
+ }
+
#ifdef SHARED
if (__builtin_expect (GLRO(dl_profile) != NULL, 0))
{
@@ -481,6 +491,10 @@ cannot load any more object with static
}
}
+ /* Notify the debugger all new objects have been relocated. */
+ if (relocation_in_progress)
+ LIBC_PROBE (rtld_reloc_complete, 2, args->nsid, r);
+
/* Run the initializer functions of new objects. */
_dl_init (new, args->argc, args->argv, args->env);
diff -Nrup a/elf/rtld.c b/elf/rtld.c
--- a/elf/rtld.c 2012-01-25 21:49:58.898869987 -0700
+++ b/elf/rtld.c 2012-01-25 21:53:42.262987201 -0700
@@ -40,6 +40,7 @@
#include <dl-osinfo.h>
#include <dl-procinfo.h>
#include <tls.h>
+#include <stap-probe.h>
#include <stackinfo.h>
#include <assert.h>
@@ -1670,6 +1671,7 @@ ERROR: ld.so: object '%s' cannot be load
/* We start adding objects. */
r->r_state = RT_ADD;
_dl_debug_state ();
+ LIBC_PROBE (rtld_init_start, 2, LM_ID_BASE, r);
/* Auditing checkpoint: we are ready to signal that the initial map
is being constructed. */
@@ -2382,6 +2384,7 @@ ERROR: ld.so: object '%s' cannot be load
r = _dl_debug_initialize (0, LM_ID_BASE);
r->r_state = RT_CONSISTENT;
_dl_debug_state ();
+ LIBC_PROBE (rtld_init_complete, 2, LM_ID_BASE, r);
#ifndef MAP_COPY
/* We must munmap() the cache file. */

13
glibc-rh446078.patch Normal file
View file

@ -0,0 +1,13 @@
diff --git a/localedata/locales/it_IT b/localedata/locales/it_IT
index 31acd53..9513970 100644
--- a/localedata/locales/it_IT
+++ b/localedata/locales/it_IT
@@ -124,6 +124,8 @@ t_fmt_ampm ""
date_fmt "<U0025><U0061><U0020><U0025><U0065><U0020><U0025>/
<U0062><U0020><U0025><U0059><U002C><U0020><U0025><U0048><U002E>/
<U0025><U004D><U002E><U0025><U0053><U002C><U0020><U0025><U005A>"
+first_weekday 2
+first_workday 2
END LC_TIME
LC_PAPER

13
glibc-rh454629.patch Normal file
View file

@ -0,0 +1,13 @@
diff --git a/localedata/locales/ca_ES b/localedata/locales/ca_ES
index cd83bcc..3c14340 100644
--- a/localedata/locales/ca_ES
+++ b/localedata/locales/ca_ES
@@ -138,6 +138,8 @@ t_fmt_ampm ""
date_fmt "<U0025><U0061><U0020><U0025><U0062><U0020><U0025><U0065>/
<U0020><U0025><U0048><U003A><U0025><U004D><U003A><U0025><U0053><U0020>/
<U0025><U005A><U0020><U0025><U0059>"
+first_weekday 2
+first_workday 2
END LC_TIME
LC_PAPER

27
glibc-rh552960-2.patch Normal file
View file

@ -0,0 +1,27 @@
diff -rup a/nptl/sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S b/nptl/sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S
--- a/nptl/sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S 2012-02-10 12:49:42.609737373 -0700
+++ b/nptl/sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S 2012-02-10 12:52:00.962150379 -0700
@@ -438,6 +438,10 @@ __pthread_cond_wait:
addl $1, cond_futex(%ebx)
movl cond_futex(%ebx), %ebp
+ /* Increment total_seq to ensure we do not lose wakeups. */
+ addl $1, total_seq(%ebx)
+ adcl $0, total_seq+4(%ebx)
+
/* Unlock. */
LOCK
#if cond_lock == 0
diff -rup a/nptl/sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S b/nptl/sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S
--- a/nptl/sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S 2012-02-10 12:49:42.612737361 -0700
+++ b/nptl/sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S 2012-02-10 12:52:36.179000963 -0700
@@ -366,6 +366,9 @@ __pthread_cond_wait:
incl cond_futex(%rdi)
movl cond_futex(%rdi), %edx
+ /* Increment total_seq to ensure we do not lose wakeups. */
+ incq total_seq(%rdi)
+
/* Release internal lock. */
LOCK
#if cond_lock == 0

12
glibc-rh564528.patch Normal file
View file

@ -0,0 +1,12 @@
diff -rup a/manual/stdio.texi b/manual/stdio.texi
--- a/manual/stdio.texi 2012-01-01 05:16:32.000000000 -0700
+++ b/manual/stdio.texi 2012-02-09 23:46:31.660912211 -0700
@@ -2324,6 +2324,8 @@ the @var{size} argument specifies the ma
produce. The trailing null character is counted towards this limit, so
you should allocate at least @var{size} characters for the string @var{s}.
+The trailing null byte is added to @var{s}, unless @var{size} is zero.
+
The return value is the number of characters which would be generated
for the given input, excluding the trailing null. If this value is
greater or equal to @var{size}, not all characters from the result have

13
glibc-rh622499.patch Normal file
View file

@ -0,0 +1,13 @@
diff --git a/localedata/locales/lt_LT b/localedata/locales/lt_LT
index b709d83..63cb6de 100644
--- a/localedata/locales/lt_LT
+++ b/localedata/locales/lt_LT
@@ -2191,6 +2191,8 @@ t_fmt_ampm ""
date_fmt "<U0025><U0061><U0020><U0025><U0062><U0020><U0025><U0065>/
<U0020><U0025><U0048><U003A><U0025><U004D><U003A><U0025><U0053><U0020>/
<U0025><U005A><U0020><U0025><U0059>"
+first_weekday 2
+first_workday 2
END LC_TIME
LC_MESSAGES

13
glibc-rh624296.patch Normal file
View file

@ -0,0 +1,13 @@
diff -rup a/localedata/locales/ru_UA b/localedata/locales/ru_UA
--- a/localedata/locales/ru_UA 2012-01-01 05:16:32.000000000 -0700
+++ b/localedata/locales/ru_UA 2012-02-09 22:57:29.698433625 -0700
@@ -141,6 +141,8 @@ t_fmt_ampm ""
date_fmt "<U0025><U0061><U0020><U0025><U0062><U0020><U0025><U0065>/
<U0020><U0025><U0048><U003A><U0025><U004D><U003A><U0025><U0053><U0020>/
<U0025><U005A><U0020><U0025><U0059>"
+first_weekday 2
+first_workday 2
END LC_TIME
LC_PAPER
Only in b/localedata/locales: uk_UA.rej

20
glibc-rh657588.patch Normal file
View file

@ -0,0 +1,20 @@
diff -rup a/localedata/locales/zh_CN b/localedata/locales/zh_CN
--- a/localedata/locales/zh_CN 2006-07-30 16:19:43.000000000 -0600
+++ b/localedata/locales/zh_CN 2012-01-30 21:24:46.905115483 -0700
@@ -108,11 +108,11 @@ day "<U661F><U671F><U65E5>";/
"<U661F><U671F><U4E94>";/
"<U661F><U671F><U516D>"
-abmon "<U0020><U0031><U6708>";"<U0020><U0032><U6708>";/
- "<U0020><U0033><U6708>";"<U0020><U0034><U6708>";/
- "<U0020><U0035><U6708>";"<U0020><U0036><U6708>";/
- "<U0020><U0037><U6708>";"<U0020><U0038><U6708>";/
- "<U0020><U0039><U6708>";"<U0031><U0030><U6708>";/
+abmon "<U0031><U6708>";"<U0032><U6708>";/
+ "<U0033><U6708>";"<U0034><U6708>";/
+ "<U0035><U6708>";"<U0036><U6708>";/
+ "<U0037><U6708>";"<U0038><U6708>";/
+ "<U0039><U6708>";"<U0031><U0030><U6708>";/
"<U0031><U0031><U6708>";"<U0031><U0032><U6708>"
mon "<U4E00><U6708>";"<U4E8C><U6708>";"<U4E09><U6708>";/

37
glibc-rh688948.patch Normal file
View file

@ -0,0 +1,37 @@
diff -rNup a/fedora/glibc_post_upgrade.c b/fedora/glibc_post_upgrade.c
--- a/fedora/glibc_post_upgrade.c 2011-10-19 05:04:41.000000000 -0600
+++ b/fedora/glibc_post_upgrade.c 2012-02-06 11:02:03.236713830 -0700
@@ -60,6 +60,7 @@ is_ia64 (void)
int
main (void)
{
+ struct stat statbuf;
char initpath[256];
char buffer[4096];
@@ -170,12 +171,24 @@ main (void)
|| ((!!access ("/dev/initctl", F_OK))
^ !access ("/sbin/initctl", X_OK)))
_exit (0);
+
/* Check if we are not inside of some chroot, because we'd just
- timeout and leave /etc/initrunlvl. */
+ timeout and leave /etc/initrunlvl.
+
+ On more modern systems this test is not sufficient to detect
+ if we're in a chroot. */
if (readlink ("/proc/1/exe", initpath, 256) <= 0 ||
readlink ("/proc/1/root", initpath, 256) <= 0)
_exit (0);
+ /* Here's another well known way to detect chroot, at least on an
+ ext and xfs filesystems and assuming nothing mounted on the chroot's
+ root. */
+ if (stat ("/", &statbuf) != 0
+ || (statbuf.st_ino != 2
+ && statbuf.st_ino != 128))
+ _exit (0);
+
if (check_elf ("/proc/1/exe"))
verbose_exec (116, "/sbin/telinit", "/sbin/telinit", "u");

11
glibc-rh691912.patch Normal file
View file

@ -0,0 +1,11 @@
diff -rup a/sunrpc/etc.rpc b/sunrpc/etc.rpc
--- a/sunrpc/etc.rpc 2012-01-01 05:16:32.000000000 -0700
+++ b/sunrpc/etc.rpc 2012-02-03 14:24:45.615462110 -0700
@@ -62,6 +62,7 @@ sadmind 100232
nisd 100300 rpc.nisd
nispasswd 100303 rpc.nispasswdd
ufsd 100233 ufsd
+fedfs_admin 100418
pcnfsd 150001 pcnfs
amd 300019 amq
sgi_fam 391002 fam

10
glibc-rh697421.patch Normal file
View file

@ -0,0 +1,10 @@
diff -rup a/iconvdata/gconv-modules b/iconvdata/gconv-modules
--- a/iconvdata/gconv-modules 2010-05-04 05:27:23.000000000 -0600
+++ b/iconvdata/gconv-modules 2012-01-26 10:58:24.181895489 -0700
@@ -1954,3 +1954,6 @@ alias HPGREEK8// HP-GREEK8//
alias OSF10010004// HP-GREEK8//
module HP-GREEK8// INTERNAL HP-GREEK8 1
module INTERNAL HP-GREEK8// HP-GREEK8 1
+
+alias ISO-10646-UCS-2// UNICODE//
+alias ISO-10646-UCS-2// ISO-10646/UTF8/

56
glibc-rh729661.patch Normal file
View file

@ -0,0 +1,56 @@
diff -rup a/elf/dl-deps.c b/elf/dl-deps.c
--- a/elf/dl-deps.c 2012-01-23 14:28:15.888185967 -0700
+++ b/elf/dl-deps.c 2012-01-23 14:29:11.620197431 -0700
@@ -634,7 +634,7 @@ Filters not supported with LD_TRACE_PREL
/* We can skip looking for the binary itself which is at the front
of the search list. */
i = 1;
- char seen[nlist];
+ uint16_t seen[nlist];
memset (seen, 0, nlist * sizeof (seen[0]));
while (1)
{
@@ -660,13 +660,13 @@ Filters not supported with LD_TRACE_PREL
(k - i) * sizeof (l_initfini[0]));
l_initfini[k] = thisp;
- if (seen[i + 1] > 1)
+ if (seen[i + 1] > nlist - i)
{
++i;
goto next_clear;
}
- char this_seen = seen[i];
+ uint16_t this_seen = seen[i];
memmove (&seen[i], &seen[i + 1],
(k - i) * sizeof (seen[0]));
seen[k] = this_seen;
diff -rup a/elf/dl-fini.c b/elf/dl-fini.c
--- a/elf/dl-fini.c 2012-01-01 05:16:32.000000000 -0700
+++ b/elf/dl-fini.c 2012-01-23 14:29:39.661203226 -0700
@@ -39,7 +39,7 @@ _dl_sort_fini (struct link_map **maps, s
/* We can skip looking for the binary itself which is at the front
of the search list for the main namespace. */
unsigned int i = ns == LM_ID_BASE;
- char seen[nmaps];
+ uint16_t seen[nmaps];
memset (seen, 0, nmaps * sizeof (seen[0]));
while (1)
{
@@ -79,13 +79,13 @@ _dl_sort_fini (struct link_map **maps, s
used[k] = here_used;
}
- if (seen[i + 1] > 1)
+ if (seen[i + 1] > nmaps - i)
{
++i;
goto next_clear;
}
- char this_seen = seen[i];
+ uint16_t this_seen = seen[i];
memmove (&seen[i], &seen[i + 1], (k - i) * sizeof (seen[0]));
seen[k] = this_seen;

16
glibc-rh730856.patch Normal file
View file

@ -0,0 +1,16 @@
2011-09-01 Andreas Schwab <schwab@redhat.com>
* resolv/res_query.c (__libc_res_nquery): Update assertion.
diff -ru a/resolv/res_query.c b/resolv/res_query.c
--- a/resolv/res_query.c 2011-12-12 14:10:52.000000000 -0700
+++ b/resolv/res_query.c 2011-12-12 14:23:04.832739111 -0700
@@ -248,7 +248,7 @@
&& *resplen2 > (int) sizeof (HEADER))
{
/* Special case of partial answer. */
- assert (hp != hp2);
+ assert (n == 0 || hp != hp2);
hp = hp2;
}
else if (answerp2 != NULL && *resplen2 < (int) sizeof (HEADER)

40
glibc-rh740506.patch Normal file
View file

@ -0,0 +1,40 @@
* malloc/arena.c (arena_get2): Avoid unnecessarily
retrieving #cpus from /proc.
* malloc/malloc.c (mALLOPt): Clamp arena_test based on
the value of arena_max.
commit 41b81892f11fe1353123e892158b53de73863d62
Author: Ulrich Drepper <drepper@gmail.com>
Date: Tue Jan 31 14:42:34 2012 -0500
Handle ARENA_TEST correctly
diff --git a/malloc/arena.c b/malloc/arena.c
index d3cf4b9..b1c9469 100644
--- a/malloc/arena.c
+++ b/malloc/arena.c
@@ -828,7 +828,7 @@ arena_get2(mstate a_tsd, size_t size)
{
if (mp_.arena_max != 0)
narenas_limit = mp_.arena_max;
- else
+ else if (narenas > mp_.arena_test)
{
int n = __get_nprocs ();
@@ -842,7 +842,14 @@ arena_get2(mstate a_tsd, size_t size)
}
repeat:;
size_t n = narenas;
- if (__builtin_expect (n <= mp_.arena_test || n < narenas_limit, 0))
+ /* NB: the following depends on the fact that (size_t)0 - 1 is a
+ very large number and that the underflow is OK. If arena_max
+ is set the value of arena_test is irrelevant. If arena_test
+ is set but narenas is not yet larger or equal to arena_test
+ narenas_limit is 0. There is no possibility for narenas to
+ be too big for the test to always fail since there is not
+ enough address space to create that many arenas. */
+ if (__builtin_expect (n <= narenas_limit - 1, 0))
{
if (catomic_compare_and_exchange_bool_acq (&narenas, n + 1, n))
goto repeat;

12
glibc-rh740682.patch Normal file
View file

@ -0,0 +1,12 @@
diff -rup a/time/sys/time.h b/time/sys/time.h
--- a/time/sys/time.h 2012-01-01 05:16:32.000000000 -0700
+++ b/time/sys/time.h 2012-01-26 11:16:44.309112430 -0700
@@ -78,7 +78,7 @@ extern int gettimeofday (struct timeval
This call is restricted to the super-user. */
extern int settimeofday (__const struct timeval *__tv,
__const struct timezone *__tz)
- __THROW __nonnull ((1));
+ __THROW;
/* Adjust the current time of day by the amount in DELTA.
If OLDDELTA is not NULL, it is filled in with the amount

21
glibc-rh741105.patch Normal file
View file

@ -0,0 +1,21 @@
diff -rup a/elf/dl-load.c b/elf/dl-load.c
--- a/elf/dl-load.c 2012-02-03 10:59:58.917870716 -0700
+++ b/elf/dl-load.c 2012-02-03 11:01:01.796580644 -0700
@@ -1130,6 +1130,16 @@ _dl_map_object_from_fd (const char *name
= N_("ELF load command address/offset not properly aligned");
goto call_lose;
}
+ if (__builtin_expect ((ph->p_offset + ph->p_filesz > st.st_size), 0))
+ {
+ /* If the segment requires zeroing of part of its last
+ page, we'll crash when accessing the unmapped page.
+ There's still a possibility of a race, if the shared
+ object is truncated between the fxstat above and the
+ memset below. */
+ errstring = N_("ELF load command past end of file");
+ goto call_lose;
+ }
c = &loadcmds[nloadcmds++];
c->mapstart = ph->p_vaddr & ~(GLRO(dl_pagesize) - 1);
Only in b/elf: dl-load.c.orig

View file

@ -1,35 +0,0 @@
commit 3d7ba52b68e4dc5c4d3eb19de436c66ed9bb2f0d
Author: Andreas Schwab <schwab@redhat.com>
Date: Thu Nov 3 14:26:38 2011 +0100
Don't fail in makedb if SELinux is disabled
*** a/ChangeLog Wed Nov 30 12:38:59 2011
--- b/ChangeLog Wed Nov 30 12:39:17 2011
***************
*** 9,14 ****
--- 9,19 ----
(reused_arena): Don't check arena limit.
(arena_get2): Atomically check arena limit.
+ 2011-11-03 Andreas Schwab <schwab@redhat.com>
+
+ * nss/makedb.c (set_file_creation_context): Do nothing if SELinux
+ is disabled.
+
2011-10-19 Andreas Schwab <schwab@redhat.com>
* sysdeps/x86_64/fpu/math_private.h (libc_feupdateenv): Use
diff --git a/nss/makedb.c b/nss/makedb.c
index 8cee92f..1b19966 100644
--- a/nss/makedb.c
+++ b/nss/makedb.c
@@ -842,7 +842,7 @@ set_file_creation_context (const char *outname, mode_t mode)
/* Check if SELinux is enabled, and remember. */
if (enabled == 0)
- enabled = is_selinux_enabled ();
+ enabled = is_selinux_enabled () ? 1 : -1;
if (enabled < 0)
return;

View file

@ -1,242 +0,0 @@
commit f3a6cc0a560a17f32a3e90d2f20501a53cab6058
Author: Andreas Schwab <schwab@redhat.com>
Date: Tue Nov 29 10:52:22 2011 +0100
Fix access after end of search string in regex matcher
--- a/ChangeLog 2011-11-30 12:43:22.312632113 -0700
+++ b/ChangeLog 2011-11-30 12:43:50.569624022 -0700
@@ -1,3 +1,14 @@
+2011-11-29 Andreas Schwab <schwab@redhat.com>
+
+ * locale/weight.h (findidx): Add parameter len.
+ * locale/weightwc.h (findidx): Likewise.
+ * posix/fnmatch_loop.c (FCT): Adjust caller.
+ * posix/regcomp.c (build_equiv_class): Likewise.
+ * posix/regex_internal.h (re_string_elem_size_at): Likewise.
+ * posix/regexec.c (check_node_accept_bytes): Likewise.
+ * string/strcoll_l.c (STRCOLL): Likewise.
+ * string/strxfrm_l.c (STRXFRM): Likewise.
+
2011-11-14 Andreas Schwab <schwab@redhat.com>
* malloc/arena.c (arena_get2): Don't call reused_arena when
diff --git a/locale/weight.h b/locale/weight.h
index dc70a00..967e176 100644
--- a/locale/weight.h
+++ b/locale/weight.h
@@ -1,4 +1,4 @@
-/* Copyright (C) 1996,1997,1998,1999,2000,2003,2004 Free Software Foundation, Inc.
+/* Copyright (C) 1996,1997,1998,1999,2000,2003,2004,2011 Free Software Foundation, Inc.
This file is part of the GNU C Library.
Written by Ulrich Drepper, <drepper@cygnus.com>.
@@ -20,7 +20,7 @@
/* Find index of weight. */
auto inline int32_t
__attribute ((always_inline))
-findidx (const unsigned char **cpp)
+findidx (const unsigned char **cpp, size_t len)
{
int_fast32_t i = table[*(*cpp)++];
const unsigned char *cp;
@@ -34,6 +34,7 @@ findidx (const unsigned char **cpp)
Search for the correct one. */
cp = &extra[-i];
usrc = *cpp;
+ --len;
while (1)
{
size_t nhere;
@@ -56,7 +57,7 @@ findidx (const unsigned char **cpp)
already. */
size_t cnt;
- for (cnt = 0; cnt < nhere; ++cnt)
+ for (cnt = 0; cnt < nhere && cnt < len; ++cnt)
if (cp[cnt] != usrc[cnt])
break;
@@ -79,13 +80,13 @@ findidx (const unsigned char **cpp)
size_t cnt;
size_t offset = 0;
- for (cnt = 0; cnt < nhere; ++cnt)
+ for (cnt = 0; cnt < nhere && cnt < len; ++cnt)
if (cp[cnt] != usrc[cnt])
break;
if (cnt != nhere)
{
- if (cp[cnt] > usrc[cnt])
+ if (cnt == len || cp[cnt] > usrc[cnt])
{
/* Cannot be in this range. */
cp += 2 * nhere;
diff --git a/locale/weightwc.h b/locale/weightwc.h
index 9ea1126..7862091 100644
--- a/locale/weightwc.h
+++ b/locale/weightwc.h
@@ -1,4 +1,4 @@
-/* Copyright (C) 1996-2001,2003,2004,2005,2007 Free Software Foundation, Inc.
+/* Copyright (C) 1996-2001,2003,2004,2005,2007,2011 Free Software Foundation, Inc.
This file is part of the GNU C Library.
Written by Ulrich Drepper, <drepper@cygnus.com>.
@@ -20,7 +20,7 @@
/* Find index of weight. */
auto inline int32_t
__attribute ((always_inline))
-findidx (const wint_t **cpp)
+findidx (const wint_t **cpp, size_t len)
{
wint_t ch = *(*cpp)++;
int32_t i = __collidx_table_lookup ((const char *) table, ch);
@@ -32,6 +32,7 @@ findidx (const wint_t **cpp)
/* Oh well, more than one sequence starting with this byte.
Search for the correct one. */
const int32_t *cp = (const int32_t *) &extra[-i];
+ --len;
while (1)
{
size_t nhere;
@@ -54,7 +55,7 @@ findidx (const wint_t **cpp)
already. */
size_t cnt;
- for (cnt = 0; cnt < nhere; ++cnt)
+ for (cnt = 0; cnt < nhere && cnt < len; ++cnt)
if (cp[cnt] != usrc[cnt])
break;
@@ -75,7 +76,7 @@ findidx (const wint_t **cpp)
size_t cnt;
size_t offset;
- for (cnt = 0; cnt < nhere - 1; ++cnt)
+ for (cnt = 0; cnt < nhere - 1 && cnt < len; ++cnt)
if (cp[cnt] != usrc[cnt])
break;
diff --git a/posix/fnmatch_loop.c b/posix/fnmatch_loop.c
index 18a6667..72bd3ee 100644
--- a/posix/fnmatch_loop.c
+++ b/posix/fnmatch_loop.c
@@ -412,7 +412,7 @@ FCT (pattern, string, string_end, no_leading_period, flags, ends, alloca_used)
_NL_CURRENT (LC_COLLATE, _NL_COLLATE_INDIRECTMB);
# endif
- idx = findidx (&cp);
+ idx = findidx (&cp, 1);
if (idx != 0)
{
/* We found a table entry. Now see whether the
@@ -422,7 +422,7 @@ FCT (pattern, string, string_end, no_leading_period, flags, ends, alloca_used)
int32_t idx2;
const UCHAR *np = (const UCHAR *) n;
- idx2 = findidx (&np);
+ idx2 = findidx (&np, string_end - n);
if (idx2 != 0
&& (idx >> 24) == (idx2 >> 24)
&& len == weights[idx2 & 0xffffff])
diff --git a/posix/regcomp.c b/posix/regcomp.c
index b238c08..34ee845 100644
--- a/posix/regcomp.c
+++ b/posix/regcomp.c
@@ -1,5 +1,5 @@
/* Extended regular expression matching and search library.
- Copyright (C) 2002-2007,2009,2010 Free Software Foundation, Inc.
+ Copyright (C) 2002-2007,2009,2010,2011 Free Software Foundation, Inc.
This file is part of the GNU C Library.
Contributed by Isamu Hasegawa <isamu@yamato.ibm.com>.
@@ -3409,19 +3409,18 @@ build_equiv_class (bitset_t sbcset, const unsigned char *name)
_NL_COLLATE_EXTRAMB);
indirect = (const int32_t *) _NL_CURRENT (LC_COLLATE,
_NL_COLLATE_INDIRECTMB);
- idx1 = findidx (&cp);
- if (BE (idx1 == 0 || cp < name + strlen ((const char *) name), 0))
+ idx1 = findidx (&cp, -1);
+ if (BE (idx1 == 0 || *cp != '\0', 0))
/* This isn't a valid character. */
return REG_ECOLLATE;
/* Build single byte matcing table for this equivalence class. */
- char_buf[1] = (unsigned char) '\0';
len = weights[idx1 & 0xffffff];
for (ch = 0; ch < SBC_MAX; ++ch)
{
char_buf[0] = ch;
cp = char_buf;
- idx2 = findidx (&cp);
+ idx2 = findidx (&cp, 1);
/*
idx2 = table[ch];
*/
--- a/posix/regex_internal.h 2011-11-30 12:47:02.706567482 -0700
+++ a/posix/regex_internal.h 2011-11-30 12:47:32.969558337 -0700
@@ -756,7 +756,7 @@
indirect = (const int32_t *) _NL_CURRENT (LC_COLLATE,
_NL_COLLATE_INDIRECTMB);
p = pstr->mbs + idx;
- tmp = findidx (&p);
+ tmp = findidx (&p, pstr->len - idx);
return p - pstr->mbs - idx;
}
else
diff --git a/posix/regexec.c b/posix/regexec.c
index 9e0c565..3ea810b 100644
--- a/posix/regexec.c
+++ b/posix/regexec.c
@@ -3924,7 +3924,7 @@ check_node_accept_bytes (const re_dfa_t *dfa, int node_idx,
_NL_CURRENT (LC_COLLATE, _NL_COLLATE_EXTRAMB);
indirect = (const int32_t *)
_NL_CURRENT (LC_COLLATE, _NL_COLLATE_INDIRECTMB);
- int32_t idx = findidx (&cp);
+ int32_t idx = findidx (&cp, elem_len);
if (idx > 0)
for (i = 0; i < cset->nequiv_classes; ++i)
{
diff --git a/string/strcoll_l.c b/string/strcoll_l.c
index d8d1139..fb77d08 100644
--- a/string/strcoll_l.c
+++ b/string/strcoll_l.c
@@ -1,4 +1,4 @@
-/* Copyright (C) 1995-1997,2002,2004,2007,2010 Free Software Foundation, Inc.
+/* Copyright (C) 1995-1997,2002,2004,2007,2010,2011 Free Software Foundation, Inc.
This file is part of the GNU C Library.
Written by Ulrich Drepper <drepper@gnu.org>, 1995.
@@ -205,7 +205,7 @@ STRCOLL (s1, s2, l)
while (*us1 != L('\0'))
{
- int32_t tmp = findidx (&us1);
+ int32_t tmp = findidx (&us1, -1);
rule1arr[idx1max] = tmp >> 24;
idx1arr[idx1max] = tmp & 0xffffff;
idx1cnt = idx1max++;
@@ -267,7 +267,7 @@ STRCOLL (s1, s2, l)
while (*us2 != L('\0'))
{
- int32_t tmp = findidx (&us2);
+ int32_t tmp = findidx (&us2, -1);
rule2arr[idx2max] = tmp >> 24;
idx2arr[idx2max] = tmp & 0xffffff;
idx2cnt = idx2max++;
diff --git a/string/strxfrm_l.c b/string/strxfrm_l.c
index 220253c..b06556d 100644
--- a/string/strxfrm_l.c
+++ b/string/strxfrm_l.c
@@ -176,7 +176,7 @@ STRXFRM (STRING_TYPE *dest, const STRING_TYPE *src, size_t n, __locale_t l)
idxmax = 0;
do
{
- int32_t tmp = findidx (&usrc);
+ int32_t tmp = findidx (&usrc, -1);
rulearr[idxmax] = tmp >> 24;
idxarr[idxmax] = tmp & 0xffffff;

22
glibc-rh770439.patch Normal file
View file

@ -0,0 +1,22 @@
2012-02-08 Rakesh Pandit <rakesh@fedoraproject.org>
* locales/ks_IN@devanagari: Fix week day names.
--- a/localedata/locales/ks_IN@devanagari
+++ a/localedata/locales/ks_IN@devanagari
@@ -64,11 +64,11 @@ abday "<U0906><U0925><U094D>";/
"<U092C><U091F>"
%
% Full weekday names (%A)
-day "<U0906><U0925><U094D><U094D><U0935><U093E><U0930><U094D>";/
+day "<U0906><U0925><U094D><U0935><U093E><U0930><U094D>";/
"<U091A><U0928><U094D><U0926><U094D><U0930><U0935><U093E><U0930><U094D>";/
- "<U092C><U094B><U092E><U094D><U0935><U093E><U0930><U0940><U094D>";/
- "<U092C><U094B><U0918><U0935><U093E><U0930><U0940><U094D>";/
- "<U092C><U094D><U0930><U0938><U094D><U094D><U0935><U093E><U0930><U094D>";/
+ "<U092C><U094B><U092E><U094D><U0935><U093E><U0930><U094D>";/
+ "<U092C><U094B><U0918><U0935><U093E><U0930><U094D>";/
+ "<U092C><U094D><U0930><U0938><U094D><U0935><U093E><U0930><U094D>";/
"<U091C><U0941><U092E><U093E><U0939><U094D>";/
"<U092C><U091F><U0935><U093E><U0930><U094D>"
%

121
glibc-rh770869.patch Normal file
View file

@ -0,0 +1,121 @@
diff -rup a/fedora/nscd.service b/fedora/nscd.service
--- a/fedora/nscd.service 2011-10-19 05:04:41.000000000 -0600
+++ b/fedora/nscd.service 2012-02-03 13:40:37.070063851 -0700
@@ -3,16 +3,15 @@ Description=Name Service Cache Daemon
After=syslog.target
[Service]
-Type=forking
EnvironmentFile=-/etc/sysconfig/nscd
-ExecStart=/usr/sbin/nscd $NSCD_OPTIONS
+ExecStart=/usr/sbin/nscd --foreground $NSCD_OPTIONS
ExecStop=/usr/sbin/nscd --shutdown
ExecReload=/usr/sbin/nscd -i passwd
ExecReload=/usr/sbin/nscd -i group
ExecReload=/usr/sbin/nscd -i hosts
-ExecReload=/usr/sbin/nscd -i service
+ExecReload=/usr/sbin/nscd -i services
+ExecReload=/usr/sbin/nscd -i netgroup
Restart=always
-PIDFile=/run/nscd/nscd.pid
[Install]
WantedBy=multi-user.target
diff -rup a/nscd/nscd.c b/nscd/nscd.c
--- a/nscd/nscd.c 2012-01-01 05:16:32.000000000 -0700
+++ b/nscd/nscd.c 2012-02-03 13:07:50.509740586 -0700
@@ -72,7 +72,12 @@ thread_info_t thread_info;
int do_shutdown;
int disabled_passwd;
int disabled_group;
-int go_background = 1;
+
+/* Default is to daemonize. Set to 1 to run in foreground in
+ debugging mode, or negative to run in foreground but otherwise
+ behave like a daemon, i.e., detach from terminal and use
+ syslog. */
+static int run_in_foreground = 0;
static const char *conffile = _PATH_NSCDCONF;
@@ -104,6 +109,8 @@ static const struct argp_option options[
N_("Read configuration data from NAME") },
{ "debug", 'd', NULL, 0,
N_("Do not fork and display messages on the current tty") },
+ { "foreground", 'F', NULL, 0,
+ N_("Do not fork, but otherwise behave like a deamon") },
{ "nthreads", 't', N_("NUMBER"), 0, N_("Start NUMBER threads") },
{ "shutdown", 'K', NULL, 0, N_("Shut the server down") },
{ "statistics", 'g', NULL, 0, N_("Print current configuration statistics") },
@@ -174,16 +181,22 @@ main (int argc, char **argv)
/* Determine page size. */
pagesize_m1 = getpagesize () - 1;
- /* Behave like a daemon. */
- if (go_background)
+ if (run_in_foreground <= 0)
{
int i;
+ pid_t pid;
- pid_t pid = fork ();
- if (pid == -1)
- error (EXIT_FAILURE, errno, _("cannot fork"));
- if (pid != 0)
- exit (0);
+ /* Behave like a daemon. */
+ if (!run_in_foreground)
+ {
+ pid = fork ();
+ if (pid == -1)
+ error (EXIT_FAILURE, errno, _("cannot fork"));
+ if (pid != 0)
+ exit (0);
+ }
+ else
+ fprintf (stderr, _("further output sent to syslog\n"));
int nullfd = open (_PATH_DEVNULL, O_RDWR);
if (nullfd != -1)
@@ -234,11 +247,14 @@ main (int argc, char **argv)
for (i = min_close_fd; i < getdtablesize (); i++)
close (i);
- pid = fork ();
- if (pid == -1)
- error (EXIT_FAILURE, errno, _("cannot fork"));
- if (pid != 0)
- exit (0);
+ if (!run_in_foreground)
+ {
+ pid = fork ();
+ if (pid == -1)
+ error (EXIT_FAILURE, errno, _("cannot fork"));
+ if (pid != 0)
+ exit (0);
+ }
setsid ();
@@ -260,7 +276,7 @@ main (int argc, char **argv)
signal (SIGTSTP, SIG_IGN);
}
else
- /* In foreground mode we are not paranoid. */
+ /* In debug mode we are not paranoid. */
paranoia = 0;
signal (SIGINT, termination_handler);
@@ -309,7 +325,11 @@ parse_opt (int key, char *arg, struct ar
{
case 'd':
++debug_level;
- go_background = 0;
+ run_in_foreground = 1;
+ break;
+
+ case 'F':
+ run_in_foreground = -1;
break;
case 'f':

12
glibc-rh783979.patch Normal file
View file

@ -0,0 +1,12 @@
diff -rup a/sysdeps/powerpc/powerpc64/Makefile b/sysdeps/powerpc/powerpc64/Makefile
--- a/sysdeps/powerpc/powerpc64/Makefile 2012-02-01 09:34:07.018768021 -0700
+++ b/sysdeps/powerpc/powerpc64/Makefile 2012-02-01 09:35:28.813356195 -0700
@@ -31,7 +31,7 @@ elide-routines.os += hp-timing
ifneq ($(elf),no)
# The initfini generation code doesn't work in the presence of -fPIC, so
# we use -fpic instead which is much better.
-CFLAGS-initfini.s += -fpic -O1
+CFLAGS-initfini.s += -fpic -O1 -fno-inline
endif
CFLAGS-libc-start.c += -fno-asynchronous-unwind-tables
endif

144
glibc-rh784402.patch Normal file
View file

@ -0,0 +1,144 @@
commit 3e1aa84e7f9f38815f5db9cd7654b1a9497cf6e4
Author: Ulrich Drepper <drepper@gmail.com>
Date: Fri Jan 20 22:39:54 2012 -0500
Do not cache negative results in nscd if these are transient
diff --git a/nscd/aicache.c b/nscd/aicache.c
index aaaf80d..e1f1244 100644
--- a/nscd/aicache.c
+++ b/nscd/aicache.c
@@ -1,5 +1,5 @@
/* Cache handling for host lookup.
- Copyright (C) 2004-2008, 2009, 2010, 2011 Free Software Foundation, Inc.
+ Copyright (C) 2004-2008, 2009, 2010, 2011, 2012 Free Software Foundation, Inc.
This file is part of the GNU C Library.
Contributed by Ulrich Drepper <drepper@redhat.com>, 2004.
@@ -514,8 +514,9 @@ next_nip:
if (fd != -1)
TEMP_FAILURE_RETRY (send (fd, &notfound, total, MSG_NOSIGNAL));
- /* If we cannot permanently store the result, so be it. */
- if (__builtin_expect (db->negtimeout == 0, 0))
+ /* If we have a transient error or cannot permanently store the
+ result, so be it. */
+ if (rc4 == EAGAIN || __builtin_expect (db->negtimeout == 0, 0))
{
/* Mark the old entry as obsolete. */
if (dh != NULL)
diff --git a/nscd/grpcache.c b/nscd/grpcache.c
index e9607c6..a698f36 100644
--- a/nscd/grpcache.c
+++ b/nscd/grpcache.c
@@ -1,5 +1,5 @@
/* Cache handling for group lookup.
- Copyright (C) 1998-2008, 2009, 2011 Free Software Foundation, Inc.
+ Copyright (C) 1998-2008, 2009, 2011, 2012 Free Software Foundation, Inc.
This file is part of the GNU C Library.
Contributed by Ulrich Drepper <drepper@cygnus.com>, 1998.
@@ -120,8 +120,9 @@ cache_addgr (struct database_dyn *db, int fd, request_header *req,
else
written = total;
- /* If we cannot permanently store the result, so be it. */
- if (db->negtimeout == 0)
+ /* If we have a transient error or cannot permanently store
+ the result, so be it. */
+ if (errno == EAGAIN || __builtin_expect (db->negtimeout == 0, 0))
{
/* Mark the old entry as obsolete. */
if (dh != NULL)
diff --git a/nscd/hstcache.c b/nscd/hstcache.c
index 4d68ade..c72feaa 100644
--- a/nscd/hstcache.c
+++ b/nscd/hstcache.c
@@ -1,5 +1,5 @@
/* Cache handling for host lookup.
- Copyright (C) 1998-2008, 2009, 2011 Free Software Foundation, Inc.
+ Copyright (C) 1998-2008, 2009, 2011, 2012 Free Software Foundation, Inc.
This file is part of the GNU C Library.
Contributed by Ulrich Drepper <drepper@cygnus.com>, 1998.
@@ -141,8 +141,9 @@ cache_addhst (struct database_dyn *db, int fd, request_header *req,
MSG_NOSIGNAL)) != total)
all_written = false;
- /* If we cannot permanently store the result, so be it. */
- if (__builtin_expect (db->negtimeout == 0, 0))
+ /* If we have a transient error or cannot permanently store
+ the result, so be it. */
+ if (errval == EAGAIN || __builtin_expect (db->negtimeout == 0, 0))
{
/* Mark the old entry as obsolete. */
if (dh != NULL)
diff --git a/nscd/initgrcache.c b/nscd/initgrcache.c
index 4ac9942..2019991 100644
--- a/nscd/initgrcache.c
+++ b/nscd/initgrcache.c
@@ -1,5 +1,5 @@
/* Cache handling for host lookup.
- Copyright (C) 2004-2006, 2008, 2009, 2011 Free Software Foundation, Inc.
+ Copyright (C) 2004-2006, 2008, 2009, 2011, 2012 Free Software Foundation, Inc.
This file is part of the GNU C Library.
Contributed by Ulrich Drepper <drepper@redhat.com>, 2004.
@@ -202,8 +202,9 @@ addinitgroupsX (struct database_dyn *db, int fd, request_header *req,
written = TEMP_FAILURE_RETRY (send (fd, &notfound, total,
MSG_NOSIGNAL));
- /* If we cannot permanently store the result, so be it. */
- if (__builtin_expect (db->negtimeout == 0, 0))
+ /* If we have a transient error or cannot permanently store
+ the result, so be it. */
+ if (all_tryagain || __builtin_expect (db->negtimeout == 0, 0))
{
/* Mark the old entry as obsolete. */
if (dh != NULL)
diff --git a/nscd/pwdcache.c b/nscd/pwdcache.c
index 49e130c..e2ba09d 100644
--- a/nscd/pwdcache.c
+++ b/nscd/pwdcache.c
@@ -1,5 +1,5 @@
/* Cache handling for passwd lookup.
- Copyright (C) 1998-2008, 2009, 2011 Free Software Foundation, Inc.
+ Copyright (C) 1998-2008, 2009, 2011, 2012 Free Software Foundation, Inc.
This file is part of the GNU C Library.
Contributed by Ulrich Drepper <drepper@cygnus.com>, 1998.
@@ -124,8 +124,9 @@ cache_addpw (struct database_dyn *db, int fd, request_header *req,
written = TEMP_FAILURE_RETRY (send (fd, &notfound, total,
MSG_NOSIGNAL));
- /* If we cannot permanently store the result, so be it. */
- if (__builtin_expect (db->negtimeout == 0, 0))
+ /* If we have a transient error or cannot permanently store
+ the result, so be it. */
+ if (errno == EAGAIN || __builtin_expect (db->negtimeout == 0, 0))
{
/* Mark the old entry as obsolete. */
if (dh != NULL)
diff --git a/nscd/servicescache.c b/nscd/servicescache.c
index d3d5dce..a6337e3 100644
--- a/nscd/servicescache.c
+++ b/nscd/servicescache.c
@@ -1,5 +1,5 @@
/* Cache handling for services lookup.
- Copyright (C) 2007, 2008, 2009, 2011 Free Software Foundation, Inc.
+ Copyright (C) 2007, 2008, 2009, 2011, 2012 Free Software Foundation, Inc.
This file is part of the GNU C Library.
Contributed by Ulrich Drepper <drepper@drepper.com>, 2007.
@@ -108,8 +108,9 @@ cache_addserv (struct database_dyn *db, int fd, request_header *req,
written = TEMP_FAILURE_RETRY (send (fd, &notfound, total,
MSG_NOSIGNAL));
- /* If we cannot permanently store the result, so be it. */
- if (__builtin_expect (db->negtimeout == 0, 0))
+ /* If we have a transient error or cannot permanently store
+ the result, so be it. */
+ if (errval == EAGAIN || __builtin_expect (db->negtimeout == 0, 0))
{
/* Mark the old entry as obsolete. */
if (dh != NULL)

12
glibc-rh787201.patch Normal file
View file

@ -0,0 +1,12 @@
diff -rup a/fedora/glibc.spec.in b/fedora/glibc.spec.in
--- a/fedora/glibc.spec.in 2011-10-19 05:04:41.000000000 -0600
+++ b/fedora/glibc.spec.in 2012-02-03 09:26:36.669828253 -0700
@@ -316,7 +316,7 @@ GCC="gcc -m64"
GXX="g++ -m64"
%endif
%ifarch ppc64
-BuildFlags="-mno-minimal-toc"
+BuildFlags=
GCC="gcc -m64"
GXX="g++ -m64"
%endif

12
glibc-rh789209.patch Normal file
View file

@ -0,0 +1,12 @@
diff -rup a/localedata/locales/uk_UA b/localedata/locales/uk_UA
--- a/localedata/locales/uk_UA 2012-01-01 05:16:32.000000000 -0700
+++ b/localedata/locales/uk_UA 2012-02-09 22:32:36.864134146 -0700
@@ -700,7 +700,7 @@ LC_MONETARY
% 200 hrv. - 200 hryven (money)
% the local currency symbol
-currency_symbol "<U0433><U0440>" % hr (hryvnya)
+currency_symbol "<U0433><U0440><U043D><U002E>" % hr (hryvnya)
% This must be a 4-character string containing the international currency
% symbol as defined by the ISO 4217 standard (three characters) followed

567
glibc-stap.patch Normal file
View file

@ -0,0 +1,567 @@
diff -Nrup a/scripts/check-local-headers.sh b/scripts/check-local-headers.sh
--- a/scripts/check-local-headers.sh 2012-01-01 05:16:32.000000000 -0700
+++ b/scripts/check-local-headers.sh 2012-01-01 20:41:26.683439836 -0700
@@ -29,7 +29,7 @@ exec ${AWK} -v includedir="$includedir"
BEGIN {
status = 0
exclude = "^" includedir \
- "/(asm[-/]|linux/|selinux/|gd|nss3/|sys/capability\\.h|libaudit\\.h)"
+ "/(asm[-/]|linux/|selinux/|gd|nss3/|sys/capability\\.h|libaudit\\.h|sys/sdt(-config)?\\.h))"
}
/^[^ ]/ && $1 ~ /.*:/ { obj = $1 }
{
diff -Nrup a/sysdeps/i386/__longjmp.S b/sysdeps/i386/__longjmp.S
--- a/sysdeps/i386/__longjmp.S 2012-01-01 05:16:32.000000000 -0700
+++ b/sysdeps/i386/__longjmp.S 2012-01-01 20:41:26.686439835 -0700
@@ -1,5 +1,5 @@
/* longjmp for i386.
- Copyright (C) 1995-1998,2000,2002,2005,2006,2009
+ Copyright (C) 1995-1998,2000,2002,2005,2006,2009,2011
Free Software Foundation, Inc.
This file is part of the GNU C Library.
@@ -21,6 +21,7 @@
#include <sysdep.h>
#include <jmpbuf-offsets.h>
#include <asm-syntax.h>
+#include <stap-probe.h>
.text
ENTRY (__longjmp)
@@ -33,6 +34,7 @@ ENTRY (__longjmp)
movl (JB_SP*4)(%eax), %ecx
PTR_DEMANGLE (%edx)
PTR_DEMANGLE (%ecx)
+ LIBC_PROBE (longjmp, 3, 4@%eax, -4@8(%esp), 4@%edx)
cfi_def_cfa(%eax, 0)
cfi_register(%eip, %edx)
cfi_register(%esp, %ecx)
@@ -50,6 +52,7 @@ ENTRY (__longjmp)
cfi_restore(%edi)
cfi_restore(%ebp)
+ LIBC_PROBE (longjmp_target, 3, 4@%eax, -4@8(%esp), 4@%edx)
movl 8(%esp), %eax /* Second argument is return value. */
movl %ecx, %esp
#else
@@ -57,12 +60,14 @@ ENTRY (__longjmp)
movl 8(%esp), %eax /* Second argument is return value. */
/* Save the return address now. */
movl (JB_PC*4)(%ecx), %edx
+ LIBC_PROBE (longjmp, 3, 4@%ecx, -4@%eax, 4@%edx)
/* Restore registers. */
movl (JB_BX*4)(%ecx), %ebx
movl (JB_SI*4)(%ecx), %esi
movl (JB_DI*4)(%ecx), %edi
movl (JB_BP*4)(%ecx), %ebp
movl (JB_SP*4)(%ecx), %esp
+ LIBC_PROBE (longjmp_target, 3, 4@%ecx, -4@%ecx, 4@%edx)
#endif
/* Jump to saved PC. */
jmp *%edx
diff -Nrup a/sysdeps/i386/bsd-_setjmp.S b/sysdeps/i386/bsd-_setjmp.S
--- a/sysdeps/i386/bsd-_setjmp.S 2012-01-01 05:16:32.000000000 -0700
+++ b/sysdeps/i386/bsd-_setjmp.S 2012-01-01 20:41:26.686439835 -0700
@@ -1,5 +1,6 @@
/* BSD `_setjmp' entry point to `sigsetjmp (..., 0)'. i386 version.
- Copyright (C) 1994-1997,2000-2002,2005, 2006 Free Software Foundation, Inc.
+ Copyright (C) 1994-1997,2000-2002,2005,2006,2011
+ 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
@@ -25,6 +26,7 @@
#include <jmpbuf-offsets.h>
#include "bp-sym.h"
#include "bp-asm.h"
+#include <stap-probe.h>
#define PARMS LINKAGE /* no space for saved regs */
#define JMPBUF PARMS
@@ -47,6 +49,7 @@ ENTRY (BP_SYM (_setjmp))
#endif
movl %ecx, (JB_SP*4)(%edx)
movl PCOFF(%esp), %ecx /* Save PC we are returning to now. */
+ LIBC_PROBE (setjmp, 3, 4@%edx, -4@$0, 4@%ecx)
#ifdef PTR_MANGLE
PTR_MANGLE (%ecx)
#endif
diff -Nrup a/sysdeps/i386/bsd-setjmp.S b/sysdeps/i386/bsd-setjmp.S
--- a/sysdeps/i386/bsd-setjmp.S 2012-01-01 05:16:32.000000000 -0700
+++ b/sysdeps/i386/bsd-setjmp.S 2012-01-01 20:41:26.687439834 -0700
@@ -1,5 +1,6 @@
/* BSD `setjmp' entry point to `sigsetjmp (..., 1)'. i386 version.
- Copyright (C) 1994-1997,2000,2001,2005, 2006 Free Software Foundation, Inc.
+ Copyright (C) 1994-1997,2000,2001,2005,2006,2011
+ 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
@@ -25,6 +26,7 @@
#include <jmpbuf-offsets.h>
#include "bp-sym.h"
#include "bp-asm.h"
+#include <stap-probe.h>
#define PARMS LINKAGE /* no space for saved regs */
#define JMPBUF PARMS
@@ -49,6 +51,7 @@ ENTRY (BP_SYM (setjmp))
#endif
movl %ecx, (JB_SP*4)(%eax)
movl PCOFF(%esp), %ecx /* Save PC we are returning to now. */
+ LIBC_PROBE (setjmp, 3, 4@%eax, -4@$1, 4@%ecx)
#ifdef PTR_MANGLE
PTR_MANGLE (%ecx)
#endif
diff -Nrup a/sysdeps/i386/setjmp.S b/sysdeps/i386/setjmp.S
--- a/sysdeps/i386/setjmp.S 2012-01-01 05:16:32.000000000 -0700
+++ b/sysdeps/i386/setjmp.S 2012-01-01 20:41:26.687439834 -0700
@@ -1,5 +1,5 @@
/* setjmp for i386.
- Copyright (C) 1995,1996,1997,2000,2001,2005,2006
+ Copyright (C) 1995,1996,1997,2000,2001,2005,2006,2011
Free Software Foundation, Inc.
This file is part of the GNU C Library.
@@ -23,6 +23,7 @@
#include <asm-syntax.h>
#include "bp-sym.h"
#include "bp-asm.h"
+#include <stap-probe.h>
#define PARMS LINKAGE /* no space for saved regs */
#define JMPBUF PARMS
@@ -44,6 +45,7 @@ ENTRY (BP_SYM (__sigsetjmp))
#endif
movl %ecx, (JB_SP*4)(%eax)
movl PCOFF(%esp), %ecx /* Save PC we are returning to now. */
+ LIBC_PROBE (setjmp, 3, 4@%eax, -4@SIGMSK(%esp), 4@%ecx)
#ifdef PTR_MANGLE
PTR_MANGLE (%ecx)
#endif
diff -Nrup a/sysdeps/unix/sysv/linux/i386/____longjmp_chk.S b/sysdeps/unix/sysv/linux/i386/____longjmp_chk.S
--- a/sysdeps/unix/sysv/linux/i386/____longjmp_chk.S 2012-01-01 05:16:32.000000000 -0700
+++ b/sysdeps/unix/sysv/linux/i386/____longjmp_chk.S 2012-01-01 20:41:26.699439832 -0700
@@ -1,4 +1,5 @@
-/* Copyright (C) 2001,2004,2005,2006,2009 Free Software Foundation, Inc.
+/* Copyright (C) 2001,2004,2005,2006,2009,2011
+ 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
@@ -19,6 +20,7 @@
#include <sysdep.h>
#include <jmpbuf-offsets.h>
#include <asm-syntax.h>
+#include <stap-probe.h>
.section .rodata.str1.1,"aMS",@progbits,1
@@ -79,7 +81,9 @@ ENTRY (____longjmp_chk)
cfi_adjust_cfa_offset(-12)
movl 4(%esp), %ecx
-.Lok: /* We add unwind information for the target here. */
+.Lok:
+ LIBC_PROBE (longjmp, 3, 4@%ecx, -4@8(%esp), 4@%edx)
+ /* We add unwind information for the target here. */
cfi_def_cfa(%ecx, 0)
cfi_register(%eip, %edx)
cfi_register(%esp, %edi)
@@ -102,5 +106,6 @@ ENTRY (____longjmp_chk)
cfi_restore(%ebp)
/* Jump to saved PC. */
+ LIBC_PROBE (longjmp_target, 3, 4@%ecx, -4@%eax, 4@%edx)
jmp *%edx
END (____longjmp_chk)
diff -Nrup a/sysdeps/unix/sysv/linux/x86_64/____longjmp_chk.S b/sysdeps/unix/sysv/linux/x86_64/____longjmp_chk.S
--- a/sysdeps/unix/sysv/linux/x86_64/____longjmp_chk.S 2012-01-01 05:16:32.000000000 -0700
+++ b/sysdeps/unix/sysv/linux/x86_64/____longjmp_chk.S 2012-01-01 20:41:26.703439831 -0700
@@ -19,6 +19,7 @@
#include <sysdep.h>
#include <jmpbuf-offsets.h>
#include <asm-syntax.h>
+#include <stap-probe.h>
.section .rodata.str1.1,"aMS",@progbits,1
.type longjmp_msg,@object
@@ -94,7 +95,9 @@ ENTRY(____longjmp_chk)
movl %ebx, %esi
cfi_restore (%rsi)
-.Lok: /* We add unwind information for the target here. */
+.Lok:
+ LIBC_PROBE (longjmp, 3, 8@%rdi, -4@%esi, 8@%rdx)
+ /* We add unwind information for the target here. */
cfi_def_cfa(%rdi, 0)
cfi_register(%rsp,%r8)
cfi_register(%rbp,%r9)
@@ -113,5 +116,6 @@ ENTRY(____longjmp_chk)
movl %esi, %eax
movq %r8,%rsp
movq %r9,%rbp
+ LIBC_PROBE (longjmp_target, 3, 8@%rdi, -4@%eax, 8@%rdx)
jmpq *%rdx
END (____longjmp_chk)
diff -Nrup a/sysdeps/x86_64/__longjmp.S b/sysdeps/x86_64/__longjmp.S
--- a/sysdeps/x86_64/__longjmp.S 2012-01-01 05:16:32.000000000 -0700
+++ b/sysdeps/x86_64/__longjmp.S 2012-01-01 20:41:26.703439831 -0700
@@ -1,4 +1,4 @@
-/* Copyright (C) 2001,2004,2005,2006,2009 Free Software Foundation, Inc.
+/* Copyright (C) 2001,2004,2005,2006,2009,2011 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
@@ -19,6 +19,7 @@
#include <sysdep.h>
#include <jmpbuf-offsets.h>
#include <asm-syntax.h>
+#include <stap-probe.h>
/* Jump to the position specified by ENV, causing the
setjmp call there to return VAL, or 1 if VAL is 0.
@@ -34,6 +35,7 @@ ENTRY(__longjmp)
PTR_DEMANGLE (%r9)
PTR_DEMANGLE (%rdx)
#endif
+ LIBC_PROBE (longjmp, 3, 8@%rdi, -4@%esi, 8@%rdx)
/* We add unwind information for the target here. */
cfi_def_cfa(%rdi, 0)
cfi_register(%rsp,%r8)
@@ -53,5 +55,6 @@ ENTRY(__longjmp)
mov %esi, %eax
movq %r8,%rsp
movq %r9,%rbp
+ LIBC_PROBE (longjmp_target, 3, 8@%rdi, -4@%eax, 8@%rdx)
jmpq *%rdx
END (__longjmp)
diff -Nrup a/sysdeps/x86_64/setjmp.S b/sysdeps/x86_64/setjmp.S
--- a/sysdeps/x86_64/setjmp.S 2012-01-01 05:16:32.000000000 -0700
+++ b/sysdeps/x86_64/setjmp.S 2012-01-01 20:41:26.704439831 -0700
@@ -1,5 +1,5 @@
/* setjmp for x86-64.
- Copyright (C) 2001, 2003, 2005, 2006 Free Software Foundation, Inc.
+ Copyright (C) 2001,2003,2005,2006,2011 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
@@ -20,6 +20,7 @@
#include <sysdep.h>
#include <jmpbuf-offsets.h>
#include <asm-syntax.h>
+#include <stap-probe.h>
ENTRY (__sigsetjmp)
/* Save registers. */
@@ -41,6 +42,7 @@ ENTRY (__sigsetjmp)
#endif
movq %rdx, (JB_RSP*8)(%rdi)
movq (%rsp), %rax /* Save PC we are returning to now. */
+ LIBC_PROBE (setjmp, 3, 8@%rdi, -4@%esi, 8@%rax)
#ifdef PTR_MANGLE
PTR_MANGLE (%rax)
#endif
diff -Nrup a/include/stap-probe.h b/include/stap-probe.h
--- a/include/stap-probe.h 1969-12-31 17:00:00.000000000 -0700
+++ b/include/stap-probe.h 2012-01-01 20:41:26.646439841 -0700
@@ -0,0 +1,140 @@
+/* Macros for defining Systemtap <sys/sdt.h> static probe points.
+ Copyright (C) 2011 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. */
+
+#ifndef _STAP_PROBE_H
+#define _STAP_PROBE_H 1
+
+#ifdef USE_STAP_PROBE
+
+# include <sys/sdt.h>
+
+/* Our code uses one macro LIBC_PROBE (name, n, arg1, ..., argn).
+
+ Without USE_STAP_PROBE, that does nothing but evaluates all
+ its arguments (to prevent bit rot, unlike e.g. assert).
+
+ Systemtap's header defines the macros STAP_PROBE (provider, name) and
+ STAP_PROBEn (provider, name, arg1, ..., argn). For "provider" we paste
+ in the IN_LIB name (libc, libpthread, etc.) automagically. */
+
+# ifndef NOT_IN_libc
+# define IN_LIB libc
+# elif !defined IN_LIB
+/* This is intentionally defined with extra unquoted commas in it so
+ that macro substitution will bomb out when it is used. We don't
+ just use #error here, so that this header can be included by
+ other headers that use LIBC_PROBE inside their own macros. We
+ only want such headers to fail to compile if those macros are
+ actually used in a context where IN_LIB has not been defined. */
+# define IN_LIB ,,,missing -DIN_LIB=... -- not extra-lib.mk?,,,
+# endif
+
+# define LIBC_PROBE(name, n, ...) \
+ LIBC_PROBE_1 (IN_LIB, name, n, ## __VA_ARGS__)
+
+# define LIBC_PROBE_1(lib, name, n, ...) \
+ STAP_PROBE##n (lib, name, ## __VA_ARGS__)
+
+# define STAP_PROBE0 STAP_PROBE
+
+# define LIBC_PROBE_ASM(name, template) \
+ STAP_PROBE_ASM (IN_LIB, name, template)
+
+# define LIBC_PROBE_ASM_OPERANDS STAP_PROBE_ASM_OPERANDS
+
+#else /* Not USE_STAP_PROBE. */
+
+# ifndef __ASSEMBLER__
+# define LIBC_PROBE(name, n, ...) DUMMY_PROBE##n (__VA_ARGS__)
+# else
+# define LIBC_PROBE(name, n, ...) /* Nothing. */
+# endif
+
+# define LIBC_PROBE_ASM(name, template) /* Nothing. */
+# define LIBC_PROBE_ASM_OPERANDS(n, ...) /* Nothing. */
+
+/* This silliness lets us evaluate all the arguments for each arity
+ of probe. My kingdom for a real macro system. */
+
+# define DUMMY_PROBE0() do {} while (0)
+# define DUMMY_PROBE1(a1) do {} while ((void) (a1), 0)
+# define DUMMY_PROBE2(a1, a2) do {} while ((void) (a1), \
+ (void) (a2), 0)
+# define DUMMY_PROBE3(a1, a2, a3) do {} while ((void) (a1), \
+ (void) (a2), \
+ (void) (a3), 0)
+# define DUMMY_PROBE4(a1, a2, a3, a4) do {} while ((void) (a1), \
+ (void) (a2), \
+ (void) (a3), \
+ (void) (a4), 0)
+# define DUMMY_PROBE5(a1, a2, a3, a4, a5) \
+ do {} while ((void) (a1), \
+ (void) (a2), \
+ (void) (a3), \
+ (void) (a4), \
+ (void) (a5), 0)
+# define DUMMY_PROBE6(a1, a2, a3, a4, a5, a6) \
+ do {} while ((void) (a1), \
+ (void) (a2), \
+ (void) (a3), \
+ (void) (a4), \
+ (void) (a5), \
+ (void) (a6), 0)
+# define DUMMY_PROBE7(a1, a2, a3, a4, a5, a6, a7) \
+ do {} while ((void) (a1), \
+ (void) (a2), \
+ (void) (a3), \
+ (void) (a4), \
+ (void) (a5), \
+ (void) (a6), \
+ (void) (a7), 0)
+# define DUMMY_PROBE8(a1, a2, a3, a4, a5, a6, a7, a8) \
+ do {} while ((void) (a1), \
+ (void) (a2), \
+ (void) (a3), \
+ (void) (a4), \
+ (void) (a5), \
+ (void) (a6), \
+ (void) (a7), \
+ (void) (a8), 0)
+# define DUMMY_PROBE9(a1, a2, a3, a4, a5, a6, a7, a8, a9) \
+ do {} while ((void) (a1), \
+ (void) (a2), \
+ (void) (a3), \
+ (void) (a4), \
+ (void) (a5), \
+ (void) (a6), \
+ (void) (a7), \
+ (void) (a8), \
+ (void) (a9), 0)
+# define DUMMY_PROBE10(a1, a2, a3, a4, a5, a6, a7, a8, a9, a10) \
+ do {} while ((void) (a1), \
+ (void) (a2), \
+ (void) (a3), \
+ (void) (a4), \
+ (void) (a5), \
+ (void) (a6), \
+ (void) (a7), \
+ (void) (a8), \
+ (void) (a9), \
+ (void) (a10), 0)
+
+#endif /* USE_STAP_PROBE. */
+
+#endif /* stap-probe.h */
diff -Nrup a/config.h.in b/config.h.in
--- a/config.h.in 2012-01-01 05:16:32.000000000 -0700
+++ b/config.h.in 2012-01-01 20:41:26.632439843 -0700
@@ -187,6 +187,9 @@
/* Define if `.ctors' and `.dtors' sections shouldn't be used. */
#undef NO_CTORS_DTORS_SECTIONS
+/* Define if Systemtap <sys/sdt.h> probes should be defined. */
+#undef USE_STAP_PROBE
+
/*
*/
diff -Nrup a/configure b/configure
--- a/configure 2012-01-01 20:40:50.423446105 -0700
+++ b/configure 2012-01-01 20:41:26.634439843 -0700
@@ -791,6 +791,7 @@ enable_kernel
enable_all_warnings
enable_multi_arch
enable_nss_crypt
+enable_systemtap
with_cpu
'
ac_precious_vars='build_alias
@@ -1450,6 +1451,7 @@ Optional Features:
--enable-multi-arch enable single DSO with optimizations for multiple
architectures
--enable-nss-crypt enable libcrypt to use nss
+ --enable-systemtap enable systemtap static probe points [default=no]
Optional Packages:
--with-PACKAGE[=ARG] use PACKAGE [ARG=yes]
@@ -3804,6 +3806,51 @@ else
fi
+# Check whether --enable-systemtap was given.
+if test "${enable_systemtap+set}" = set; then :
+ enableval=$enable_systemtap; systemtap=$enableval
+else
+ systemtap=no
+fi
+
+if test x$systemtap != xno; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for systemtap static probe support" >&5
+$as_echo_n "checking for systemtap static probe support... " >&6; }
+if test "${libc_cv_sdt+set}" = set; then :
+ $as_echo_n "(cached) " >&6
+else
+ old_CFLAGS="$CFLAGS"
+ CFLAGS="-std=gnu99 $CFLAGS"
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+#include <sys/sdt.h>
+void foo (int i, void *p)
+{
+ asm ("" STAP_PROBE_ASM (foo, bar, STAP_PROBE_ASM_TEMPLATE (2)) ""
+ :: STAP_PROBE_ASM_OPERANDS (2, i, p));
+}
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"; then :
+ libc_cv_sdt=yes
+else
+ libc_cv_sdt=no
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+ CFLAGS="$old_CFLAGS"
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $libc_cv_sdt" >&5
+$as_echo "$libc_cv_sdt" >&6; }
+ if test $libc_cv_sdt = yes; then
+ $as_echo "#define USE_STAP_PROBE 1" >>confdefs.h
+
+ else
+ { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
+$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
+as_fn_error $? "systemtap support needs sys/sdt.h with asm support
+See \`config.log' for more details" "$LINENO" 5; }
+ fi
+fi
+
# The way shlib-versions is used to generate soversions.mk uses a
# fairly simplistic model for name recognition that can't distinguish
# i486-pc-linux-gnu fully from i486-pc-gnu. So we mutate a $host_os
diff -Nrup a/configure.in b/configure.in
--- a/configure.in 2012-01-01 05:16:32.000000000 -0700
+++ b/configure.in 2012-01-01 20:41:26.635439843 -0700
@@ -290,6 +290,29 @@ else
fi
AC_SUBST(libc_cv_nss_crypt)
+AC_ARG_ENABLE([systemtap],
+ [AS_HELP_STRING([--enable-systemtap],
+ [enable systemtap static probe points @<:@default=no@:>@])],
+ [systemtap=$enableval],
+ [systemtap=no])
+if test x$systemtap != xno; then
+ AC_CACHE_CHECK([for systemtap static probe support], libc_cv_sdt, [dnl
+ old_CFLAGS="$CFLAGS"
+ CFLAGS="-std=gnu99 $CFLAGS"
+ AC_COMPILE_IFELSE([#include <sys/sdt.h>
+void foo (int i, void *p)
+{
+ asm ("" STAP_PROBE_ASM (foo, bar, STAP_PROBE_ASM_TEMPLATE (2)) ""
+ :: STAP_PROBE_ASM_OPERANDS (2, i, p));
+}], [libc_cv_sdt=yes], [libc_cv_sdt=no])
+ CFLAGS="$old_CFLAGS"])
+ if test $libc_cv_sdt = yes; then
+ AC_DEFINE([USE_STAP_PROBE])
+ else
+ AC_MSG_FAILURE([systemtap support needs sys/sdt.h with asm support])
+ fi
+fi
+
# The way shlib-versions is used to generate soversions.mk uses a
# fairly simplistic model for name recognition that can't distinguish
# i486-pc-linux-gnu fully from i486-pc-gnu. So we mutate a $host_os
diff -Nrup a/extra-lib.mk b/extra-lib.mk
--- a/extra-lib.mk 2012-01-01 05:16:32.000000000 -0700
+++ b/extra-lib.mk 2012-01-01 20:41:26.644439841 -0700
@@ -101,4 +101,4 @@ ifneq (,$(cpp-srcs-left))
include $(patsubst %,$(..)cppflags-iterator.mk,$(cpp-srcs-left))
endif
-CPPFLAGS-$(lib) := -DNOT_IN_libc=1 -DIS_IN_$(lib)=1
+CPPFLAGS-$(lib) := -DNOT_IN_libc=1 -DIS_IN_$(lib)=1 -DIN_LIB=$(lib)
diff -Nrup a/elf/Makefile b/elf/Makefile
--- a/elf/Makefile 2012-01-01 05:16:32.000000000 -0700
+++ b/elf/Makefile 2012-01-01 20:41:26.637439843 -0700
@@ -505,7 +506,8 @@ CFLAGS-ldconfig.c = $(SYSCONF-FLAGS) -D'
CFLAGS-dl-cache.c = $(SYSCONF-FLAGS)
CFLAGS-cache.c = $(SYSCONF-FLAGS)
-CPPFLAGS-.os += $(if $(filter $(@F),$(patsubst %,%.os,$(all-rtld-routines))),-DNOT_IN_libc=1 -DIS_IN_rtld=1)
+CPPFLAGS-.os += $(if $(filter $(@F),$(patsubst %,%.os,$(all-rtld-routines))),\
+ -DNOT_IN_libc=1 -DIS_IN_rtld=1 -DIN_LIB=rtld)
test-modules = $(addprefix $(objpfx),$(addsuffix .so,$(strip $(modules-names))))
generated += $(addsuffix .so,$(strip $(modules-names)))
diff -Nrup a/elf/rtld-Rules b/elf/rtld-Rules
--- a/elf/rtld-Rules 2012-01-01 05:16:32.000000000 -0700
+++ b/elf/rtld-Rules 2012-01-01 20:41:26.642439841 -0700
@@ -1,7 +1,7 @@
# Subroutine makefile for compiling libc modules linked into dynamic linker.
# Copyright (C) 2002,2003,2005,2006,2008,2010,2011
-# Free Software Foundation, Inc.
+# 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
@@ -131,6 +131,6 @@ ifdef rtld-depfiles
endif
# This here is the whole point of all the shenanigans.
-rtld-CPPFLAGS := -DNOT_IN_libc=1 -DIS_IN_rtld=1
+rtld-CPPFLAGS := -DNOT_IN_libc=1 -DIS_IN_rtld=1 -DIN_LIB=rtld
endif

28
glibc-sw13618-2.patch Normal file
View file

@ -0,0 +1,28 @@
diff -Nrup a/elf/dl-open.c b/elf/dl-open.c
--- a/elf/dl-open.c 2012-01-29 21:57:36.251660367 -0700
+++ b/elf/dl-open.c 2012-01-29 21:58:55.762694069 -0700
@@ -328,7 +328,7 @@ dl_open_worker (void *a)
while (l != NULL);
if (nmaps > 1)
{
- char seen[nmaps];
+ uint16_t seen[nmaps];
memset (seen, '\0', nmaps);
size_t i = 0;
while (1)
@@ -354,13 +354,13 @@ dl_open_worker (void *a)
(k - i) * sizeof (maps[0]));
maps[k] = thisp;
- if (seen[i + 1] > 1)
+ if (seen[i + 1] > nmaps - i)
{
++i;
goto next_clear;
}
- char this_seen = seen[i];
+ uint16_t this_seen = seen[i];
memmove (&seen[i], &seen[i + 1],
(k - i) * sizeof (seen[0]));
seen[k] = this_seen;

View file

@ -1,19 +1,65 @@
--- glibc-2.14-394-g8f3b1ff/ChangeLog.orig 2012-01-30 22:50:24.629092682 -0200
+++ glibc-2.14-394-g8f3b1ff/ChangeLog 2012-01-30 22:50:40.564160817 -0200
@@ -0,0 +1,11 @@
+2012-01-27 Ulrich Drepper <drepper@gmail.com>
diff -Nrup a/Makeconfig b/Makeconfig
--- a/Makeconfig 2012-01-29 21:44:43.010328202 -0700
+++ b/Makeconfig 2012-01-29 21:45:18.242344330 -0700
@@ -950,6 +950,12 @@ libdl =
endif
endif
+ifeq ($(build-shared),yes)
+libm = $(common-objpfx)math/libm.so$(libm.so-version)
+else
+libm = $(common-objpfx)math/libm.a
+endif
+
+ [BZ #13618]
+ * elf/dl-open.c (dl_open_worker): Sort objects by dependency before
+ relocation.
+ * Makeconfig (libm): Define.
+ * elf/Makefile: Add rules to build and run tst-relsort1.
+ * elf/tst-relsort1.c: New file.
+ * elf/tst-relsort1mod1.c: New file.
+ * elf/tst-relsort1mod2.c: New file.
# These are the subdirectories containing the library source. The order
# is more or less arbitrary. The sorting step will take care of the
# dependencies.
diff -Nrup a/elf/Makefile b/elf/Makefile
--- a/elf/Makefile 2012-01-29 21:44:43.087328238 -0700
+++ b/elf/Makefile 2012-01-29 21:45:18.880344622 -0700
@@ -124,7 +124,8 @@ distribute := rtld-Rules \
tst-initordera1.c tst-initordera2.c tst-initorderb1.c \
tst-initorderb2.c tst-initordera3.c tst-initordera4.c \
tst-initorder.c \
- tst-initorder2.c
+ tst-initorder2.c \
+ tst-relsort1.c tst-relsort1mod1.c tst-relsort1mod2.c
CFLAGS-dl-runtime.c = -fexceptions -fasynchronous-unwind-tables
CFLAGS-dl-lookup.c = -fexceptions -fasynchronous-unwind-tables
@@ -230,7 +231,7 @@ tests += loadtest restest1 preloadtest l
tst-audit1 tst-audit2 \
tst-stackguard1 tst-addr1 tst-thrlock \
tst-unique1 tst-unique2 tst-unique3 tst-unique4 \
- tst-initorder tst-initorder2
+ tst-initorder tst-initorder2 tst-relsort1
# reldep9
test-srcs = tst-pathopt
selinux-enabled := $(shell cat /selinux/enforce 2> /dev/null)
@@ -293,7 +294,9 @@ modules-names = testobj1 testobj2 testob
tst-initordera1 tst-initorderb1 \
tst-initordera2 tst-initorderb2 \
tst-initordera3 tst-initordera4 \
- tst-initorder2a tst-initorder2b tst-initorder2c tst-initorder2d
+ tst-initorder2a tst-initorder2b tst-initorder2c \
+ tst-initorder2d \
+ tst-relsort1mod1 tst-relsort1mod2
ifeq (yes,$(have-initfini-array))
modules-names += tst-array2dep tst-array5dep
endif
@@ -1199,3 +1202,9 @@ CFLAGS-tst-auditmod6b.c += $(AVX-CFLAGS)
CFLAGS-tst-auditmod6c.c += $(AVX-CFLAGS)
CFLAGS-tst-auditmod7b.c += $(AVX-CFLAGS)
endif
+
--- glibc-2.14-394-g8f3b1ff/elf/dl-open.c.orig 2012-01-30 22:47:43.012400604 -0200
+++ glibc-2.14-394-g8f3b1ff/elf/dl-open.c 2012-01-30 22:48:33.076615234 -0200
+$(objpfx)tst-relsort1: $(libdl)
+$(objpfx)tst-relsort1mod1.so: $(libm) $(objpfx)tst-relsort1mod2.so
+$(objpfx)tst-relsort1mod2.so: $(libm)
+$(objpfx)tst-relsort1.out: $(objpfx)tst-relsort1mod1.so \
+ $(objpfx)tst-relsort1mod2.so
diff -Nrup a/elf/dl-open.c b/elf/dl-open.c
--- a/elf/dl-open.c 2012-01-29 21:44:43.165328272 -0700
+++ b/elf/dl-open.c 2012-01-29 21:55:06.683599515 -0700
@@ -1,5 +1,5 @@
/* Load a shared object at runtime, relocate it, and run its initializer.
- Copyright (C) 1996-2007, 2009, 2010, 2011 Free Software Foundation, Inc.
@ -21,7 +67,7 @@
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
@@ -302,45 +302,109 @@ dl_open_worker (void *a)
@@ -304,53 +304,116 @@ dl_open_worker (void *a)
if (GLRO(dl_lazy))
reloc_mode |= mode & RTLD_LAZY;
@ -35,10 +81,11 @@
struct link_map *l = new;
- while (l->l_next)
- l = l->l_next;
- int relocation_in_progress = 0;
- while (1)
+ do
+ {
+ if (! l->l_real->l_relocated)
{
if (! l->l_real->l_relocated)
+ ++nmaps;
+ l = l->l_next;
+ }
@ -47,8 +94,8 @@
+ nmaps = 0;
+ l = new;
+ do
{
if (! l->l_real->l_relocated)
+ {
+ if (! l->l_real->l_relocated)
+ maps[nmaps++] = l;
+ l = l->l_next;
+ }
@ -60,8 +107,7 @@
+ size_t i = 0;
+ while (1)
{
-#ifdef SHARED
- if (__builtin_expect (GLRO(dl_profile) != NULL, 0))
- if (! relocation_in_progress)
+ ++seen[i];
+ struct link_map *thisp = maps[i];
+
@ -71,23 +117,9 @@
+ size_t k = nmaps - 1;
+ while (k > i)
{
- /* If this here is the shared object which we want to profile
- make sure the profile is started. We can find out whether
- this is necessary or not by observing the `_dl_profile_map'
- variable. If was NULL but is not NULL afterwars we must
- start the profiling. */
- struct link_map *old_profile_map = GL(dl_profile_map);
-
- _dl_relocate_object (l, l->l_scope, reloc_mode | RTLD_LAZY, 1);
-
- if (old_profile_map == NULL && GL(dl_profile_map) != NULL)
- {
- /* We must prepare the profiling. */
- _dl_start_profile ();
-
- /* Prevent unloading the object. */
- GL(dl_profile_map)->l_flags_1 |= DF_1_NODELETE;
- }
- /* Notify the debugger that relocations are about to happen. */
- LIBC_PROBE (rtld_reloc_start, 2, args->nsid, r);
- relocation_in_progress = 1;
+ struct link_map **runp = maps[k]->l_initfini;
+ if (runp != NULL)
+ /* Look through the dependencies of the object. */
@ -116,23 +148,28 @@
+
+ --k;
}
- else
-#endif
- _dl_relocate_object (l, l->l_scope, reloc_mode, 0);
+
+ if (++i == nmaps)
+ break;
+ next_clear:
+ memset (&seen[i], 0, (nmaps - i) * sizeof (seen[0]));
+ next:;
}
+ }
+ }
+
+ int relocation_in_progress = 0;
+ for (size_t i = nmaps; i-- > 0; )
+ {
+ l = maps[i];
+
+#ifdef SHARED
+ if (! relocation_in_progress)
+ {
+ /* Notify the debugger that relocations are about to happen. */
+ LIBC_PROBE (rtld-reloc_start, 2, args->nsid, r);
+ relocation_in_progress = 1;
+ }
#ifdef SHARED
- if (__builtin_expect (GLRO(dl_profile) != NULL, 0))
+ if (__builtin_expect (GLRO(dl_profile) != NULL, 0))
+ {
+ /* If this here is the shared object which we want to profile
@ -141,62 +178,51 @@
+ variable. If it was NULL but is not NULL afterwars we must
+ start the profiling. */
+ struct link_map *old_profile_map = GL(dl_profile_map);
- if (l == new)
- break;
- l = l->l_prev;
+
+ _dl_relocate_object (l, l->l_scope, reloc_mode | RTLD_LAZY, 1);
+
+ if (old_profile_map == NULL && GL(dl_profile_map) != NULL)
+ {
{
- /* If this here is the shared object which we want to profile
- make sure the profile is started. We can find out whether
- this is necessary or not by observing the `_dl_profile_map'
- variable. If was NULL but is not NULL afterwars we must
- start the profiling. */
- struct link_map *old_profile_map = GL(dl_profile_map);
-
- _dl_relocate_object (l, l->l_scope, reloc_mode | RTLD_LAZY, 1);
-
- if (old_profile_map == NULL && GL(dl_profile_map) != NULL)
- {
- /* We must prepare the profiling. */
- _dl_start_profile ();
-
- /* Prevent unloading the object. */
- GL(dl_profile_map)->l_flags_1 |= DF_1_NODELETE;
- }
+ /* We must prepare the profiling. */
+ _dl_start_profile ();
+
+ /* Prevent unloading the object. */
+ GL(dl_profile_map)->l_flags_1 |= DF_1_NODELETE;
+ }
+ }
}
- else
-#endif
- _dl_relocate_object (l, l->l_scope, reloc_mode, 0);
}
-
- if (l == new)
- break;
- l = l->l_prev;
+ else
+#endif
+ _dl_relocate_object (l, l->l_scope, reloc_mode, 0);
}
/* If the file is not loaded now as a dependency, add the search
--- glibc-2.14-394-g8f3b1ff/elf/Makefile.orig 2012-01-30 22:44:52.579668275 -0200
+++ glibc-2.14-394-g8f3b1ff/elf/Makefile 2012-01-30 22:46:06.553986442 -0200
@@ -124,7 +124,8 @@ distribute := rtld-Rules \
tst-initordera1.c tst-initordera2.c tst-initorderb1.c \
tst-initorderb2.c tst-initordera3.c tst-initordera4.c \
tst-initorder.c \
- tst-initorder2.c
+ tst-initorder2.c \
+ tst-relsort1.c tst-relsort1mod1.c tst-relsort1mod2.c
CFLAGS-dl-runtime.c = -fexceptions -fasynchronous-unwind-tables
CFLAGS-dl-lookup.c = -fexceptions -fasynchronous-unwind-tables
@@ -293,7 +294,9 @@ modules-names = testobj1 testobj2 testob
tst-initordera1 tst-initorderb1 \
tst-initordera2 tst-initorderb2 \
tst-initordera3 tst-initordera4 \
- tst-initorder2a tst-initorder2b tst-initorder2c tst-initorder2d
+ tst-initorder2a tst-initorder2b tst-initorder2c \
+ tst-initorder2d \
+ tst-relsort1mod1 tst-relsort1mod2
ifeq (yes,$(have-initfini-array))
modules-names += tst-array2dep tst-array5dep
endif
@@ -1199,3 +1202,9 @@ CFLAGS-tst-auditmod6b.c += $(AVX-CFLAGS)
CFLAGS-tst-auditmod6c.c += $(AVX-CFLAGS)
CFLAGS-tst-auditmod7b.c += $(AVX-CFLAGS)
endif
+
+$(objpfx)tst-relsort1: $(libdl)
+$(objpfx)tst-relsort1mod1.so: $(libm) $(objpfx)tst-relsort1mod2.so
+$(objpfx)tst-relsort1mod2.so: $(libm)
+$(objpfx)tst-relsort1.out: $(objpfx)tst-relsort1mod1.so \
+ $(objpfx)tst-relsort1mod2.so
--- glibc-2.14-394-g8f3b1ff/elf/tst-relsort1.c.orig 2012-01-30 22:49:00.915734489 -0200
+++ glibc-2.14-394-g8f3b1ff/elf/tst-relsort1.c 2012-01-30 22:52:48.300706078 -0200
diff -Nrup a/elf/tst-relsort1.c b/elf/tst-relsort1.c
--- a/elf/tst-relsort1.c 1969-12-31 17:00:00.000000000 -0700
+++ b/elf/tst-relsort1.c 2012-01-29 21:45:18.913344636 -0700
@@ -0,0 +1,19 @@
+#include <dlfcn.h>
+#include <stdio.h>
@ -217,8 +243,9 @@
+
+#define TEST_FUNCTION do_test ()
+#include "../test-skeleton.c"
--- glibc-2.14-394-g8f3b1ff/elf/tst-relsort1mod1.c.orig 2012-01-30 22:49:08.044765017 -0200
+++ glibc-2.14-394-g8f3b1ff/elf/tst-relsort1mod1.c 2012-01-30 22:53:28.132875824 -0200
diff -Nrup a/elf/tst-relsort1mod1.c b/elf/tst-relsort1mod1.c
--- a/elf/tst-relsort1mod1.c 1969-12-31 17:00:00.000000000 -0700
+++ b/elf/tst-relsort1mod1.c 2012-01-29 21:45:18.914344636 -0700
@@ -0,0 +1,7 @@
+extern int foo (double);
+
@ -227,8 +254,9 @@
+{
+ return foo (1.2);
+}
--- glibc-2.14-394-g8f3b1ff/elf/tst-relsort1mod2.c.orig 2012-01-30 22:49:15.796798201 -0200
+++ glibc-2.14-394-g8f3b1ff/elf/tst-relsort1mod2.c 2012-01-30 22:53:55.132990823 -0200
diff -Nrup a/elf/tst-relsort1mod2.c b/elf/tst-relsort1mod2.c
--- a/elf/tst-relsort1mod2.c 1969-12-31 17:00:00.000000000 -0700
+++ b/elf/tst-relsort1mod2.c 2012-01-29 21:45:18.914344636 -0700
@@ -0,0 +1,7 @@
+#include <math.h>
+
@ -237,18 +265,3 @@
+{
+ return floor (d) != 0.0;
+}
--- glibc-2.14-394-g8f3b1ff/Makeconfig.orig 2012-01-30 22:42:15.346009750 -0200
+++ glibc-2.14-394-g8f3b1ff/Makeconfig 2012-01-30 22:42:59.329188451 -0200
@@ -950,6 +950,12 @@ libdl =
endif
endif
+ifeq ($(build-shared),yes)
+libm = $(common-objpfx)math/libm.so$(libm.so-version)
+else
+libm = $(common-objpfx)math/libm.a
+endif
+
# These are the subdirectories containing the library source. The order
# is more or less arbitrary. The sorting step will take care of the
# dependencies.

View file

@ -4,8 +4,8 @@
%define glibcsrcdir glibc-%{version}
%define glibcportsdir glibc-%{version}
%else
%define glibcsrcdir glibc-2.14-394-g8f3b1ff
%define glibcportsdir glibc-ports-2.14-25-gd3d9bde
%define glibcsrcdir glibc-2.15-a316c1f
%define glibcportsdir glibc-ports-2.15-ad8ae7d
%endif
%define checklist %{_builddir}/%{glibcsrcdir}/Check.list
@ -73,27 +73,27 @@
#-----------------------------------------------------------------------
Summary: The GNU libc libraries
Name: glibc
Version: 2.14.90
Release: 15
Version: 2.15
Release: 1
Epoch: 6
License: LGPLv2+ and LGPLv2+ with exceptions and GPLv2+
Group: System/Libraries
Url: http://www.gnu.org/software/libc/
# FSF source
Source0: http://ftp.gnu.org/gnu/glibc/%{glibcsrcdir}.tar.xz
Source0: http://ftp.gnu.org/gnu/glibc/%{glibcsrcdir}.tar.gz
%if %{RELEASE}
Source1: http://ftp.gnu.org/gnu/glibc/%{glibcsrcdir}.tar.xz.sig
Source1: http://ftp.gnu.org/gnu/glibc/%{glibcsrcdir}.tar.gz.sig
%endif
# Fedora tarball
Source2: %{glibcsrcdir}-fedora.tar.xz
Source2: %{glibcsrcdir}-fedora.tar.gz
Source3: glibc-manpages.tar.bz2
Source5: glibc-check.sh
Source8: http://ftp.gnu.org/gnu/glibc/%{glibcportsdir}.tar.xz
Source8: http://ftp.gnu.org/gnu/glibc/%{glibcportsdir}.tar.gz
%if %{RELEASE}
Source9: http://ftp.gnu.org/gnu/glibc/%{glibcportsdir}.tar.xz.sig
Source9: http://ftp.gnu.org/gnu/glibc/%{glibcportsdir}.tar.gz.sig
%endif
# Blowfish support
@ -145,59 +145,109 @@ BuildRequires: rpm-mandriva-setup-build >= 1.133
BuildRequires: rpm >= 1:5.4.4-20
BuildRequires: spec-helper >= 0.31.2
#-----------------------------------------------------------------------
# from fedora glibc.spec
Patch00: glibc-fedora.patch
Patch01: glibc-2.11.1-localedef-archive-follow-symlinks.patch
Patch02: glibc-2.14.90-fix-dns-with-broken-routers.patch
Patch01: glibc-stap.patch
#-----------------------------------------------------------------------
# mandriva patches
Patch02: glibc-2.11.1-localedef-archive-follow-symlinks.patch
Patch03: glibc-2.15-fix-dns-with-broken-routers.patch
Patch04: glibc-2.14.90-nss-upgrade.patch
Patch06: glibc-2.9-share-locale.patch
Patch07: glibc-2.3.6-nsswitch.conf.patch
Patch09: glibc-2.2.4-xterm-xvt.patch
Patch13: glibc-2.3.3-nscd-enable.patch
Patch14: glibc-2.9-nscd-no-host-cache.patch
Patch17: glibc-2.4.90-i386-hwcapinfo.patch
Patch18: glibc-2.7-provide_CFI_for_the_outermost_function.patch
Patch19: glibc-2.8-nscd-init-should-start.patch
Patch23: glibc-2.3.4-timezone.patch
Patch24: glibc-2.10.1-biarch-cpp-defines.patch
Patch27: glibc-2.8-ENOTTY-fr-translation.patch
Patch29: glibc-2.3.5-biarch-utils.patch
Patch30: glibc-2.14.90-multiarch.patch
Patch31: glibc-2.4.90-i586-hptiming.patch
Patch32: glibc-2.3.4-i586-if-no-cmov.patch
Patch33: glibc-2.3.6-pt_BR-i18nfixes.patch
Patch34: glibc-2.4.90-testsuite-ldbl-bits.patch
Patch38: glibc-2.4.90-testsuite-rt-notparallel.patch
Patch39: glibc-2.10.1-mdv-owl-crypt_freesec.patch
Patch40: glibc-2.9-avx-relocate_fcrypt.patch
Patch41: glibc-2.3.6-avx-increase_BF_FRAME.patch
Patch42: glibc-2.10.1-mdv-avx-owl-crypt.patch
Patch43: glibc-2.7-mdv-wrapper_handle_sha.patch
Patch47: glibc-2.13-fix-compile-error.patch
Patch05: glibc-2.9-share-locale.patch
Patch06: glibc-2.3.6-nsswitch.conf.patch
Patch07: glibc-2.2.4-xterm-xvt.patch
Patch08: glibc-2.3.3-nscd-enable.patch
Patch09: glibc-2.9-nscd-no-host-cache.patch
Patch10: glibc-2.4.90-i386-hwcapinfo.patch
Patch11: glibc-2.8-nscd-init-should-start.patch
Patch12: glibc-2.3.4-timezone.patch
Patch13: glibc-2.10.1-biarch-cpp-defines.patch
Patch14: glibc-2.8-ENOTTY-fr-translation.patch
Patch15: glibc-2.3.5-biarch-utils.patch
Patch16: glibc-2.15-multiarch.patch
Patch17: glibc-2.4.90-i586-hptiming.patch
Patch18: glibc-2.3.4-i586-if-no-cmov.patch
Patch19: glibc-2.3.6-pt_BR-i18nfixes.patch
Patch20: glibc-2.4.90-testsuite-ldbl-bits.patch
Patch21: glibc-2.4.90-testsuite-rt-notparallel.patch
Patch22: glibc-2.13-fix-compile-error.patch
# https://bugzilla.redhat.com/show_bug.cgi?id=638477#c275
# https://bugzilla.redhat.com/show_bug.cgi?id=696096
# https://bugzilla.redhat.com/attachment.cgi?id=491198
Patch49: 0001-x86_64-fix-for-new-memcpy-behavior.patch
Patch23: 0001-x86_64-fix-for-new-memcpy-behavior.patch
# odd, for some reason the fedora patch applied earlier removes install of
# streams header.. just add them back for now :|
Patch50: glibc-2.14.90-revert-fedora-not-installing-stream-headers.patch
Patch24: glibc-2.14.90-revert-fedora-not-installing-stream-headers.patch
Patch25: glibc-no-leaf-attribute.patch
Patch26: glibc-2.14-394-g8f3b1ff-string-format-fixes.patch
#-----------------------------------------------------------------------
# from fedora glibc.spec
# Uli wants to see this undergo more analyis (what happens when thread B calls into malloc when
# thread A has unlocked on the error path
# There's an alternate approach using mmap after detecting an error that needs discussion
Patch27: glibc-rh757881.patch
# From upstream.
Patch28: glibc-rh740506.patch
# Not sure of upstream status
Patch29: glibc-rh730856.patch
# Follow-on to 552960's original patch to avoid losing wakeups
Patch30: glibc-rh552960-2.patch
Patch31: glibc-rh729661.patch
Patch32: glibc-rh446078.patch
Patch33: glibc-rh454629.patch
Patch34: glibc-rh784402.patch
Patch35: glibc-rh622499.patch
# Depends on systemtap infrastructure, so can't go upstream
Patch36: glibc-rh179072.patch
Patch37: glibc-rh697421.patch
Patch38: glibc-rh740682.patch
Patch39: glibc-sw13618.patch
# Fix bogus sorting code which was copied from dl-deps.
Patch40: glibc-sw13618-2.patch
Patch41: glibc-rh783979.patch
# Needs to go upstream
Patch42: glibc-rh657588.patch
Patch43: glibc-rh787201.patch
# Sent upstream, awaiting feedback
Patch44: glibc-rh741105.patch
# Sent upstream, awaiting feedback
Patch45: glibc-rh770869.patch
# Sent upstream, awaiting feedback
Patch46: glibc-rh691912.patch
# Not necessary to send upstream
Patch47: glibc-rh688948.patch
# Rakesh & Pravin will send upstream
Patch48: glibc-rh770439.patch
# Sent upstream
Patch49: glibc-rh789209.patch
# Was acked in the upstream BZ, but patch never got installed
Patch50: glibc-rh624296.patch
# Needs to be sent upstream
Patch51: glibc-rh564528.patch
#-----------------------------------------------------------------------
# mandriva patches
Patch52: glibc-2.10.1-mdv-avx-owl-crypt.patch
Patch53: glibc-2.10.1-mdv-owl-crypt_freesec.patch
Patch54: glibc-2.9-avx-relocate_fcrypt.patch
Patch55: glibc-2.3.6-avx-increase_BF_FRAME.patch
Patch56: glibc-2.7-mdv-wrapper_handle_sha.patch
# Requires to link thumb mode build
Patch51: glibc-2.14-arm-thumb.patch
Patch57: glibc-2.14-arm-thumb.patch
# http://sourceware.org/ml/libc-ports/2011-08/msg00000.html
Patch52: glibc-2.14.90-arm-hardfp.patch
Patch53: glibc-no-leaf-attribute.patch
Patch54: glibc-2.14-394-g8f3b1ff-string-format-fixes.patch
Patch55: glibc-localegrouping.patch
Patch56: glibc-arenalock.patch
Patch57: glibc-rh757881.patch
Patch58: glibc-rh750858.patch
Patch59: glibc-rh757887.patch
# backport http://sourceware.org/git/?p=glibc.git;a=patch;h=6ee65ed6ddbf04402fad0bec6aa9c73b9d982ae4;hp=43455e09166350b1237d2168d1b008c9f47ebaf0
Patch60: glibc-2.14.90-Sort-objects-before-relocations.patch
# FIXME this patch is hackish but corrects the problem for me
# in upstream bugreport, what others apparently did was to
# revert 3a2c02424d9824f5cdea4ebd32ff929b2b1f49c6
# http://sourceware.org/bugzilla/show_bug.cgi?id=13594
Patch58: glibc-2.15-chromium-browser-crash.patch
# Determine minimum kernel versions (rhbz#619538)
%define enablekernel 2.6.32
@ -555,64 +605,74 @@ These are configuration files that describe possible time zones.
########################################################################
%prep
%setup -q -n %{glibcsrcdir} -b 2 -a 3 -a 50
%if %{build_ports}
tar -xf %{SOURCE8}
mv %{glibcportsdir} ports
%patch51 -p1
%ifarch armv7hl
%patch52 -p1
%endif
%endif
%setup -q -n %{glibcsrcdir} -b 2 -a 3 -a 8 -a 50
%patch00 -p1 -b .fedora~
%patch01 -p1 -b .localedef-archive-follow-symlinks
%patch02 -p1 -b .dns-broken-router
%patch04 -p1 -b .nss-upgrade
%patch06 -p1 -b .share-locale
%patch07 -p1 -b .nsswitch.conf
%patch09 -p1 -b .xterm-xvt
%patch13 -p1 -b .nscd-enable
%patch14 -p1 -b .nscd-no-host-cache
%patch17 -p1 -b .i386-hwcapinfo
%patch18 -p0 -R -b .provide_CFI_for_the_outermost_function
%patch19 -p1 -b .nscd-init-should-start
%patch23 -p1 -b .timezone
%patch24 -p1 -b .biarch-cpp-defines
%patch27 -p1 -b .ENOTTY-fr-translation
%patch29 -p1 -b .biarch-utils
%patch30 -p1 -b .multiarch-check
%patch31 -p1 -b .i586-hptiming
%patch32 -p1 -b .i586-if-no-cmov
%patch33 -p1 -b .pt_BR-i18nfixes
%patch34 -p1 -b .testsuite-ldbl-bits
%patch38 -p1 -b .testsuite-rt-notparallel
%patch47 -p0 -b .fix-compile-error
%patch49 -p1 -b .memcpy
%patch50 -p1 -b .fed_streams~
%patch53 -p1 -b .leaf~
%patch54 -p1 -b .str_fmt~
%patch55 -p1 -b .localegrouping~
%patch56 -p1 -b .arenalock~
%patch57 -p1 -b .rh757881~
%patch58 -p1 -b .rh750858~
%patch59 -p1 -b .rh757887~
%patch60 -p1 -b .sort-reloc
%patch00 -p1
%patch01 -p1
%patch02 -p1
%patch03 -p1
%patch04 -p1
%patch05 -p1
%patch06 -p1
%patch07 -p1
%patch08 -p1
%patch09 -p1
%patch10 -p1
%patch11 -p1
%patch12 -p1
%patch13 -p1
%patch14 -p1
%patch15 -p1
%patch16 -p1
%patch17 -p1
%patch18 -p1
%patch19 -p1
%patch20 -p1
%patch21 -p1
%patch22 -p0
%patch23 -p1
%patch24 -p1
%patch25 -p1
%patch26 -p1
%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
%patch40 -p1
%patch41 -p1
%patch42 -p1
%patch43 -p1
%patch44 -p1
%patch45 -p1
%patch46 -p1
%patch47 -p1
%patch48 -p1
%patch49 -p1
%patch50 -p1
%patch51 -p1
# copy freesec source
cp %{_sourcedir}/crypt_freesec.[ch] crypt/
cp %{SOURCE52} %{SOURCE53} crypt/
echo "Applying crypt_blowfish patch:"
%patch42 -p1 -b .mdv-avx-owl-crypt
#patch -p1 -s < crypt_blowfish-%{crypt_bf_ver}/glibc-2.3.2-crypt.diff
%patch52 -p1
mv crypt/crypt.h crypt/gnu-crypt.h
cp -a crypt_blowfish-%{crypt_bf_ver}/*.[chS] crypt/
## FreeSec support for extended/new-style/BSDI hashes in crypt(3)
%patch39 -p1 -b .mdv-owl-crypt_freesec
%patch40 -p1 -b .avx-relocate_fcrypt
%patch41 -p0 -b .avx-increase_BF_FRAME
%patch53 -p1
%patch54 -p1
%patch55 -p0
# add sha256-crypt and sha512-crypt support to the Openwall wrapper
%patch43 -p1 -b .mdv-wrapper_handle_sha
%patch56 -p1
%if %{build_selinux}
# XXX kludge to build nscd with selinux support as it added -nostdinc
@ -620,6 +680,13 @@ cp -a crypt_blowfish-%{crypt_bf_ver}/*.[chS] crypt/
ln -s %{_includedir}/selinux selinux
%endif
%if %{build_ports}
mv %{glibcportsdir} ports
%patch57 -p1
%endif
%patch58 -p1
find . -type f -size 0 -o -name "*.orig" -exec rm -f {} \;
# Remove patch backups from files we ship in glibc packages
@ -1010,6 +1077,10 @@ export EXCLUDE_FROM_FULL_STRIP="ld-%{version}.so libpthread libc-%{version}.so l
%changelog
* Mon Feb 13 2012 Paulo Andrade <pcpa@mandriva.com.br> 6:2.15-1
+ Revision: 773711
- Update to glibc-2.15.
* Tue Jan 31 2012 Paulo Andrade <pcpa@mandriva.com.br> 6:2.14.90-15
+ Revision: 769973
- Backport correction to glibc bug #13618 (corrects mandriva bugzilla #64917)