[compiler-rt] b5eb55d - [NFC][LSAN] Move GetAdditionalThreadContextPtrsLocked
Vitaly Buka via llvm-commits
llvm-commits at lists.llvm.org
Mon May 8 12:44:31 PDT 2023
Author: Vitaly Buka
Date: 2023-05-08T12:44:13-07:00
New Revision: b5eb55d19d7b5d8fa9a5302c8d0211cd70b8c4d4
URL: https://github.com/llvm/llvm-project/commit/b5eb55d19d7b5d8fa9a5302c8d0211cd70b8c4d4
DIFF: https://github.com/llvm/llvm-project/commit/b5eb55d19d7b5d8fa9a5302c8d0211cd70b8c4d4.diff
LOG: [NFC][LSAN] Move GetAdditionalThreadContextPtrsLocked
Added:
Modified:
compiler-rt/lib/lsan/lsan_allocator.cpp
compiler-rt/lib/lsan/lsan_thread.cpp
Removed:
################################################################################
diff --git a/compiler-rt/lib/lsan/lsan_allocator.cpp b/compiler-rt/lib/lsan/lsan_allocator.cpp
index ee7facac6ea79..8dfd4aa434943 100644
--- a/compiler-rt/lib/lsan/lsan_allocator.cpp
+++ b/compiler-rt/lib/lsan/lsan_allocator.cpp
@@ -339,15 +339,6 @@ IgnoreObjectResult IgnoreObject(const void *p) {
}
}
-void GetAdditionalThreadContextPtrsLocked(InternalMmapVector<uptr> *ptrs) {
- // This function can be used to treat memory reachable from `tctx` as live.
- // This is useful for threads that have been created but not yet started.
-
- // This is currently a no-op because the LSan `pthread_create()` interceptor
- // blocks until the child thread starts which keeps the thread's `arg` pointer
- // live.
-}
-
} // namespace __lsan
using namespace __lsan;
diff --git a/compiler-rt/lib/lsan/lsan_thread.cpp b/compiler-rt/lib/lsan/lsan_thread.cpp
index 9da42f32e06bf..5a00973ef8026 100644
--- a/compiler-rt/lib/lsan/lsan_thread.cpp
+++ b/compiler-rt/lib/lsan/lsan_thread.cpp
@@ -92,4 +92,13 @@ void GetRunningThreadsLocked(InternalMmapVector<tid_t> *threads) {
threads);
}
+void GetAdditionalThreadContextPtrsLocked(InternalMmapVector<uptr> *ptrs) {
+ // This function can be used to treat memory reachable from `tctx` as live.
+ // This is useful for threads that have been created but not yet started.
+
+ // This is currently a no-op because the LSan `pthread_create()` interceptor
+ // blocks until the child thread starts which keeps the thread's `arg` pointer
+ // live.
+}
+
} // namespace __lsan
More information about the llvm-commits
mailing list