[compiler-rt] [scudo] Add ScopedTSD to avoid releasing TSD manually (PR #72303)

via llvm-commits llvm-commits at lists.llvm.org
Tue Nov 14 11:42:25 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 e823136d43c40b0a9ba6930fd285768f1b46fcb6 7316b7b87b35b04aa20e02569ca1c4e4922b2c0b -- compiler-rt/lib/scudo/standalone/combined.h compiler-rt/lib/scudo/standalone/tests/combined_test.cpp compiler-rt/lib/scudo/standalone/tests/tsd_test.cpp compiler-rt/lib/scudo/standalone/tsd_exclusive.h compiler-rt/lib/scudo/standalone/tsd_shared.h
``````````

</details>

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

``````````diff
diff --git a/compiler-rt/lib/scudo/standalone/tsd_shared.h b/compiler-rt/lib/scudo/standalone/tsd_shared.h
index a2e9bb3d4a..0ac2be3d4c 100644
--- a/compiler-rt/lib/scudo/standalone/tsd_shared.h
+++ b/compiler-rt/lib/scudo/standalone/tsd_shared.h
@@ -133,8 +133,7 @@ struct TSDRegistrySharedT {
   }
 
 private:
-  ALWAYS_INLINE TSD<Allocator> *
-  getTSDAndLock() NO_THREAD_SAFETY_ANALYSIS {
+  ALWAYS_INLINE TSD<Allocator> *getTSDAndLock() NO_THREAD_SAFETY_ANALYSIS {
     TSD<Allocator> *TSD = getCurrentTSD();
     DCHECK(TSD);
     // Try to lock the currently associated context.

``````````

</details>


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


More information about the llvm-commits mailing list