[compiler-rt] r182378 - [asan] LSan hooks in asan_thread.cc

Sergey Matveev earthdok at google.com
Tue May 21 06:40:14 PDT 2013


Author: smatveev
Date: Tue May 21 08:40:13 2013
New Revision: 182378

URL: http://llvm.org/viewvc/llvm-project?rev=182378&view=rev
Log:
[asan] LSan hooks in asan_thread.cc

Modified:
    compiler-rt/trunk/lib/asan/asan_thread.cc

Modified: compiler-rt/trunk/lib/asan/asan_thread.cc
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/lib/asan/asan_thread.cc?rev=182378&r1=182377&r2=182378&view=diff
==============================================================================
--- compiler-rt/trunk/lib/asan/asan_thread.cc (original)
+++ compiler-rt/trunk/lib/asan/asan_thread.cc Tue May 21 08:40:13 2013
@@ -19,6 +19,7 @@
 #include "asan_mapping.h"
 #include "sanitizer_common/sanitizer_common.h"
 #include "sanitizer_common/sanitizer_placement_new.h"
+#include "lsan/lsan_common.h"
 
 namespace __asan {
 
@@ -243,5 +244,22 @@ AsanThread *FindThreadByStackAddress(upt
                                                    (void *)addr));
   return tctx ? tctx->thread : 0;
 }
-
 }  // namespace __asan
+
+// --- Implementation of LSan-specific functions --- {{{1
+namespace __lsan {
+bool GetThreadRangesLocked(uptr os_id, uptr *stack_begin, uptr *stack_end,
+                           uptr *tls_begin, uptr *tls_end,
+                           uptr *cache_begin, uptr *cache_end) {
+  // FIXME: Stub.
+  return false;
+}
+
+void LockThreadRegistry() {
+  __asan::asanThreadRegistry().Lock();
+}
+
+void UnlockThreadRegistry() {
+  __asan::asanThreadRegistry().Unlock();
+}
+}  // namespace __lsan





More information about the llvm-commits mailing list