summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJakub Jelinek <jakub@redhat.com>2006-09-19 18:46:51 +0000
committerJakub Jelinek <jakub@redhat.com>2006-09-19 18:46:51 +0000
commit61d906ea3820eefbe91548b295a95f3bc26c45a2 (patch)
tree79398a8e14fbe36db2c44baf134c8edddcd2083d
parent3d6b6fbc1f374f55fdb9e277d7e851fe112d68ff (diff)
Updated to fedora-glibc-20060919T1816
-rw-r--r--ChangeLog62
-rw-r--r--elf/Makefile10
-rw-r--r--elf/dl-cache.c4
-rw-r--r--elf/dl-close.c19
-rw-r--r--elf/unload7.c39
-rw-r--r--elf/unload7mod1.c11
-rw-r--r--elf/unload7mod2.c1
-rw-r--r--fedora/branch.mk4
-rw-r--r--fedora/glibc.spec.in11
-rw-r--r--nptl/ChangeLog16
-rw-r--r--nptl/sysdeps/unix/sysv/linux/sh/pthread_cond_broadcast.S8
-rw-r--r--nptl/sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S18
-rw-r--r--nptl/sysdeps/unix/sysv/linux/sh/pthread_cond_wait.S18
-rw-r--r--nptl/tst-cancel2.c8
-rw-r--r--nptl/tst-kill4.c21
-rw-r--r--sysdeps/mach/hurd/powerpc/register-dump.h4
-rw-r--r--sysdeps/powerpc/powerpc32/register-dump.h4
-rw-r--r--sysdeps/powerpc/powerpc64/register-dump.h8
-rw-r--r--sysdeps/unix/sysv/linux/ia64/sys/ptrace.h28
-rw-r--r--sysdeps/unix/sysv/linux/powerpc/sys/ptrace.h20
-rw-r--r--sysdeps/unix/sysv/linux/ptrace.c16
-rw-r--r--sysdeps/unix/sysv/linux/s390/sys/ptrace.h20
-rw-r--r--sysdeps/unix/sysv/linux/sparc/sys/ptrace.h24
-rw-r--r--sysdeps/unix/sysv/linux/sys/ptrace.h20
24 files changed, 343 insertions, 51 deletions
diff --git a/ChangeLog b/ChangeLog
index d1057e6d80..43576a82b5 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,63 @@
+2006-09-19 Jakub Jelinek <jakub@redhat.com>
+
+ * elf/dl-cache.c (HWCAP_CHECK): If _DL_PLATFORMS_COUNT, but
+ platform == -1, reject any libs with non-zero _DL_HWCAP_PLATFORM
+ bits.
+
+2006-09-19 Ulrich Drepper <drepper@redhat.com>
+
+ * elf/dl-close.c (_dl_close): If dependency is not unloaded make
+ sure no reference to the unloaded map's search list remains in the
+ dependency's scope.
+
+2006-09-16 Jakub Jelinek <jakub@redhat.com>
+
+ * elf/Makefile: Add rules to build and run unload7 test.
+ * elf/unload7.c: New test.
+ * elf/unload7mod1.c: New file.
+ * elf/unload7mod2.c: New file.
+
+2006-09-18 Jakub Jelinek <jakub@redhat.com>
+
+ * sysdeps/unix/sysv/linux/sys/ptrace.h (PT_GETEVENTMSG): Fix pasto.
+ * sysdeps/unix/sysv/linux/s390/sys/ptrace.h (PTRACE_SETOPTIONS,
+ PTRACE_GETEVENTMSG, PTRACE_GETSIGINFO, PTRACE_SETSIGINFO): Define.
+ * sysdeps/unix/sysv/linux/powerpc/sys/ptrace.h (PTRACE_SETOPTIONS,
+ PTRACE_GETEVENTMSG, PTRACE_GETSIGINFO, PTRACE_SETSIGINFO): Likewise.
+ * sysdeps/unix/sysv/linux/sparc/sys/ptrace.h (PTRACE_SETOPTIONS,
+ PTRACE_GETEVENTMSG, PTRACE_GETSIGINFO, PTRACE_SETSIGINFO): Likewise.
+ * sysdeps/unix/sysv/linux/ia64/sys/ptrace.h (PTRACE_SETOPTIONS,
+ PTRACE_GETEVENTMSG): Likewise.
+ (PTRACE_GETSIGINFO, PTRACE_SETSIGINFO): Change to the arch independent
+ values.
+
+2006-09-17 Mike Frysinger <vapier@gentoo.org>
+
+ * sysdeps/unix/sysv/linux/sys/ptrace.h (PTRACE_SETOPTIONS,
+ PTRACE_GETEVENTMSG, PTRACE_GETSIGINFO, PTRACE_SETSIGINFO): Define.
+ * sysdeps/unix/sysv/linux/ptrace.c (ptrace): Check PTRACE_SETOPTIONS,
+ PTRACE_GETEVENTMSG, PTRACE_GETSIGINFO and PTRACE_SETSIGINFO.
+
+2006-09-16 Jakub Jelinek <jakub@redhat.com>
+
+ * sysdeps/powerpc/powerpc32/register-dump.h (register_dump): Don't
+ write '\0' to the fd.
+ * sysdeps/mach/hurd/powerpc/register-dump.h (register_dump): Likewise.
+ * sysdeps/powerpc/powerpc64/register-dump.h (register_dump): Likewise.
+ Change regs to unsigned long pointer from unsigned int, fix fscr
+ offset.
+
+2006-09-14 Jakub Jelinek <jakub@redhat.com>
+
+ * io/Makefile (CFLAGS-fstatat.c): Set.
+ (CFLAGS-fstatat64.c): Likewise.
+ (CFLAGS-mknodat.c): Likewise.
+
+ * sysdeps/ieee754/ldbl-128ibm/s_llrintl.c: Comment fixes.
+ * sysdeps/ieee754/ldbl-128ibm/s_llroundl.c: Likewise.
+ * sysdeps/ieee754/ldbl-128ibm/s_lrintl.c: Rewritten.
+ * sysdeps/ieee754/ldbl-128ibm/s_lroundl.c: Rewritten.
+
2006-09-14 Jakub Jelinek <jakub@redhat.com>
* sysdeps/ieee754/ldbl-128ibm/s_llrintl.c: Comment fixes.
@@ -11,7 +71,7 @@
2006-09-14 Jakub Jelinek <jakub@redhat.com>
Steven Munroe <sjmunroe@us.ibm.com>
-
+
* sysdeps/powerpc/dl-procinfo.c (_dl_powerpc_cap_flags): Add 4 new cap
names to the beginning. Rename "cell" to "cellbe".
(_dl_powerpc_platforms): New.
diff --git a/elf/Makefile b/elf/Makefile
index 6f4b0260c0..b1a9bab022 100644
--- a/elf/Makefile
+++ b/elf/Makefile
@@ -87,6 +87,7 @@ distribute := rtld-Rules \
unload3mod1.c unload3mod2.c unload3mod3.c unload3mod4.c \
unload4mod1.c unload4mod2.c unload4mod3.c unload4mod4.c \
unload6mod1.c unload6mod2.c unload6mod3.c \
+ unload7mod1.c unload7mod2.c \
tst-auditmod1.c tst-audit.sh \
order2mod1.c order2mod2.c order2mod3.c order2mod4.c \
tst-stackguard1.c tst-stackguard1-static.c \
@@ -168,7 +169,7 @@ tests += loadtest restest1 preloadtest loadfail multiload origtest resolvfail \
tst-align tst-align2 $(tests-execstack-$(have-z-execstack)) \
tst-dlmodcount tst-dlopenrpath tst-deep1 \
tst-dlmopen1 tst-dlmopen2 tst-dlmopen3 \
- unload3 unload4 unload5 unload6 tst-global1 order2 \
+ unload3 unload4 unload5 unload6 unload7 tst-global1 order2 \
tst-audit1 tst-audit2 \
tst-stackguard1 tst-addr1
# reldep9
@@ -211,6 +212,7 @@ modules-names = testobj1 testobj2 testobj3 testobj4 testobj5 testobj6 \
unload3mod1 unload3mod2 unload3mod3 unload3mod4 \
unload4mod1 unload4mod2 unload4mod3 unload4mod4 \
unload6mod1 unload6mod2 unload6mod3 \
+ unload7mod1 unload7mod2 \
order2mod1 order2mod2 order2mod3 order2mod4
ifeq (yes,$(have-initfini-array))
modules-names += tst-array2dep tst-array5dep
@@ -455,6 +457,8 @@ $(objpfx)unload4mod2.so: $(objpfx)unload4mod4.so $(objpfx)unload4mod3.so
$(objpfx)unload6mod1.so: $(libdl)
$(objpfx)unload6mod2.so: $(libdl)
$(objpfx)unload6mod3.so: $(libdl)
+$(objpfx)unload7mod1.so: $(libdl)
+$(objpfx)unload7mod2.so: $(objpfx)unload7mod1.so
LDFLAGS-tst-tlsmod5.so = -nostdlib
LDFLAGS-tst-tlsmod6.so = -nostdlib
@@ -732,6 +736,10 @@ $(objpfx)unload6: $(libdl)
$(objpfx)unload6.out: $(objpfx)unload6mod1.so $(objpfx)unload6mod2.so \
$(objpfx)unload6mod3.so
+$(objpfx)unload7: $(libdl)
+$(objpfx)unload7.out: $(objpfx)unload7mod1.so $(objpfx)unload7mod2.so
+unload7-ENV = MALLOC_PERTURB_=85
+
ifdef libdl
$(objpfx)tst-tls9-static: $(common-objpfx)dlfcn/libdl.a
$(objpfx)tst-tls9-static.out: $(objpfx)tst-tlsmod5.so $(objpfx)tst-tlsmod6.so
diff --git a/elf/dl-cache.c b/elf/dl-cache.c
index 29886e194a..fc7d9916c6 100644
--- a/elf/dl-cache.c
+++ b/elf/dl-cache.c
@@ -1,5 +1,5 @@
/* Support for reading /etc/ld.so.cache files written by Linux ldconfig.
- Copyright (C) 1996-2002, 2003, 2004 Free Software Foundation, Inc.
+ Copyright (C) 1996-2002, 2003, 2004, 2006 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
@@ -264,7 +264,7 @@ _dl_load_cache_lookup (const char *name)
#define HWCAP_CHECK \
if (GLRO(dl_osversion) && lib->osversion > GLRO(dl_osversion)) \
continue; \
- if (_DL_PLATFORMS_COUNT && platform != -1 \
+ if (_DL_PLATFORMS_COUNT \
&& (lib->hwcap & _DL_HWCAP_PLATFORM) != 0 \
&& (lib->hwcap & _DL_HWCAP_PLATFORM) != platform) \
continue; \
diff --git a/elf/dl-close.c b/elf/dl-close.c
index 754dd678fe..6a2ad976a7 100644
--- a/elf/dl-close.c
+++ b/elf/dl-close.c
@@ -1,5 +1,5 @@
/* Close a shared object opened by `_dl_open'.
- Copyright (C) 1996-2002, 2003, 2004, 2005 Free Software Foundation, Inc.
+ Copyright (C) 1996-2005, 2006 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
@@ -330,7 +330,7 @@ _dl_close (void *_map)
for (cnt = 0; imap->l_scope[cnt] != NULL; ++cnt)
/* This relies on l_scope[] entries being always set either
- to its own l_symbolic_searchlist address, or some other map's
+ to its own l_symbolic_searchlist address, or some map's
l_searchlist address. */
if (imap->l_scope[cnt] != &imap->l_symbolic_searchlist)
{
@@ -347,6 +347,21 @@ _dl_close (void *_map)
}
}
}
+ else
+ {
+ unsigned int cnt = 0;
+ while (imap->l_scope[cnt] != NULL)
+ {
+ if (imap->l_scope[cnt] == &map->l_searchlist)
+ {
+ while ((imap->l_scope[cnt] = imap->l_scope[cnt + 1])
+ != NULL)
+ ++cnt;
+ break;
+ }
+ ++cnt;
+ }
+ }
/* The loader is gone, so mark the object as not having one.
Note: l_idx != -1 -> object will be removed. */
diff --git a/elf/unload7.c b/elf/unload7.c
new file mode 100644
index 0000000000..198f7db286
--- /dev/null
+++ b/elf/unload7.c
@@ -0,0 +1,39 @@
+#include <dlfcn.h>
+#include <stdio.h>
+
+int
+main (void)
+{
+ void *h = dlopen ("$ORIGIN/unload7mod1.so", RTLD_LAZY);
+ if (h == NULL)
+ {
+ puts ("dlopen unload7mod1.so failed");
+ return 1;
+ }
+
+ int (*fn) (void);
+ fn = dlsym (h, "foo");
+ if (fn == NULL)
+ {
+ puts ("dlsym failed");
+ return 1;
+ }
+
+ int ret = 0;
+ if (fn () == 0)
+ ++ret;
+
+ void *h2 = dlopen ("$ORIGIN/unload7mod2.so", RTLD_LAZY);
+ if (h2 == NULL)
+ {
+ puts ("dlopen unload7mod2.so failed");
+ return 1;
+ }
+ dlclose (h2);
+
+ if (fn () == 0)
+ ++ret;
+
+ dlclose (h);
+ return ret;
+}
diff --git a/elf/unload7mod1.c b/elf/unload7mod1.c
new file mode 100644
index 0000000000..7435adce2c
--- /dev/null
+++ b/elf/unload7mod1.c
@@ -0,0 +1,11 @@
+#include <dlfcn.h>
+#include <stdio.h>
+
+int
+foo (int i)
+{
+ if (dlsym (RTLD_DEFAULT, "unload7_nonexistent_symbol") == NULL)
+ return 1;
+ puts ("dlsym returned non-NULL");
+ return 0;
+}
diff --git a/elf/unload7mod2.c b/elf/unload7mod2.c
new file mode 100644
index 0000000000..6d1a0d47b7
--- /dev/null
+++ b/elf/unload7mod2.c
@@ -0,0 +1 @@
+int x;
diff --git a/fedora/branch.mk b/fedora/branch.mk
index b272ca78df..2171586da8 100644
--- a/fedora/branch.mk
+++ b/fedora/branch.mk
@@ -3,5 +3,5 @@ glibc-branch := fedora
glibc-base := HEAD
DIST_BRANCH := devel
COLLECTION := dist-fc4
-fedora-sync-date := 2006-09-15 09:43 UTC
-fedora-sync-tag := fedora-glibc-20060915T0943
+fedora-sync-date := 2006-09-19 18:16 UTC
+fedora-sync-tag := fedora-glibc-20060919T1816
diff --git a/fedora/glibc.spec.in b/fedora/glibc.spec.in
index ab0007ca20..2b68cf556d 100644
--- a/fedora/glibc.spec.in
+++ b/fedora/glibc.spec.in
@@ -1,4 +1,4 @@
-%define glibcrelease 32
+%define glibcrelease 33
%define auxarches i586 i686 athlon sparcv9 alphaev6
%define xenarches i686 athlon
%ifarch %{xenarches}
@@ -788,7 +788,7 @@ touch locale/programs/*-kw.h
GCC=gcc
GXX=g++
%ifarch %{ix86}
-BuildFlags="-march=%{_target_cpu}"
+BuildFlags="-march=%{_target_cpu} -mtune=generic"
%endif
%ifarch i686
BuildFlags="-march=i686 -mtune=generic"
@@ -1524,6 +1524,13 @@ rm -f *.filelist*
%endif
%changelog
+* Tue Sep 15 2006 Jakub Jelinek <jakub@redhat.com> 2.4.90-33
+- fix dlclose (#206639)
+- don't load platform optimized libraries if kernel doesn't set
+ AT_PLATFORM
+- fix ppc{32,64} libSegFault.so
+- use -mtune=generic even for glibc-devel.i386 (#206437)
+
* Fri Sep 15 2006 Jakub Jelinek <jakub@redhat.com> 2.4.90-32
- on ppc* use just AT_PLATFORM and altivec AT_HWCAP bit for library selection
- fix lrintl and lroundl on ppc{,64}
diff --git a/nptl/ChangeLog b/nptl/ChangeLog
index afa9a37c97..0d05e200ff 100644
--- a/nptl/ChangeLog
+++ b/nptl/ChangeLog
@@ -1,3 +1,17 @@
+2006-09-18 Jakub Jelinek <jakub@redhat.com>
+
+ * tst-kill4.c (do_test): Explicitly set tf thread's stack size.
+
+ * tst-cancel2.c (tf): Loop as long as something was written.
+
+2006-09-12 Kaz Kojima <kkojima@rr.iij4u.or.jp>
+
+ * sysdeps/unix/sysv/linux/sh/pthread_cond_broadcast.S: For PI
+ mutexes wake all mutexes.
+ * sysdeps/unix/sysv/linux/sh/pthread_cond_wait.S: Don't increment
+ WAKEUP_SEQ if this would increase the value beyond TOTAL_SEQ.
+ * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S: Likewise.
+
2006-09-12 Ulrich Drepper <drepper@redhat.com>
* tst-cond22.c (tf): Slight changes to the pthread_cond_wait use
@@ -12,7 +26,7 @@
* sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Likewise.
* sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
* sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Likewise.
-
+
2006-09-08 Ulrich Drepper <drepper@redhat.com>
[BZ #3123]
diff --git a/nptl/sysdeps/unix/sysv/linux/sh/pthread_cond_broadcast.S b/nptl/sysdeps/unix/sysv/linux/sh/pthread_cond_broadcast.S
index 6bd6e60ec1..56f0aa95de 100644
--- a/nptl/sysdeps/unix/sysv/linux/sh/pthread_cond_broadcast.S
+++ b/nptl/sysdeps/unix/sysv/linux/sh/pthread_cond_broadcast.S
@@ -1,4 +1,4 @@
-/* Copyright (C) 2003, 2004 Free Software Foundation, Inc.
+/* Copyright (C) 2003, 2004, 2006 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 <shlib-compat.h>
#include <lowlevelcond.h>
#include <kernel-features.h>
+#include <pthread-pi-defines.h>
#include "lowlevel-atomic.h"
#define SYS_futex 240
@@ -98,6 +99,11 @@ __pthread_cond_broadcast:
bt/s 9f
add #cond_futex, r4
+ /* XXX: The kernel so far doesn't support requeue to PI futex. */
+ mov.l @(MUTEX_KIND,r9), r0
+ tst #PI_BIT, r0
+ bf 9f
+
/* Wake up all threads. */
mov #FUTEX_CMP_REQUEUE, r5
mov #1, r6
diff --git a/nptl/sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S b/nptl/sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S
index 74206a71ec..6c782c8a76 100644
--- a/nptl/sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S
+++ b/nptl/sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S
@@ -1,4 +1,4 @@
-/* Copyright (C) 2003, 2004 Free Software Foundation, Inc.
+/* Copyright (C) 2003, 2004, 2006 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
@@ -521,6 +521,21 @@ __condvar_tw_cleanup:
mov #1, r2
mov #0, r3
+ /* We increment the wakeup_seq counter only if it is lower than
+ total_seq. If this is not the case the thread was woken and
+ then canceled. In this case we ignore the signal. */
+ mov.l @(total_seq+4,r8), r0
+ mov.l @(wakeup_seq+4,r8), r1
+ cmp/hi r1, r0
+ bt/s 6f
+ cmp/hi r0, r1
+ bt 7f
+ mov.l @(total_seq,r8), r0
+ mov.l @(wakeup_seq,r8), r1
+ cmp/hs r0, r1
+ bt 7f
+
+6:
clrt
mov.l @(wakeup_seq,r8),r0
mov.l @(wakeup_seq+4,r8),r1
@@ -532,6 +547,7 @@ __condvar_tw_cleanup:
add r2, r0
mov.l r0,@(cond_futex,r8)
+7:
clrt
mov.l @(woken_seq,r8),r0
mov.l @(woken_seq+4,r8),r1
diff --git a/nptl/sysdeps/unix/sysv/linux/sh/pthread_cond_wait.S b/nptl/sysdeps/unix/sysv/linux/sh/pthread_cond_wait.S
index 2d6b685668..6c59f3e6c0 100644
--- a/nptl/sysdeps/unix/sysv/linux/sh/pthread_cond_wait.S
+++ b/nptl/sysdeps/unix/sysv/linux/sh/pthread_cond_wait.S
@@ -1,4 +1,4 @@
-/* Copyright (C) 2003, 2004 Free Software Foundation, Inc.
+/* Copyright (C) 2003, 2004, 2006 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
@@ -385,6 +385,21 @@ __condvar_w_cleanup:
mov #1, r2
mov #0, r3
+ /* We increment the wakeup_seq counter only if it is lower than
+ total_seq. If this is not the case the thread was woken and
+ then canceled. In this case we ignore the signal. */
+ mov.l @(total_seq+4,r8), r0
+ mov.l @(wakeup_seq+4,r8), r1
+ cmp/hi r1, r0
+ bt/s 6f
+ cmp/hi r0, r1
+ bt 7f
+ mov.l @(total_seq,r8), r0
+ mov.l @(wakeup_seq,r8), r1
+ cmp/hs r0, r1
+ bt 7f
+
+6:
clrt
mov.l @(wakeup_seq,r8),r0
mov.l @(wakeup_seq+4,r8),r1
@@ -396,6 +411,7 @@ __condvar_w_cleanup:
add r2, r0
mov.l r0,@(cond_futex,r8)
+7:
clrt
mov.l @(woken_seq,r8),r0
mov.l @(woken_seq+4,r8),r1
diff --git a/nptl/tst-cancel2.c b/nptl/tst-cancel2.c
index 6d80f8ae5e..529b5d4050 100644
--- a/nptl/tst-cancel2.c
+++ b/nptl/tst-cancel2.c
@@ -1,4 +1,4 @@
-/* Copyright (C) 2002 Free Software Foundation, Inc.
+/* Copyright (C) 2002, 2006 Free Software Foundation, Inc.
This file is part of the GNU C Library.
Contributed by Ulrich Drepper <drepper@redhat.com>, 2002.
@@ -33,11 +33,7 @@ tf (void *arg)
write blocks. */
char buf[100000];
- if (write (fd[1], buf, sizeof (buf)) == sizeof (buf))
- {
- puts ("write succeeded");
- return (void *) 1l;
- }
+ while (write (fd[1], buf, sizeof (buf)) > 0);
return (void *) 42l;
}
diff --git a/nptl/tst-kill4.c b/nptl/tst-kill4.c
index 4e7ff5eaf4..a1b97e7b26 100644
--- a/nptl/tst-kill4.c
+++ b/nptl/tst-kill4.c
@@ -1,4 +1,4 @@
-/* Copyright (C) 2003 Free Software Foundation, Inc.
+/* Copyright (C) 2003, 2006 Free Software Foundation, Inc.
This file is part of the GNU C Library.
Contributed by Ulrich Drepper <drepper@redhat.com>, 2003.
@@ -35,13 +35,30 @@ tf (void *a)
int
do_test (void)
{
+ pthread_attr_t at;
+ if (pthread_attr_init (&at) != 0)
+ {
+ puts ("attr_create failed");
+ exit (1);
+ }
+
+ /* Limit thread stack size, because if it is too large, pthread_join
+ will free it immediately rather than put it into stack cache. */
+ if (pthread_attr_setstacksize (&at, 2 * 1024 * 1024) != 0)
+ {
+ puts ("setstacksize failed");
+ exit (1);
+ }
+
pthread_t th;
- if (pthread_create (&th, NULL, tf, NULL) != 0)
+ if (pthread_create (&th, &at, tf, NULL) != 0)
{
puts ("create failed");
exit (1);
}
+ pthread_attr_destroy (&at);
+
if (pthread_join (th, NULL) != 0)
{
puts ("join failed");
diff --git a/sysdeps/mach/hurd/powerpc/register-dump.h b/sysdeps/mach/hurd/powerpc/register-dump.h
index 0377175227..c0b1d06236 100644
--- a/sysdeps/mach/hurd/powerpc/register-dump.h
+++ b/sysdeps/mach/hurd/powerpc/register-dump.h
@@ -1,5 +1,5 @@
/* Dump registers. PowerPC/Hurd version.
- Copyright (C) 1998, 2001 Free Software Foundation, Inc.
+ Copyright (C) 1998, 2001, 2006 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
@@ -113,7 +113,7 @@ register_dump (int fd, struct sigcontext *ctx)
}
/* Write the output. */
- write (fd, buffer, sizeof(buffer));
+ write (fd, buffer, sizeof(buffer) - 1);
}
#define REGISTER_DUMP \
diff --git a/sysdeps/powerpc/powerpc32/register-dump.h b/sysdeps/powerpc/powerpc32/register-dump.h
index d341eea8ff..7071632083 100644
--- a/sysdeps/powerpc/powerpc32/register-dump.h
+++ b/sysdeps/powerpc/powerpc32/register-dump.h
@@ -1,5 +1,5 @@
/* Dump registers.
- Copyright (C) 1998 Free Software Foundation, Inc.
+ Copyright (C) 1998, 2006 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
@@ -113,7 +113,7 @@ register_dump (int fd, struct sigcontext *ctx)
}
/* Write the output. */
- write (fd, buffer, sizeof(buffer));
+ write (fd, buffer, sizeof(buffer) - 1);
}
diff --git a/sysdeps/powerpc/powerpc64/register-dump.h b/sysdeps/powerpc/powerpc64/register-dump.h
index dd69af3faf..fc27dcaef3 100644
--- a/sysdeps/powerpc/powerpc64/register-dump.h
+++ b/sysdeps/powerpc/powerpc64/register-dump.h
@@ -1,5 +1,5 @@
/* Dump registers.
- Copyright (C) 1998, 2002 Free Software Foundation, Inc.
+ Copyright (C) 1998, 2002, 2006 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
@@ -34,7 +34,7 @@ gr16-19: 000000000000010% 000000000000011% 000000000000012% 000000000000013%\n\
gr20-23: 000000000000014% 000000000000015% 000000000000016% 000000000000017%\n\
gr24-27: 000000000000018% 000000000000019% 00000000000001a% 00000000000001b%\n\
gr28-31: 00000000000001c% 00000000000001d% 00000000000001e% 00000000000001f%\n\
-fscr=0000071%\n\
+fscr=000000000000050%\n\
fp0-3: 000000000000030% 000000000000031% 000000000000032% 000000000000033%\n\
fp4-7: 000000000000034% 000000000000035% 000000000000036% 000000000000037%\n\
fp8-11: 000000000000038% 000000000000038% 00000000000003a% 00000000000003b%\n\
@@ -104,7 +104,7 @@ register_dump (int fd, struct sigcontext *ctx)
char buffer[sizeof(dumpform)];
char *bufferpos;
unsigned regno;
- unsigned *regs = (unsigned *)(ctx->regs);
+ unsigned long *regs = (unsigned long *)(ctx->regs);
memcpy(buffer, dumpform, sizeof(dumpform));
@@ -117,7 +117,7 @@ register_dump (int fd, struct sigcontext *ctx)
}
/* Write the output. */
- write (fd, buffer, sizeof(buffer));
+ write (fd, buffer, sizeof(buffer) - 1);
}
diff --git a/sysdeps/unix/sysv/linux/ia64/sys/ptrace.h b/sysdeps/unix/sysv/linux/ia64/sys/ptrace.h
index 986c4b2d33..ff77627a83 100644
--- a/sysdeps/unix/sysv/linux/ia64/sys/ptrace.h
+++ b/sysdeps/unix/sysv/linux/ia64/sys/ptrace.h
@@ -1,5 +1,5 @@
/* `ptrace' debugger support interface. Linux/ia64 version.
- Copyright (C) 2001 Free Software Foundation, Inc.
+ Copyright (C) 2001, 2006 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
@@ -75,14 +75,6 @@ enum __ptrace_request
PTRACE_SINGLEBLOCK = 12,
#define PT_STEPBLOCK PTRACE_SINGLEBLOCK
- /* Get siginfo for process. */
- PTRACE_GETSIGINFO = 13,
-#define PT_GETSIGINFO PTRACE_GETSIGINFO
-
- /* Set new siginfo for process. */
- PTRACE_SETSIGINFO = 14,
-#define PT_GETSIGINFO PTRACE_GETSIGINFO
-
/* Attach to a process that is already running. */
PTRACE_ATTACH = 16,
#define PT_ATTACH PTRACE_ATTACH
@@ -100,8 +92,24 @@ enum __ptrace_request
#define PT_SETREGS PTRACE_SETREGS
/* Continue and stop at the next (return from) syscall. */
- PTRACE_SYSCALL = 24
+ PTRACE_SYSCALL = 24,
#define PT_SYSCALL PTRACE_SYSCALL
+
+ /* Set ptrace filter options. */
+ PTRACE_SETOPTIONS = 0x4200,
+#define PT_SETOPTIONS PTRACE_SETOPTIONS
+
+ /* Get last ptrace message. */
+ PTRACE_GETEVENTMSG = 0x4201,
+#define PT_GETEVENTMSG PTRACE_GETEVENTMSG
+
+ /* Get siginfo for process. */
+ PTRACE_GETSIGINFO = 0x4202,
+#define PT_GETSIGINFO PTRACE_GETSIGINFO
+
+ /* Set new siginfo for process. */
+ PTRACE_SETSIGINFO = 0x4203
+#define PT_SETSIGINFO PTRACE_SETSIGINFO
};
/* pt_all_user_regs is used for PTRACE_GETREGS/PTRACE_SETREGS. */
diff --git a/sysdeps/unix/sysv/linux/powerpc/sys/ptrace.h b/sysdeps/unix/sysv/linux/powerpc/sys/ptrace.h
index 91a87307f3..5d055f67fe 100644
--- a/sysdeps/unix/sysv/linux/powerpc/sys/ptrace.h
+++ b/sysdeps/unix/sysv/linux/powerpc/sys/ptrace.h
@@ -1,5 +1,5 @@
/* `ptrace' debugger support interface. Linux version.
- Copyright (C) 2001 Free Software Foundation, Inc.
+ Copyright (C) 2001, 2006 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
@@ -79,8 +79,24 @@ enum __ptrace_request
#define PT_DETACH PTRACE_DETACH
/* Continue and stop at the next (return from) syscall. */
- PTRACE_SYSCALL = 24
+ PTRACE_SYSCALL = 24,
#define PT_SYSCALL PTRACE_SYSCALL
+
+ /* Set ptrace filter options. */
+ PTRACE_SETOPTIONS = 0x4200,
+#define PT_SETOPTIONS PTRACE_SETOPTIONS
+
+ /* Get last ptrace message. */
+ PTRACE_GETEVENTMSG = 0x4201,
+#define PT_GETEVENTMSG PTRACE_GETEVENTMSG
+
+ /* Get siginfo for process. */
+ PTRACE_GETSIGINFO = 0x4202,
+#define PT_GETSIGINFO PTRACE_GETSIGINFO
+
+ /* Set new siginfo for process. */
+ PTRACE_SETSIGINFO = 0x4203
+#define PT_SETSIGINFO PTRACE_SETSIGINFO
};
/* Perform process tracing functions. REQUEST is one of the values
diff --git a/sysdeps/unix/sysv/linux/ptrace.c b/sysdeps/unix/sysv/linux/ptrace.c
index e33eee0ee8..e149d80477 100644
--- a/sysdeps/unix/sysv/linux/ptrace.c
+++ b/sysdeps/unix/sysv/linux/ptrace.c
@@ -1,4 +1,4 @@
-/* Copyright (C) 1995,1996,1997,1998,2000,2003 Free Software Foundation, Inc.
+/* Copyright (C) 1995-1998,2000,2003,2006 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
@@ -21,6 +21,7 @@
#include <sys/ptrace.h>
#include <sys/user.h>
#include <stdarg.h>
+#include <signal.h>
#include <sysdep.h>
#include <sys/syscall.h>
@@ -89,6 +90,19 @@ ptrace (enum __ptrace_request request, ...)
#endif
break;
+ case PTRACE_GETSIGINFO:
+ case PTRACE_SETSIGINFO:
+ (void) CHECK_1 ((siginfo_t *) data);
+ break;
+
+ case PTRACE_GETEVENTMSG:
+ (void) CHECK_1 ((unsigned long *) data);
+ break;
+
+ case PTRACE_SETOPTIONS:
+ (void) CHECK_1 ((long *) data);
+ break;
+
case PTRACE_TRACEME:
case PTRACE_CONT:
case PTRACE_KILL:
diff --git a/sysdeps/unix/sysv/linux/s390/sys/ptrace.h b/sysdeps/unix/sysv/linux/s390/sys/ptrace.h
index d26cf114ef..70eb4f8222 100644
--- a/sysdeps/unix/sysv/linux/s390/sys/ptrace.h
+++ b/sysdeps/unix/sysv/linux/s390/sys/ptrace.h
@@ -1,5 +1,5 @@
/* `ptrace' debugger support interface. Linux version.
- Copyright (C) 2000 Free Software Foundation, Inc.
+ Copyright (C) 2000, 2006 Free Software Foundation, Inc.
Contributed by Denis Joseph Barrow (djbarrow@de.ibm.com).
This file is part of the GNU C Library.
@@ -118,8 +118,24 @@ enum __ptrace_request
#define PT_DETACH PTRACE_DETACH
/* Continue and stop at the next (return from) syscall. */
- PTRACE_SYSCALL = 24
+ PTRACE_SYSCALL = 24,
#define PT_SYSCALL PTRACE_SYSCALL
+
+ /* Set ptrace filter options. */
+ PTRACE_SETOPTIONS = 0x4200,
+#define PT_SETOPTIONS PTRACE_SETOPTIONS
+
+ /* Get last ptrace message. */
+ PTRACE_GETEVENTMSG = 0x4201,
+#define PT_GETEVENTMSG PTRACE_GETEVENTMSG
+
+ /* Get siginfo for process. */
+ PTRACE_GETSIGINFO = 0x4202,
+#define PT_GETSIGINFO PTRACE_GETSIGINFO
+
+ /* Set new siginfo for process. */
+ PTRACE_SETSIGINFO = 0x4203
+#define PT_SETSIGINFO PTRACE_SETSIGINFO
};
/* Perform process tracing functions. REQUEST is one of the values
diff --git a/sysdeps/unix/sysv/linux/sparc/sys/ptrace.h b/sysdeps/unix/sysv/linux/sparc/sys/ptrace.h
index d573f0e994..17907c4a38 100644
--- a/sysdeps/unix/sysv/linux/sparc/sys/ptrace.h
+++ b/sysdeps/unix/sysv/linux/sparc/sys/ptrace.h
@@ -1,5 +1,6 @@
/* `ptrace' debugger support interface. Linux/SPARC version.
- Copyright (C) 1996, 1997, 1998, 1999, 2000 Free Software Foundation, Inc.
+ Copyright (C) 1996, 1997, 1998, 1999, 2000, 2006
+ 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
@@ -148,12 +149,11 @@ enum __ptrace_request
#endif
/* Continue and stop at the next (return from) syscall. */
- PTRACE_SYSCALL = 24
+ PTRACE_SYSCALL = 24,
#define PTRACE_SYSCALL PTRACE_SYSCALL
#if __WORDSIZE == 64
- ,
/* Get all floating point registers used by a processes.
This is not supported on all machines. */
PTRACE_GETFPREGS = 25,
@@ -161,10 +161,26 @@ enum __ptrace_request
/* Set all floating point registers used by a processes.
This is not supported on all machines. */
- PTRACE_SETFPREGS = 26
+ PTRACE_SETFPREGS = 26,
#define PT_SETFPREGS PTRACE_SETFPREGS
#endif
+
+ /* Set ptrace filter options. */
+ PTRACE_SETOPTIONS = 0x4200,
+#define PT_SETOPTIONS PTRACE_SETOPTIONS
+
+ /* Get last ptrace message. */
+ PTRACE_GETEVENTMSG = 0x4201,
+#define PT_GETEVENTMSG PTRACE_GETEVENTMSG
+
+ /* Get siginfo for process. */
+ PTRACE_GETSIGINFO = 0x4202,
+#define PT_GETSIGINFO PTRACE_GETSIGINFO
+
+ /* Set new siginfo for process. */
+ PTRACE_SETSIGINFO = 0x4203
+#define PT_SETSIGINFO PTRACE_SETSIGINFO
};
/* Perform process tracing functions. REQUEST is one of the values
diff --git a/sysdeps/unix/sysv/linux/sys/ptrace.h b/sysdeps/unix/sysv/linux/sys/ptrace.h
index b4aec4f208..44284cb307 100644
--- a/sysdeps/unix/sysv/linux/sys/ptrace.h
+++ b/sysdeps/unix/sysv/linux/sys/ptrace.h
@@ -1,5 +1,5 @@
/* `ptrace' debugger support interface. Linux version.
- Copyright (C) 1996, 1997, 1998, 1999, 2000 Free Software Foundation, Inc.
+ Copyright (C) 1996-1999,2000,2006 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
@@ -109,8 +109,24 @@ enum __ptrace_request
#define PT_SETFPXREGS PTRACE_SETFPXREGS
/* Continue and stop at the next (return from) syscall. */
- PTRACE_SYSCALL = 24
+ PTRACE_SYSCALL = 24,
#define PT_SYSCALL PTRACE_SYSCALL
+
+ /* Set ptrace filter options. */
+ PTRACE_SETOPTIONS = 0x4200,
+#define PT_SETOPTIONS PTRACE_SETOPTIONS
+
+ /* Get last ptrace message. */
+ PTRACE_GETEVENTMSG = 0x4201,
+#define PT_GETEVENTMSG PTRACE_GETEVENTMSG
+
+ /* Get siginfo for process. */
+ PTRACE_GETSIGINFO = 0x4202,
+#define PT_GETSIGINFO PTRACE_GETSIGINFO
+
+ /* Set new siginfo for process. */
+ PTRACE_SETSIGINFO = 0x4203
+#define PT_SETSIGINFO PTRACE_SETSIGINFO
};
/* Perform process tracing functions. REQUEST is one of the values