Disable recursive interceptors in signal(3)/MSan

Summary:
signal(3) on NetBSD calls internally sigaction(2).

Without disabling the recursive interceptor, there are
false positives about uninitialized memory reads inside libc.

This change fixes execution of such programs as sh(1) and
vmstat(1) in the NetBSD userland.

Sponsored by <The NetBSD Foundation>

Reviewers: eugenis, vitalybuka, joerg

Reviewed By: vitalybuka

Subscribers: llvm-commits, #sanitizers

Tags: #sanitizers

Differential Revision: https://reviews.llvm.org/D47650

llvm-svn: 334168
This commit is contained in:
Kamil Rytarowski 2018-06-07 07:55:20 +00:00
parent 8c91d4cb04
commit b9c78e41ba
1 changed files with 1 additions and 0 deletions

View File

@ -1292,6 +1292,7 @@ static int sigaction_impl(int signo, const __sanitizer_sigaction *act,
#define SIGNAL_INTERCEPTOR_SIGNAL_IMPL(func, signo, handler) \
{ \
handler = signal_impl(signo, handler); \
InterceptorScope interceptor_scope; \
return REAL(func)(signo, handler); \
}