tsan: prevent recursive signal handlers

llvm-svn: 157625
This commit is contained in:
Dmitry Vyukov 2012-05-29 15:51:27 +00:00
parent 312b28ce9d
commit 92d917d91c
1 changed files with 1 additions and 0 deletions

View File

@ -1256,6 +1256,7 @@ TSAN_INTERCEPTOR(int, sigaction, int sig, sigaction_t *act, sigaction_t *old) {
return 0;
sigactions[sig] = *act;
sigaction_t newact = *act;
sigfillset(&newact.sa_mask);
if (act->sa_handler != SIG_IGN && act->sa_handler != SIG_DFL) {
if (newact.sa_flags & SA_SIGINFO)
newact.sa_sigaction = rtl_sigaction;