summaryrefslogtreecommitdiffstats
path: root/lib/libthr/thread
diff options
context:
space:
mode:
authordavidxu <davidxu@FreeBSD.org>2010-09-06 03:00:54 +0000
committerdavidxu <davidxu@FreeBSD.org>2010-09-06 03:00:54 +0000
commitbc339155433f72b9eaf04c2a77cd4aa0757c3519 (patch)
tree80b28d532316df44da931833a98c91a1561fdde4 /lib/libthr/thread
parent4225b461f748c8dfce1fcb051278caaa97ed9f08 (diff)
downloadFreeBSD-src-bc339155433f72b9eaf04c2a77cd4aa0757c3519.zip
FreeBSD-src-bc339155433f72b9eaf04c2a77cd4aa0757c3519.tar.gz
Fix off-by-one error in function _thr_sigact_unload, also disable the
function, it seems some gnome application tends to crash if we unregister sigaction automatically.
Diffstat (limited to 'lib/libthr/thread')
-rw-r--r--lib/libthr/thread/thr_sig.c8
1 files changed, 5 insertions, 3 deletions
diff --git a/lib/libthr/thread/thr_sig.c b/lib/libthr/thread/thr_sig.c
index b6755f9..5067e64 100644
--- a/lib/libthr/thread/thr_sig.c
+++ b/lib/libthr/thread/thr_sig.c
@@ -418,6 +418,7 @@ _thr_signal_init(void)
void
_thr_sigact_unload(struct dl_phdr_info *phdr_info)
{
+#if 0
struct pthread *curthread = _get_curthread();
struct urwlock *rwlp;
struct sigaction *actp;
@@ -426,13 +427,13 @@ _thr_sigact_unload(struct dl_phdr_info *phdr_info)
int sig;
_thr_signal_block(curthread);
- for (sig = 1; sig < _SIG_MAXSIG; sig++) {
- actp = &_thr_sigact[sig].sigact;
+ for (sig = 1; sig <= _SIG_MAXSIG; sig++) {
+ actp = &_thr_sigact[sig-1].sigact;
retry:
handler = actp->sa_handler;
if (handler != SIG_DFL && handler != SIG_IGN &&
__elf_phdr_match_addr(phdr_info, handler)) {
- rwlp = &_thr_sigact[sig].lock;
+ rwlp = &_thr_sigact[sig-1].lock;
_thr_rwl_wrlock(rwlp);
if (handler != actp->sa_handler) {
_thr_rwl_unlock(rwlp);
@@ -449,6 +450,7 @@ retry:
}
}
_thr_signal_unblock(curthread);
+#endif
}
void
OpenPOWER on IntegriCloud