summaryrefslogtreecommitdiffstats
path: root/libexec/rtld-elf
diff options
context:
space:
mode:
authorjdp <jdp@FreeBSD.org>2000-01-25 01:32:56 +0000
committerjdp <jdp@FreeBSD.org>2000-01-25 01:32:56 +0000
commit3a655f20e77c97e02a3904030919f8861063f55d (patch)
tree9933170818f7966ca5b082a14c91ef617eac3ec8 /libexec/rtld-elf
parent2dec7cab29ee1392b6b971760441849879293719 (diff)
downloadFreeBSD-src-3a655f20e77c97e02a3904030919f8861063f55d.zip
FreeBSD-src-3a655f20e77c97e02a3904030919f8861063f55d.tar.gz
Block almost all signals in the default locking method instead of
just a few of them. This looks like it solves the recent ld-elf.so.1: assert failed: /usr/src/libexec/rtld-elf/lockdflt.c:55 failures seen by some applications such as JDK.
Diffstat (limited to 'libexec/rtld-elf')
-rw-r--r--libexec/rtld-elf/alpha/lockdflt.c18
-rw-r--r--libexec/rtld-elf/amd64/lockdflt.c18
-rw-r--r--libexec/rtld-elf/i386/lockdflt.c18
-rw-r--r--libexec/rtld-elf/lockdflt.c18
4 files changed, 40 insertions, 32 deletions
diff --git a/libexec/rtld-elf/alpha/lockdflt.c b/libexec/rtld-elf/alpha/lockdflt.c
index f9dbc5d..4233b36 100644
--- a/libexec/rtld-elf/alpha/lockdflt.c
+++ b/libexec/rtld-elf/alpha/lockdflt.c
@@ -28,10 +28,9 @@
/*
* Default thread locking implementation for the dynamic linker. It
* is used until the client registers a different implementation with
- * dllockinit(). The default implementation does mutual exclusion
- * by blocking the SIGVTALRM, SIGPROF, and SIGALRM signals. This is
- * based on the observation that most userland thread packages use one
- * of these signals to support preemption.
+ * dllockinit(). The default implementation does mutual exclusion by
+ * blocking almost all signals. This is based on the observation that
+ * most userland thread packages use signals to support preemption.
*/
#include <dlfcn.h>
@@ -63,10 +62,13 @@ lockdflt_create(void *context)
l = NEW(LockDflt);
l->depth = 0;
- sigemptyset(&l->lock_mask);
- sigaddset(&l->lock_mask, SIGVTALRM);
- sigaddset(&l->lock_mask, SIGPROF);
- sigaddset(&l->lock_mask, SIGALRM);
+ sigfillset(&l->lock_mask);
+ sigdelset(&l->lock_mask, SIGTRAP);
+ sigdelset(&l->lock_mask, SIGABRT);
+ sigdelset(&l->lock_mask, SIGBUS);
+ sigdelset(&l->lock_mask, SIGSEGV);
+ sigdelset(&l->lock_mask, SIGKILL);
+ sigdelset(&l->lock_mask, SIGSTOP);
return l;
}
diff --git a/libexec/rtld-elf/amd64/lockdflt.c b/libexec/rtld-elf/amd64/lockdflt.c
index f9dbc5d..4233b36 100644
--- a/libexec/rtld-elf/amd64/lockdflt.c
+++ b/libexec/rtld-elf/amd64/lockdflt.c
@@ -28,10 +28,9 @@
/*
* Default thread locking implementation for the dynamic linker. It
* is used until the client registers a different implementation with
- * dllockinit(). The default implementation does mutual exclusion
- * by blocking the SIGVTALRM, SIGPROF, and SIGALRM signals. This is
- * based on the observation that most userland thread packages use one
- * of these signals to support preemption.
+ * dllockinit(). The default implementation does mutual exclusion by
+ * blocking almost all signals. This is based on the observation that
+ * most userland thread packages use signals to support preemption.
*/
#include <dlfcn.h>
@@ -63,10 +62,13 @@ lockdflt_create(void *context)
l = NEW(LockDflt);
l->depth = 0;
- sigemptyset(&l->lock_mask);
- sigaddset(&l->lock_mask, SIGVTALRM);
- sigaddset(&l->lock_mask, SIGPROF);
- sigaddset(&l->lock_mask, SIGALRM);
+ sigfillset(&l->lock_mask);
+ sigdelset(&l->lock_mask, SIGTRAP);
+ sigdelset(&l->lock_mask, SIGABRT);
+ sigdelset(&l->lock_mask, SIGBUS);
+ sigdelset(&l->lock_mask, SIGSEGV);
+ sigdelset(&l->lock_mask, SIGKILL);
+ sigdelset(&l->lock_mask, SIGSTOP);
return l;
}
diff --git a/libexec/rtld-elf/i386/lockdflt.c b/libexec/rtld-elf/i386/lockdflt.c
index f9dbc5d..4233b36 100644
--- a/libexec/rtld-elf/i386/lockdflt.c
+++ b/libexec/rtld-elf/i386/lockdflt.c
@@ -28,10 +28,9 @@
/*
* Default thread locking implementation for the dynamic linker. It
* is used until the client registers a different implementation with
- * dllockinit(). The default implementation does mutual exclusion
- * by blocking the SIGVTALRM, SIGPROF, and SIGALRM signals. This is
- * based on the observation that most userland thread packages use one
- * of these signals to support preemption.
+ * dllockinit(). The default implementation does mutual exclusion by
+ * blocking almost all signals. This is based on the observation that
+ * most userland thread packages use signals to support preemption.
*/
#include <dlfcn.h>
@@ -63,10 +62,13 @@ lockdflt_create(void *context)
l = NEW(LockDflt);
l->depth = 0;
- sigemptyset(&l->lock_mask);
- sigaddset(&l->lock_mask, SIGVTALRM);
- sigaddset(&l->lock_mask, SIGPROF);
- sigaddset(&l->lock_mask, SIGALRM);
+ sigfillset(&l->lock_mask);
+ sigdelset(&l->lock_mask, SIGTRAP);
+ sigdelset(&l->lock_mask, SIGABRT);
+ sigdelset(&l->lock_mask, SIGBUS);
+ sigdelset(&l->lock_mask, SIGSEGV);
+ sigdelset(&l->lock_mask, SIGKILL);
+ sigdelset(&l->lock_mask, SIGSTOP);
return l;
}
diff --git a/libexec/rtld-elf/lockdflt.c b/libexec/rtld-elf/lockdflt.c
index f9dbc5d..4233b36 100644
--- a/libexec/rtld-elf/lockdflt.c
+++ b/libexec/rtld-elf/lockdflt.c
@@ -28,10 +28,9 @@
/*
* Default thread locking implementation for the dynamic linker. It
* is used until the client registers a different implementation with
- * dllockinit(). The default implementation does mutual exclusion
- * by blocking the SIGVTALRM, SIGPROF, and SIGALRM signals. This is
- * based on the observation that most userland thread packages use one
- * of these signals to support preemption.
+ * dllockinit(). The default implementation does mutual exclusion by
+ * blocking almost all signals. This is based on the observation that
+ * most userland thread packages use signals to support preemption.
*/
#include <dlfcn.h>
@@ -63,10 +62,13 @@ lockdflt_create(void *context)
l = NEW(LockDflt);
l->depth = 0;
- sigemptyset(&l->lock_mask);
- sigaddset(&l->lock_mask, SIGVTALRM);
- sigaddset(&l->lock_mask, SIGPROF);
- sigaddset(&l->lock_mask, SIGALRM);
+ sigfillset(&l->lock_mask);
+ sigdelset(&l->lock_mask, SIGTRAP);
+ sigdelset(&l->lock_mask, SIGABRT);
+ sigdelset(&l->lock_mask, SIGBUS);
+ sigdelset(&l->lock_mask, SIGSEGV);
+ sigdelset(&l->lock_mask, SIGKILL);
+ sigdelset(&l->lock_mask, SIGSTOP);
return l;
}
OpenPOWER on IntegriCloud