summaryrefslogtreecommitdiff
path: root/lib/asan/asan_linux.cc
diff options
context:
space:
mode:
authorAlexander Potapenko <glider@google.com>2012-07-23 14:07:58 +0000
committerAlexander Potapenko <glider@google.com>2012-07-23 14:07:58 +0000
commit75b19ebf25af204cf209d108997272822241d6da (patch)
tree2d7efa3b896506a36e889ce74f4adec07751a380 /lib/asan/asan_linux.cc
parent63201b127e21d6fbfb6de62d0e44a5de01288153 (diff)
downloadcompiler-rt-75b19ebf25af204cf209d108997272822241d6da.tar.gz
compiler-rt-75b19ebf25af204cf209d108997272822241d6da.tar.bz2
compiler-rt-75b19ebf25af204cf209d108997272822241d6da.tar.xz
Intercept CFAllocator for each thread in the program.
Test that child threads use the ASan allocator, that allocated memory can be passed to another thread and deallocated on it. This should fix http://code.google.com/p/address-sanitizer/issues/detail?id=81 git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@160630 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/asan/asan_linux.cc')
-rw-r--r--lib/asan/asan_linux.cc4
1 files changed, 4 insertions, 0 deletions
diff --git a/lib/asan/asan_linux.cc b/lib/asan/asan_linux.cc
index 0bb2bf4a..9a3d6bdb 100644
--- a/lib/asan/asan_linux.cc
+++ b/lib/asan/asan_linux.cc
@@ -72,6 +72,10 @@ bool AsanInterceptsSignal(int signum) {
return signum == SIGSEGV && flags()->handle_segv;
}
+void AsanPlatformThreadInit() {
+ // Nothing here for now.
+}
+
AsanLock::AsanLock(LinkerInitialized) {
// We assume that pthread_mutex_t initialized to all zeroes is a valid
// unlocked mutex. We can not use PTHREAD_MUTEX_INITIALIZER as it triggers