summaryrefslogtreecommitdiff
path: root/nptl
diff options
context:
space:
mode:
Diffstat (limited to 'nptl')
-rw-r--r--nptl/ChangeLog19
-rw-r--r--nptl/Makefile11
-rw-r--r--nptl/Versions1
-rw-r--r--nptl/allocatestack.c11
-rw-r--r--nptl/nptl-init.c2
-rw-r--r--nptl/sysdeps/unix/sysv/linux/bits/posix_opt.h3
-rw-r--r--nptl/sysdeps/unix/sysv/linux/i386/Versions6
-rw-r--r--nptl/sysdeps/unix/sysv/linux/i386/smp.h2
-rw-r--r--nptl/sysdeps/unix/sysv/linux/kernel-features.h6
-rw-r--r--nptl/tst-stackguard1.c8
10 files changed, 61 insertions, 8 deletions
diff --git a/nptl/ChangeLog b/nptl/ChangeLog
index c1f8620eb4..d4ce128560 100644
--- a/nptl/ChangeLog
+++ b/nptl/ChangeLog
@@ -3926,6 +3926,15 @@
Use __sigfillset. Document that sigfillset does the right thing wrt
to SIGSETXID.
+2005-08-08 Jakub Jelinek <jakub@redhat.com>
+
+ * tst-stackguard1.c (do_test): Likewise.
+
+2005-07-29 Jakub Jelinek <jakub@redhat.com>
+
+ * tst-stackguard1.c (do_test): Don't fail if the poor man's
+ randomization doesn't work well enough.
+
2005-07-11 Jakub Jelinek <jakub@redhat.com>
[BZ #1102]
@@ -4662,6 +4671,11 @@
Move definition inside libpthread, libc, librt check. Provide
definition for rtld.
+2004-09-02 Jakub Jelinek <jakub@redhat.com>
+
+ * pthread_cond_destroy.c (__pthread_cond_destroy): If there are
+ waiters, awake all waiters on the associated mutex.
+
2004-09-02 Ulrich Drepper <drepper@redhat.com>
* sysdeps/alpha/jmpbuf-unwind.h: Define __libc_unwind_longjmp.
@@ -6736,6 +6750,11 @@
* Makefile [$(build-shared) = yes] (tests): Depend on $(test-modules).
+2003-07-22 Jakub Jelinek <jakub@redhat.com>
+
+ * descr.h: Don't include lowlevellock.h, pthreaddef.h and dl-sysdep.h
+ if __need_struct_pthread_size, instead define lll_lock_t.
+
2003-07-25 Jakub Jelinek <jakub@redhat.com>
* tst-cancel17.c (do_test): Check if aio_cancel failed.
diff --git a/nptl/Makefile b/nptl/Makefile
index 51b6ae51d7..5665b90d5e 100644
--- a/nptl/Makefile
+++ b/nptl/Makefile
@@ -342,7 +342,8 @@ endif
extra-objs += $(crti-objs) $(crtn-objs)
omit-deps += crti crtn
-CFLAGS-pt-initfini.s = -g0 -fPIC -fno-inline-functions $(fno-unit-at-a-time)
+CFLAGS-pt-initfini.s = -g0 -fPIC -fno-inline-functions $(fno-unit-at-a-time) \
+ -fno-asynchronous-unwind-tables
endif
CFLAGS-flockfile.c = -D_IO_MTSAFE_IO
@@ -529,15 +530,19 @@ $(addprefix $(objpfx), \
$(tests) $(xtests) $(test-srcs))): $(objpfx)libpthread.so \
$(objpfx)libpthread_nonshared.a
$(objpfx)tst-unload: $(common-objpfx)dlfcn/libdl.so
-# $(objpfx)../libc.so is used instead of $(common-objpfx)libc.so,
+# $(objpfx)linklibc.so is used instead of $(common-objpfx)libc.so,
# since otherwise libpthread.so comes before libc.so when linking.
$(addprefix $(objpfx), $(tests-reverse)): \
- $(objpfx)../libc.so $(objpfx)libpthread.so \
+ $(objpfx)linklibc.so $(objpfx)libpthread.so \
$(objpfx)libpthread_nonshared.a
$(objpfx)../libc.so: $(common-objpfx)libc.so ;
$(addprefix $(objpfx),$(tests-static) $(xtests-static)): $(objpfx)libpthread.a
$(objpfx)tst-atfork2.out: $(objpfx)tst-atfork2mod.so
+
+$(objpfx)linklibc.so: $(common-objpfx)libc.so
+ ln -s ../libc.so $@
+generated += libclink.so
else
$(addprefix $(objpfx),$(tests) $(test-srcs)): $(objpfx)libpthread.a
endif
diff --git a/nptl/Versions b/nptl/Versions
index f74941fa92..52ca0bfee0 100644
--- a/nptl/Versions
+++ b/nptl/Versions
@@ -29,6 +29,7 @@ libc {
GLIBC_PRIVATE {
# Internal libc interface to libpthread
__libc_dl_error_tsd;
+ __getrlimit;
}
}
diff --git a/nptl/allocatestack.c b/nptl/allocatestack.c
index 831e98e4ce..1ce9ed563d 100644
--- a/nptl/allocatestack.c
+++ b/nptl/allocatestack.c
@@ -994,7 +994,16 @@ setxid_mark_thread (struct xid_command *cmdp, struct pthread *t)
/* If the thread is exiting right now, ignore it. */
if ((ch & EXITING_BITMASK) != 0)
- return;
+ {
+ /* Release the futex if there is no other setxid in
+ progress. */
+ if ((ch & SETXID_BITMASK) == 0)
+ {
+ t->setxid_futex = 1;
+ lll_futex_wake (&t->setxid_futex, 1, LLL_PRIVATE);
+ }
+ return;
+ }
}
while (atomic_compare_and_exchange_bool_acq (&t->cancelhandling,
ch | SETXID_BITMASK, ch));
diff --git a/nptl/nptl-init.c b/nptl/nptl-init.c
index 851bab2bf1..c663f21ba6 100644
--- a/nptl/nptl-init.c
+++ b/nptl/nptl-init.c
@@ -396,7 +396,7 @@ __pthread_initialize_minimal_internal (void)
/* Determine the default allowed stack size. This is the size used
in case the user does not specify one. */
struct rlimit limit;
- if (getrlimit (RLIMIT_STACK, &limit) != 0
+ if (__getrlimit (RLIMIT_STACK, &limit) != 0
|| limit.rlim_cur == RLIM_INFINITY)
/* The system limit is not usable. Use an architecture-specific
default. */
diff --git a/nptl/sysdeps/unix/sysv/linux/bits/posix_opt.h b/nptl/sysdeps/unix/sysv/linux/bits/posix_opt.h
index 2550355cdc..e4f002a5c8 100644
--- a/nptl/sysdeps/unix/sysv/linux/bits/posix_opt.h
+++ b/nptl/sysdeps/unix/sysv/linux/bits/posix_opt.h
@@ -189,4 +189,7 @@
/* Typed memory objects are not available. */
#define _POSIX_TYPED_MEMORY_OBJECTS -1
+/* Streams are not available. */
+#define _XOPEN_STREAMS -1
+
#endif /* bits/posix_opt.h */
diff --git a/nptl/sysdeps/unix/sysv/linux/i386/Versions b/nptl/sysdeps/unix/sysv/linux/i386/Versions
new file mode 100644
index 0000000000..9d53804cb1
--- /dev/null
+++ b/nptl/sysdeps/unix/sysv/linux/i386/Versions
@@ -0,0 +1,6 @@
+libc {
+ GLIBC_PRIVATE {
+ # Internal libc interface to libpthread
+ __uname;
+ }
+}
diff --git a/nptl/sysdeps/unix/sysv/linux/i386/smp.h b/nptl/sysdeps/unix/sysv/linux/i386/smp.h
index f68a0c0758..bdff66555e 100644
--- a/nptl/sysdeps/unix/sysv/linux/i386/smp.h
+++ b/nptl/sysdeps/unix/sysv/linux/i386/smp.h
@@ -37,7 +37,7 @@ is_smp_system (void)
char *cp;
/* Try reading the number using `sysctl' first. */
- if (uname (&u.uts) == 0)
+ if (__uname (&u.uts) == 0)
cp = u.uts.version;
else
{
diff --git a/nptl/sysdeps/unix/sysv/linux/kernel-features.h b/nptl/sysdeps/unix/sysv/linux/kernel-features.h
new file mode 100644
index 0000000000..162d73e388
--- /dev/null
+++ b/nptl/sysdeps/unix/sysv/linux/kernel-features.h
@@ -0,0 +1,6 @@
+#include_next <kernel-features.h>
+
+/* NPTL can always assume all clone thread flags work. */
+#ifndef __ASSUME_CLONE_THREAD_FLAGS
+# define __ASSUME_CLONE_THREAD_FLAGS 1
+#endif
diff --git a/nptl/tst-stackguard1.c b/nptl/tst-stackguard1.c
index 15c30aeb6b..77ebbfbd7e 100644
--- a/nptl/tst-stackguard1.c
+++ b/nptl/tst-stackguard1.c
@@ -190,17 +190,21 @@ do_test (void)
the 16 runs, something is very wrong. */
int ndifferences = 0;
int ndefaults = 0;
+ int npartlyrandomized = 0;
for (i = 0; i < N; ++i)
{
if (child_stack_chk_guards[i] != child_stack_chk_guards[i+1])
ndifferences++;
else if (child_stack_chk_guards[i] == default_guard)
ndefaults++;
+ else if (*(char *) &child_stack_chk_guards[i] == 0)
+ npartlyrandomized++;
}
- printf ("differences %d defaults %d\n", ndifferences, ndefaults);
+ printf ("differences %d defaults %d partly randomized %d\n",
+ ndifferences, ndefaults, npartlyrandomized);
- if (ndifferences < N / 2 && ndefaults < N / 2)
+ if ((ndifferences + ndefaults + npartlyrandomized) < 3 * N / 4)
{
puts ("stack guard canaries are not randomized enough");
puts ("nor equal to the default canary value");