summaryrefslogtreecommitdiff
path: root/lib/msan/msan_interceptors.cc
diff options
context:
space:
mode:
authorVitaly Buka <vitalybuka@google.com>2017-11-11 03:03:34 +0000
committerVitaly Buka <vitalybuka@google.com>2017-11-11 03:03:34 +0000
commit42df8011b906358522219a262e6fbd2e47e7a3d6 (patch)
tree2f70f85562388ad87ffbc285013063ecd75c4846 /lib/msan/msan_interceptors.cc
parent4eb81d264dde37f70252d16e7428945e8936699e (diff)
downloadcompiler-rt-42df8011b906358522219a262e6fbd2e47e7a3d6.tar.gz
[msan] Fix signal chaining
Return internally stored handlers only if handlers is set to wrapper git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@317970 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/msan/msan_interceptors.cc')
-rw-r--r--lib/msan/msan_interceptors.cc2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/msan/msan_interceptors.cc b/lib/msan/msan_interceptors.cc
index fd63d0765..43181fb9d 100644
--- a/lib/msan/msan_interceptors.cc
+++ b/lib/msan/msan_interceptors.cc
@@ -1301,7 +1301,7 @@ static int sigaction_impl(int signo, const __sanitizer_sigaction *act,
res = REAL(sigaction)(signo, pnew_act, oldact);
if (res == 0 && oldact) {
uptr cb = (uptr)oldact->sigaction;
- if (cb != __sanitizer::sig_ign && cb != __sanitizer::sig_dfl) {
+ if (cb == (uptr)SignalAction || cb == (uptr)SignalHandler) {
oldact->sigaction = (decltype(oldact->sigaction))old_cb;
}
}