[llvm] Fix thread handle leak on Windows (PR #156854)
via llvm-commits
llvm-commits at lists.llvm.org
Mon Sep 8 04:12:43 PDT 2025
=?utf-8?q?Ćukasz?= Mielicki <lukasz.mielicki at intel.com>
Message-ID:
In-Reply-To: <llvm.org/llvm/llvm-project/pull/156854 at github.com>
github-actions[bot] wrote:
<!--LLVM CODE FORMAT COMMENT: {clang-format}-->
:warning: C/C++ code formatter, clang-format found issues in your code. :warning:
<details>
<summary>
You can test this locally with the following command:
</summary>
``````````bash
git-clang-format --diff origin/main HEAD --extensions inc -- llvm/lib/Support/Windows/Threading.inc
``````````
:warning:
The reproduction instructions above might return results for more than one PR
in a stack if you are using a stacked PR workflow. You can limit the results by
changing `origin/main` to the base branch/commit you want to compare against.
:warning:
</details>
<details>
<summary>
View the diff from clang-format here.
</summary>
``````````diff
diff --git a/llvm/lib/Support/Windows/Threading.inc b/llvm/lib/Support/Windows/Threading.inc
index 6fb67ac8c..968423b98 100644
--- a/llvm/lib/Support/Windows/Threading.inc
+++ b/llvm/lib/Support/Windows/Threading.inc
@@ -201,7 +201,7 @@ template <typename F>
static bool IterateProcInfo(LOGICAL_PROCESSOR_RELATIONSHIP Relationship, F Fn) {
DWORD Len = 0;
BOOL R = ::GetLogicalProcessorInformationEx(Relationship, NULL, &Len);
- if (R || GetLastError() != ERROR_INSUFFICIENT_BUFFER)
+ if (R || GetLastError() != ERROR_INSUFFICIENT_BUFFER)
return false;
auto *Info = (SYSTEM_LOGICAL_PROCESSOR_INFORMATION_EX *)calloc(1, Len);
``````````
</details>
https://github.com/llvm/llvm-project/pull/156854
More information about the llvm-commits
mailing list