[compiler-rt][msan] Ensure initialisation before calling __msan_unpoison

__msan_unpoison uses intercepted memset which currently leads to a SEGV
when linking with libc++ under CentOS 7.

Differential Revision: http://reviews.llvm.org/D17263

llvm-svn: 261073
This commit is contained in:
Jonas Hahnfeld 2016-02-17 07:12:18 +00:00
parent 8bce5a053d
commit ffed72bbeb
1 changed files with 2 additions and 2 deletions

View File

@ -1433,12 +1433,12 @@ int OnExit() {
__msan_unpoison(ptr, size)
#define COMMON_INTERCEPTOR_ENTER(ctx, func, ...) \
if (msan_init_is_running) return REAL(func)(__VA_ARGS__); \
ENSURE_MSAN_INITED(); \
MSanInterceptorContext msan_ctx = {IsInInterceptorScope()}; \
ctx = (void *)&msan_ctx; \
(void)ctx; \
InterceptorScope interceptor_scope; \
__msan_unpoison(__errno_location(), sizeof(int)); /* NOLINT */ \
ENSURE_MSAN_INITED();
__msan_unpoison(__errno_location(), sizeof(int)); /* NOLINT */
#define COMMON_INTERCEPTOR_DIR_ACQUIRE(ctx, path) \
do { \
} while (false)