summaryrefslogtreecommitdiffstats
path: root/compiler-rt/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
commitaac36b345a27b0f939fe3d7c242defa53ccd16c0 (patch)
tree1d8ecea19243413c7f09f3ef5d06052ca1e55dd3 /compiler-rt/lib/asan/asan_posix.cc
parent0d7755ccb548337878fd075e9ecfc55341d16e35 (diff)
downloadbcm5719-llvm-aac36b345a27b0f939fe3d7c242defa53ccd16c0.tar.gz
bcm5719-llvm-aac36b345a27b0f939fe3d7c242defa53ccd16c0.zip
[ASan] intercept swapcontext on Linux only
llvm-svn: 168509
Diffstat (limited to 'compiler-rt/lib/asan/asan_posix.cc')
-rw-r--r--compiler-rt/lib/asan/asan_posix.cc12
1 files changed, 0 insertions, 12 deletions
diff --git a/compiler-rt/lib/asan/asan_posix.cc b/compiler-rt/lib/asan/asan_posix.cc
index 699af68123f..ceaf120fc80 100644
--- a/compiler-rt/lib/asan/asan_posix.cc
+++ b/compiler-rt/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;
OpenPOWER on IntegriCloud