[compiler-rt] [NFC][TSan] Move RestoreStack before ScopedReport in ReportDestroyLocked (PR #228643)

via llvm-commits llvm-commits at lists.llvm.org
Sat Oct 3 18:32:12 PDT 2026


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 origin/main HEAD --extensions cpp -- compiler-rt/lib/tsan/rtl/tsan_rtl_mutex.cpp --diff_from_common_commit
``````````

:warning:
The reproduction instructions above might return results for more than one PR
in a stack if you are using a stacked PR workflow. You can limit the results by
changing `origin/main` to the base branch/commit you want to compare against.
:warning:

</details>

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

``````````diff
diff --git a/compiler-rt/lib/tsan/rtl/tsan_rtl_mutex.cpp b/compiler-rt/lib/tsan/rtl/tsan_rtl_mutex.cpp
index 3835cab06..fd340fcc3 100644
--- a/compiler-rt/lib/tsan/rtl/tsan_rtl_mutex.cpp
+++ b/compiler-rt/lib/tsan/rtl/tsan_rtl_mutex.cpp
@@ -594,7 +594,7 @@ void ReportDestroyLocked(ThreadState *thr, uptr pc, uptr addr,
   ObtainCurrentStack(thr, pc, &trace);
 
   // Use alloca, because malloc during signal handling deadlocks
-  ScopedReport *rep = (ScopedReport *)__builtin_alloca(sizeof(ScopedReport));
+  ScopedReport* rep = (ScopedReport*)__builtin_alloca(sizeof(ScopedReport));
   // Release locks before symbolizing and outputting the report to avoid
   // deadlocks.
   {

``````````

</details>


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


More information about the llvm-commits mailing list