llvmbot wrote:

<!--LLVM PR SUMMARY COMMENT-->

@llvm/pr-subscribers-compiler-rt-sanitizer

Author: David CARLIER (devnexen)

<details>
<summary>Changes</summary>

…in attempt (#<!-- -->106902)

---
Full diff: https://github.com/llvm/llvm-project/pull/106908.diff


1 Files Affected:

- (modified) compiler-rt/lib/fuzzer/FuzzerUtilWindows.cpp (+4) 


``````````diff
diff --git a/compiler-rt/lib/fuzzer/FuzzerUtilWindows.cpp 
b/compiler-rt/lib/fuzzer/FuzzerUtilWindows.cpp
index db80eb383885e6..b262755fa436b2 100644
--- a/compiler-rt/lib/fuzzer/FuzzerUtilWindows.cpp
+++ b/compiler-rt/lib/fuzzer/FuzzerUtilWindows.cpp
@@ -239,6 +239,7 @@ size_t PageSize() {
 }
 
 void SetThreadName(std::thread &thread, const std::string &name) {
+#if !defined(__MINGW32__)
   typedef HRESULT(WINAPI * proc)(HANDLE, PCWSTR);
   HMODULE kbase = GetModuleHandleA("KernelBase.dll");
   proc ThreadNameProc =
@@ -253,6 +254,9 @@ void SetThreadName(std::thread &thread, const std::string 
&name) {
       }
     }
   }
+#else
+  (void)pthread_setname_np(thread.native_handle(), name.c_str());
+#endif
 }
 
 } // namespace fuzzer

``````````

</details>


https://github.com/llvm/llvm-project/pull/106908
_______________________________________________
llvm-branch-commits mailing list
llvm-branch-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-branch-commits

Reply via email to