summaryrefslogtreecommitdiff
path: root/lib/asan/asan_posix.cc
diff options
context:
space:
mode:
authorAlexey Samsonov <samsonov@google.com>2012-11-23 10:14:44 +0000
committerAlexey Samsonov <samsonov@google.com>2012-11-23 10:14:44 +0000
commitf3950c6d6acf53fe60735f6d38715c1ea6df814b (patch)
tree71bd7ad6e521c930c3b6044ea6b43ce13d7969b6 /lib/asan/asan_posix.cc
parent0870028410087e67a0049c76cb7c64f02c260d24 (diff)
downloadcompiler-rt-f3950c6d6acf53fe60735f6d38715c1ea6df814b.tar.gz
[ASan] intercept swapcontext on Linux only
git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@168509 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/asan/asan_posix.cc')
-rw-r--r--lib/asan/asan_posix.cc12
1 files changed, 0 insertions, 12 deletions
diff --git a/lib/asan/asan_posix.cc b/lib/asan/asan_posix.cc
index 699af6812..ceaf120fc 100644
--- a/lib/asan/asan_posix.cc
+++ b/lib/asan/asan_posix.cc
@@ -27,7 +27,6 @@
#include <stdlib.h>
#include <sys/time.h>
#include <sys/resource.h>
-#include <ucontext.h>
#include <unistd.h>
static const uptr kAltStackSize = SIGSTKSZ * 4; // SIGSTKSZ is not enough.
@@ -96,17 +95,6 @@ void InstallSignalHandlers() {
MaybeInstallSigaction(SIGBUS, ASAN_OnSIGSEGV);
}
-void ClearShadowMemoryForContext(void *context) {
- ucontext_t *ucp = (ucontext_t*)context;
- uptr sp = (uptr)ucp->uc_stack.ss_sp;
- uptr size = ucp->uc_stack.ss_size;
- // Align to page size.
- uptr bottom = sp & ~(kPageSize - 1);
- size += sp - bottom;
- size = RoundUpTo(size, kPageSize);
- PoisonShadow(bottom, size, 0);
-}
-
// ---------------------- TSD ---------------- {{{1
static pthread_key_t tsd_key;