[PATCH] [asan] LSan hooks in asan_thread.cc

Sergey Matveev earthdok at google.com
Mon May 20 08:47:06 PDT 2013


Hi kcc, glider,

http://llvm-reviews.chandlerc.com/D830

Files:
  lib/asan/asan_thread.cc

Index: lib/asan/asan_thread.cc
===================================================================
--- lib/asan/asan_thread.cc
+++ lib/asan/asan_thread.cc
@@ -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 @@
                                                    (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
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D830.1.patch
Type: text/x-patch
Size: 1009 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20130520/f888a27a/attachment.bin>


More information about the llvm-commits mailing list