Skip to content

Commit df7f870

Browse files
authored
Merge pull request #10415 from z2oh/cherrypick-20240723-clear-win-thread-name-container
[🍒] [lldb] Clear thread name container before writing UTF8 bytes (llvm#134150)
2 parents 140bf2f + f9f5690 commit df7f870

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

lldb/source/Plugins/Process/Windows/Common/TargetThreadWindows.cpp

+1
Original file line numberDiff line numberDiff line change
@@ -191,6 +191,7 @@ const char *TargetThreadWindows::GetName() {
191191
if (SUCCEEDED(GetThreadDescription(
192192
m_host_thread.GetNativeThread().GetSystemHandle(), &pszThreadName))) {
193193
LLDB_LOGF(log, "GetThreadDescription: %ls", pszThreadName);
194+
m_name.clear();
194195
llvm::convertUTF16ToUTF8String(
195196
llvm::ArrayRef(reinterpret_cast<char *>(pszThreadName),
196197
wcslen(pszThreadName) * sizeof(wchar_t)),

0 commit comments

Comments
 (0)