[llvm] [compiler-rt] [asan] Enable StackSafetyAnalysis by default (PR #77210)

via llvm-commits llvm-commits at lists.llvm.org
Sat Jan 6 13:18:50 PST 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 80dbf601d1815ff90b5aee18f426da964920dbe7 0e33450f57e392c9a8d317cf73e46b2fd09b3d87 -- compiler-rt/test/asan/TestCases/alloca_vla_interact.cpp compiler-rt/test/asan/TestCases/scariness_score_test.cpp llvm/lib/Transforms/Instrumentation/AddressSanitizer.cpp
``````````

</details>

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

``````````diff
diff --git a/compiler-rt/test/asan/TestCases/alloca_vla_interact.cpp b/compiler-rt/test/asan/TestCases/alloca_vla_interact.cpp
index 96ac4c7db2..6b8fd29919 100644
--- a/compiler-rt/test/asan/TestCases/alloca_vla_interact.cpp
+++ b/compiler-rt/test/asan/TestCases/alloca_vla_interact.cpp
@@ -34,7 +34,8 @@ __attribute__((noinline)) void foo(int len) {
     // VLA is unpoisoned at the end of iteration.
     volatile char array[i];
     // Ensure that asan-use-stack-safety does not optimize out the poisoning.
-    if (i) array[0] = 0;
+    if (i)
+      array[0] = 0;
     assert(!(reinterpret_cast<uintptr_t>(array) & 31L));
     // Alloca is unpoisoned at the end of iteration,
     // because dominated by VLA.

``````````

</details>


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


More information about the llvm-commits mailing list