[llvm] [Windows] Avoid loading shared system libraries from user directory (PR #90520)

via llvm-commits llvm-commits at lists.llvm.org
Tue Apr 30 06:24:43 PDT 2024


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 a5cc95147ed549e850b4e9641e84641e781e0ceb 9411b4f1582188dba656658f871fc777c983f351 -- llvm/lib/Support/Windows/Signals.inc
``````````

</details>

<details>
<summary>
View the diff from clang-format here.
</summary>

``````````diff
diff --git a/llvm/lib/Support/Windows/Signals.inc b/llvm/lib/Support/Windows/Signals.inc
index 4852aa4a80..103604516d 100644
--- a/llvm/lib/Support/Windows/Signals.inc
+++ b/llvm/lib/Support/Windows/Signals.inc
@@ -168,12 +168,14 @@ static bool isDebugHelpInitialized() {
 }
 
 static bool load64BitDebugHelp(void) {
-  HMODULE hLibCore = ::LoadLibraryExA("Dbgcore.dll", NULL, LOAD_LIBRARY_SEARCH_SYSTEM32);
+  HMODULE hLibCore =
+      ::LoadLibraryExA("Dbgcore.dll", NULL, LOAD_LIBRARY_SEARCH_SYSTEM32);
   if (hLibCore) {
     fMiniDumpWriteDump =
         (fpMiniDumpWriteDump)::GetProcAddress(hLibCore, "MiniDumpWriteDump");
   }
-  HMODULE hLib = ::LoadLibraryExA("Dbghelp.dll", NULL, LOAD_LIBRARY_SEARCH_SYSTEM32);
+  HMODULE hLib =
+      ::LoadLibraryExA("Dbghelp.dll", NULL, LOAD_LIBRARY_SEARCH_SYSTEM32);
   if (hLib) {
     fStackWalk64 = (fpStackWalk64)::GetProcAddress(hLib, "StackWalk64");
     fSymGetModuleBase64 =

``````````

</details>


https://github.com/llvm/llvm-project/pull/90520


More information about the llvm-commits mailing list