Skip to content

Commit 66af8bd

Browse files
committed
Temporary workaround for msan false positive.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@317203 91177308-0d34-0410-b5e6-96231b3b80d8
1 parent 122fe39 commit 66af8bd

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

lib/Support/Unix/Threading.inc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -206,7 +206,7 @@ void llvm::get_thread_name(SmallVectorImpl<char> &Name) {
206206
#if (defined(__GLIBC__) && defined(_GNU_SOURCE)) || defined(__ANDROID__)
207207
#if HAVE_PTHREAD_GETNAME_NP
208208
constexpr uint32_t len = get_max_thread_name_length_impl();
209-
char Buffer[len];
209+
char Buffer[len] = {'\0'}; // FIXME: working around MSan false positive.
210210
if (0 == ::pthread_getname_np(::pthread_self(), Buffer, len))
211211
Name.append(Buffer, Buffer + strlen(Buffer));
212212
#endif

0 commit comments

Comments
 (0)