[compiler-rt] [HWASAN] Add test to detected use after free in memcmp (PR #67204)

via llvm-commits llvm-commits at lists.llvm.org
Fri Sep 22 16:13:34 PDT 2023


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 d4addec4224ac10f6e9b372704e22574c07b0a1f 3483b52cfaec660a0acc577679d0f4ce3e7e7eef -- compiler-rt/test/sanitizer_common/TestCases/memcmp.cpp
``````````

</details>

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

``````````diff
diff --git a/compiler-rt/test/sanitizer_common/TestCases/memcmp.cpp b/compiler-rt/test/sanitizer_common/TestCases/memcmp.cpp
index 23fe8e2cfe0d..306c4bd21cf9 100644
--- a/compiler-rt/test/sanitizer_common/TestCases/memcmp.cpp
+++ b/compiler-rt/test/sanitizer_common/TestCases/memcmp.cpp
@@ -4,10 +4,10 @@
 // FIXME: HWASAN should work when we have intercepptors.
 // UNSUPPORTED: hwasan
 
-#include <cstring>
 #include <cstdio>
+#include <cstring>
 
-int main(int argc, char** argv) {
+int main(int argc, char **argv) {
   int *x = new int(7);
   delete x;
   // Trigger use after free error.

``````````

</details>


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


More information about the llvm-commits mailing list