From 0ab085c67585346958e8f1d3a3413c543b0196ba Mon Sep 17 00:00:00 2001 From: Jonas Hahnfeld Date: Wed, 17 Feb 2016 07:12:18 +0000 Subject: [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 --- lib/msan/msan_interceptors.cc | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'lib/msan') 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) -- cgit v1.2.3