summaryrefslogtreecommitdiff
path: root/lib/asan/asan_posix.cc
diff options
context:
space:
mode:
authorAlexey Samsonov <samsonov@google.com>2012-06-15 07:29:14 +0000
committerAlexey Samsonov <samsonov@google.com>2012-06-15 07:29:14 +0000
commitdd3a911e46b3f0416d60d9be5c84ccfc4b1c3aa8 (patch)
tree5bacb770cda0aec027d7b9350919ea792e34a3d8 /lib/asan/asan_posix.cc
parent4c49666e611f06241bb8462cea7674d877241492 (diff)
[Sanitizer] move ShadowRangeIsAvailable and several defines to common runtime
git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@158499 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/asan/asan_posix.cc')
-rw-r--r--lib/asan/asan_posix.cc25
1 files changed, 0 insertions, 25 deletions
diff --git a/lib/asan/asan_posix.cc b/lib/asan/asan_posix.cc
index b6b6ca5ae..3bf68b148 100644
--- a/lib/asan/asan_posix.cc
+++ b/lib/asan/asan_posix.cc
@@ -32,31 +32,6 @@ static const uptr kAltStackSize = SIGSTKSZ * 4; // SIGSTKSZ is not enough.
namespace __asan {
-static inline bool IntervalsAreSeparate(uptr start1, uptr end1,
- uptr start2, uptr end2) {
- CHECK(start1 <= end1);
- CHECK(start2 <= end2);
- return (end1 < start2) || (end2 < start1);
-}
-
-// FIXME: this is thread-unsafe, but should not cause problems most of the time.
-// When the shadow is mapped only a single thread usually exists (plus maybe
-// several worker threads on Mac, which aren't expected to map big chunks of
-// memory).
-bool AsanShadowRangeIsAvailable() {
- ProcessMaps procmaps;
- uptr start, end;
- uptr shadow_start = kLowShadowBeg;
- if (kLowShadowBeg > 0) shadow_start -= kMmapGranularity;
- uptr shadow_end = kHighShadowEnd;
- while (procmaps.Next(&start, &end,
- /*offset*/0, /*filename*/0, /*filename_size*/0)) {
- if (!IntervalsAreSeparate(start, end, shadow_start, shadow_end))
- return false;
- }
- return true;
-}
-
static void MaybeInstallSigaction(int signum,
void (*handler)(int, siginfo_t *, void *)) {
if (!AsanInterceptsSignal(signum))