summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJonas Hahnfeld <Hahnfeld@itc.rwth-aachen.de>2016-02-17 07:12:18 +0000
committerJonas Hahnfeld <Hahnfeld@itc.rwth-aachen.de>2016-02-17 07:12:18 +0000
commit0ab085c67585346958e8f1d3a3413c543b0196ba (patch)
tree3565372ec3ac660644c66897d03285a09cdbf9ef
parent5c94131384ddf9d272c0460f17da108fa0beedd8 (diff)
[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 git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@261073 91177308-0d34-0410-b5e6-96231b3b80d8
-rw-r--r--lib/msan/msan_interceptors.cc4
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/msan/msan_interceptors.cc b/lib/msan/msan_interceptors.cc
index 005705efa..2e8830281 100644
--- a/lib/msan/msan_interceptors.cc
+++ b/lib/msan/msan_interceptors.cc
@@ -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)