[llvm] r317203 - Temporary workaround for msan false positive.
Sam McCall via llvm-commits
llvm-commits at lists.llvm.org
Thu Nov 2 05:29:47 PDT 2017
Author: sammccall
Date: Thu Nov 2 05:29:47 2017
New Revision: 317203
URL: http://llvm.org/viewvc/llvm-project?rev=317203&view=rev
Log:
Temporary workaround for msan false positive.
Modified:
llvm/trunk/lib/Support/Unix/Threading.inc
Modified: llvm/trunk/lib/Support/Unix/Threading.inc
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Support/Unix/Threading.inc?rev=317203&r1=317202&r2=317203&view=diff
==============================================================================
--- llvm/trunk/lib/Support/Unix/Threading.inc (original)
+++ llvm/trunk/lib/Support/Unix/Threading.inc Thu Nov 2 05:29:47 2017
@@ -206,7 +206,7 @@ void llvm::get_thread_name(SmallVectorIm
#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
More information about the llvm-commits
mailing list