[compiler-rt] d364597 - [fuzzer] Try to fix windows build after D156317
Vitaly Buka via llvm-commits
llvm-commits at lists.llvm.org
Mon Aug 28 10:47:59 PDT 2023
Author: Vitaly Buka
Date: 2023-08-28T10:47:38-07:00
New Revision: d364597f8a479a4e223bc3194f5584f26b5aa7a5
URL: https://github.com/llvm/llvm-project/commit/d364597f8a479a4e223bc3194f5584f26b5aa7a5
DIFF: https://github.com/llvm/llvm-project/commit/d364597f8a479a4e223bc3194f5584f26b5aa7a5.diff
LOG: [fuzzer] Try to fix windows build after D156317
Added:
Modified:
compiler-rt/lib/fuzzer/FuzzerUtilWindows.cpp
Removed:
################################################################################
diff --git a/compiler-rt/lib/fuzzer/FuzzerUtilWindows.cpp b/compiler-rt/lib/fuzzer/FuzzerUtilWindows.cpp
index 6bcba6151f2681..85742b105de03c 100644
--- a/compiler-rt/lib/fuzzer/FuzzerUtilWindows.cpp
+++ b/compiler-rt/lib/fuzzer/FuzzerUtilWindows.cpp
@@ -237,9 +237,10 @@ void SetThreadName(std::thread &thread, const std::string &name) {
std::wstring wname;
auto sz = MultiByteToWideChar(CP_UTF8, 0, name.data(), name.size(), nullptr, 0);
wname.resize(sz);
- if (sz == MultiByteToWideChar(CP_UTF8, 0, name.data, name.size, &wname[0], sz) > 0) {
- wname.resize(sz - 1);
- (void)SetThreadDescription(thread.native_handle(), wname.c_str());
+ if (sz == MultiByteToWideChar(CP_UTF8, 0, name.data, name.size, wname.data(),
+ sz) > 0) {
+ wname.resize(sz - 1);
+ (void)SetThreadDescription(thread.native_handle(), wname.c_str());
}
}
More information about the llvm-commits
mailing list