svn commit: r212245 - head/lib/libthr/thread
David Xu
davidxu at FreeBSD.org
Mon Sep 6 03:00:54 UTC 2010
Author: davidxu
Date: Mon Sep 6 03:00:54 2010
New Revision: 212245
URL: http://svn.freebsd.org/changeset/base/212245
Log:
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.
Modified:
head/lib/libthr/thread/thr_sig.c
Modified: head/lib/libthr/thread/thr_sig.c
==============================================================================
--- head/lib/libthr/thread/thr_sig.c Sun Sep 5 21:44:50 2010 (r212244)
+++ head/lib/libthr/thread/thr_sig.c Mon Sep 6 03:00:54 2010 (r212245)
@@ -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 *
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
More information about the svn-src-head
mailing list