[compiler-rt] [scudo] [MTE] resize stack depot for allocation ring buffer (PR #74515)

via llvm-commits llvm-commits at lists.llvm.org
Wed Dec 13 15:52:58 PST 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 31b72b0742b09c970bea47b70eb535fe964e3c8f 3ff01eacd0fe13da16b83c86abe216cdb423caef -- compiler-rt/lib/scudo/standalone/combined.h compiler-rt/lib/scudo/standalone/fuzz/get_error_info_fuzzer.cpp compiler-rt/lib/scudo/standalone/platform.h compiler-rt/lib/scudo/standalone/stack_depot.h compiler-rt/lib/scudo/standalone/tests/combined_test.cpp compiler-rt/lib/scudo/standalone/wrappers_c_bionic.cpp
``````````

</details>

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

``````````diff
diff --git a/compiler-rt/lib/scudo/standalone/stack_depot.h b/compiler-rt/lib/scudo/standalone/stack_depot.h
index e7caa8a3d9..1699d5be1e 100644
--- a/compiler-rt/lib/scudo/standalone/stack_depot.h
+++ b/compiler-rt/lib/scudo/standalone/stack_depot.h
@@ -138,12 +138,12 @@ public:
     u32 Hash = B.get();
 
     u32 Pos = Hash & TabMask;
-   atomic_u32 *Tab = getTab(RawStackDepot);
-   atomic_u64 *Ring = getRing(RawStackDepot);
-   u32 RingPos = atomic_load_relaxed(&Tab[Pos]);
-   u64 Entry = atomic_load_relaxed(&Ring[RingPos]);
-   
-   // And the following uses of Tab/Ring
+    atomic_u32 *Tab = getTab(RawStackDepot);
+    atomic_u64 *Ring = getRing(RawStackDepot);
+    u32 RingPos = atomic_load_relaxed(&Tab[Pos]);
+    u64 Entry = atomic_load_relaxed(&Ring[RingPos]);
+
+    // And the following uses of Tab/Ring
     u64 Id = (u64(End - Begin) << 33) | (u64(Hash) << 1) | 1;
     if (Entry == Id)
       return Hash;

``````````

</details>


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


More information about the llvm-commits mailing list