[compiler-rt] cb924dd - Revert "[Fuzzer] SetThreadName implementation for Windows"

David Carlier via llvm-commits llvm-commits at lists.llvm.org
Thu Jul 27 22:00:55 PDT 2023


Author: David Carlier
Date: 2023-07-28T06:00:42+01:00
New Revision: cb924ddca514bbb3111ae40761b0c644c4b8ee90

URL: https://github.com/llvm/llvm-project/commit/cb924ddca514bbb3111ae40761b0c644c4b8ee90
DIFF: https://github.com/llvm/llvm-project/commit/cb924ddca514bbb3111ae40761b0c644c4b8ee90.diff

LOG: Revert "[Fuzzer] SetThreadName implementation for Windows"

This reverts commit 885275bff21512fca5dcdaf1b3a30c62dcc585e6.

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 71cdeeba414be5..71770166805f78 100644
--- a/compiler-rt/lib/fuzzer/FuzzerUtilWindows.cpp
+++ b/compiler-rt/lib/fuzzer/FuzzerUtilWindows.cpp
@@ -234,14 +234,8 @@ size_t PageSize() {
 }
 
 void SetThreadName(std::thread &thread, const std::string &name) {
-  auto sz =
-      MultiByteToWideChar(CP_UTF8, 0, name.data(), name.size(), nullptr, 0);
-  std::wstring wname(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());
-  }
+  // TODO ?
+  // to UTF-8 then SetThreadDescription ?
 }
 
 } // namespace fuzzer


        


More information about the llvm-commits mailing list