[llvm-branch-commits] [ubsan] Add runtime test for -fsanitize=local-bounds (PR #120038)

via llvm-branch-commits llvm-branch-commits at lists.llvm.org
Sun Dec 15 21:28:22 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 b42a2ec4a07d94c6c0d73d4baedf2ffef3d3825c 1e33ed956935df967b130f30e8e7b701f18304d3 --extensions cpp -- compiler-rt/test/ubsan/TestCases/Misc/local_bounds.cpp
``````````

</details>

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

``````````diff
diff --git a/compiler-rt/test/ubsan/TestCases/Misc/local_bounds.cpp b/compiler-rt/test/ubsan/TestCases/Misc/local_bounds.cpp
index 92e9e62dbc..edfe439c92 100644
--- a/compiler-rt/test/ubsan/TestCases/Misc/local_bounds.cpp
+++ b/compiler-rt/test/ubsan/TestCases/Misc/local_bounds.cpp
@@ -19,7 +19,7 @@ __attribute__((noinline, no_sanitize("memory"))) int test(char i) {
   init(&a);
   S b;
   init(&b);
-  return ((int*)(&a))[i];
+  return ((int *)(&a))[i];
 }
 
 int main(int argc, char **argv) {

``````````

</details>


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


More information about the llvm-branch-commits mailing list