[compiler-rt] [NFCI] [hwasan] Add test demonstrating hwasan lsan false positive (PR #142874)

via llvm-commits llvm-commits at lists.llvm.org
Wed Jun 4 16:10:14 PDT 2025


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 HEAD~1 HEAD --extensions cpp -- compiler-rt/test/hwasan/TestCases/Posix/dlerror.cpp
``````````

</details>

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

``````````diff
diff --git a/compiler-rt/test/hwasan/TestCases/Posix/dlerror.cpp b/compiler-rt/test/hwasan/TestCases/Posix/dlerror.cpp
index 8b1e02771..3d19d24dd 100644
--- a/compiler-rt/test/hwasan/TestCases/Posix/dlerror.cpp
+++ b/compiler-rt/test/hwasan/TestCases/Posix/dlerror.cpp
@@ -19,8 +19,8 @@ int main(int argc, char **argv) {
   for (int i = 0; i < kKeys; ++i) {
     assert(pthread_key_create(&keys[i], nullptr) == 0);
   }
-  void* o = dlopen("invalid_file_name.so", 0);
-  const char* err = dlerror();
+  void *o = dlopen("invalid_file_name.so", 0);
+  const char *err = dlerror();
   for (int i = 0; i < kKeys; ++i) {
     assert(pthread_key_delete(keys[i]) == 0);
   }

``````````

</details>


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


More information about the llvm-commits mailing list