From 66af8bde13a515b8d0fa76201f0d5b428187fd13 Mon Sep 17 00:00:00 2001 From: Sam McCall Date: Thu, 2 Nov 2017 12:29:47 +0000 Subject: [PATCH] Temporary workaround for msan false positive. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@317203 91177308-0d34-0410-b5e6-96231b3b80d8 --- lib/Support/Unix/Threading.inc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/Support/Unix/Threading.inc b/lib/Support/Unix/Threading.inc index 34bc906b058..7369cff8466 100644 --- a/lib/Support/Unix/Threading.inc +++ b/lib/Support/Unix/Threading.inc @@ -206,7 +206,7 @@ void llvm::get_thread_name(SmallVectorImpl &Name) { #if (defined(__GLIBC__) && defined(_GNU_SOURCE)) || defined(__ANDROID__) #if HAVE_PTHREAD_GETNAME_NP constexpr uint32_t len = get_max_thread_name_length_impl(); - char Buffer[len]; + char Buffer[len] = {'\0'}; // FIXME: working around MSan false positive. if (0 == ::pthread_getname_np(::pthread_self(), Buffer, len)) Name.append(Buffer, Buffer + strlen(Buffer)); #endif -- 2.40.0