[compiler-rt] [compiler-rt][TSan] fix crash caused by intercpting pthread_detach on Android (PR #161596)
via llvm-commits
llvm-commits at lists.llvm.org
Wed Oct 1 15:29:37 PDT 2025
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_interceptors_posix.cpp
``````````
: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_interceptors_posix.cpp b/compiler-rt/lib/tsan/rtl/tsan_interceptors_posix.cpp
index 40bd7e217..6a2af75cb 100644
--- a/compiler-rt/lib/tsan/rtl/tsan_interceptors_posix.cpp
+++ b/compiler-rt/lib/tsan/rtl/tsan_interceptors_posix.cpp
@@ -1135,7 +1135,7 @@ TSAN_INTERCEPTOR(int, pthread_join, void *th, void **ret) {
// In Bionic, pthread_detach calls pthread_join, so the thread has already
// been consumed by the pthread_detach interceptor.
Tid tid = ctx->thread_registry.FindThread(
- [](ThreadContextBase *tctx, void *arg) {
+ [](ThreadContextBase* tctx, void* arg) {
return tctx->user_id == (uptr)arg;
},
th);
``````````
</details>
https://github.com/llvm/llvm-project/pull/161596
More information about the llvm-commits
mailing list