diff options
author | Daniel Eischen <deischen@FreeBSD.org> | 2000-11-14 20:00:19 +0000 |
---|---|---|
committer | Daniel Eischen <deischen@FreeBSD.org> | 2000-11-14 20:00:19 +0000 |
commit | eb4463fde63561149e643ee41e628f39ae4937e0 (patch) | |
tree | c790d28d618d13dec634f12a032747e5a827e911 /lib/libc_r/uthread/uthread_sig.c | |
parent | fa167b8eaaf71290da0299e6320d4d4b6c85177b (diff) | |
download | src-eb4463fde63561149e643ee41e628f39ae4937e0.tar.gz src-eb4463fde63561149e643ee41e628f39ae4937e0.zip |
When entering the scheduler from the signal handler, tell
the kernel to (re)use the alternate signal stack. In this
case, we don't return normally from the signal handler,
so the kernel still thinks we are using the signal stack.
The fixes a nasty bug where the signal handler can start
fiddling with the stack of a thread while the handler is
actually running on the same stack.
MFC candidate
Notes
Notes:
svn path=/head/; revision=68726
Diffstat (limited to 'lib/libc_r/uthread/uthread_sig.c')
-rw-r--r-- | lib/libc_r/uthread/uthread_sig.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/libc_r/uthread/uthread_sig.c b/lib/libc_r/uthread/uthread_sig.c index 3bcd9c1360b1..3ac974036c55 100644 --- a/lib/libc_r/uthread/uthread_sig.c +++ b/lib/libc_r/uthread/uthread_sig.c @@ -1066,7 +1066,7 @@ thread_sigframe_add(pthread_t thread, int sig, int has_args) /* * Set up the context: */ - stackp += sizeof(double); + stackp -= sizeof(double); _setjmp(thread->ctx.jb); SET_STACK_JB(thread->ctx.jb, stackp); SET_RETURN_ADDR_JB(thread->ctx.jb, _thread_sig_wrapper); |