diff options
author | Alexey Samsonov <samsonov@google.com> | 2012-06-05 08:48:10 +0000 |
---|---|---|
committer | Alexey Samsonov <samsonov@google.com> | 2012-06-05 08:48:10 +0000 |
commit | 2221f553886c37401b5d84923634ebf04bc482f1 (patch) | |
tree | 342f323b2bf4fc1c0fa714776559ab236b8d51e3 /lib/asan/asan_posix.cc | |
parent | a56aefd2e01940fcf88d1426f9de3d5e4b1ee203 (diff) |
[ASan] use internal_{close,read,write} in ASan runtime.
git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@157991 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/asan/asan_posix.cc')
-rw-r--r-- | lib/asan/asan_posix.cc | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/lib/asan/asan_posix.cc b/lib/asan/asan_posix.cc index b5e810722..14f172df1 100644 --- a/lib/asan/asan_posix.cc +++ b/lib/asan/asan_posix.cc @@ -19,6 +19,7 @@ #include "asan_procmaps.h" #include "asan_stack.h" #include "asan_thread_registry.h" +#include "sanitizer_common/sanitizer_libc.h" #include <pthread.h> #include <signal.h> @@ -35,6 +36,8 @@ // since most of the stuff here is inlinable. #include <algorithm> +using namespace __sanitizer; + static const uptr kAltStackSize = SIGSTKSZ * 4; // SIGSTKSZ is not enough. namespace __asan { @@ -82,7 +85,7 @@ static void MaybeInstallSigaction(int signum, static void ASAN_OnSIGSEGV(int, siginfo_t *siginfo, void *context) { uptr addr = (uptr)siginfo->si_addr; // Write the first message using the bullet-proof write. - if (13 != AsanWrite(2, "ASAN:SIGSEGV\n", 13)) AsanDie(); + if (13 != internal_write(2, "ASAN:SIGSEGV\n", 13)) AsanDie(); uptr pc, sp, bp; GetPcSpBp(context, &pc, &sp, &bp); Report("ERROR: AddressSanitizer crashed on unknown address %p" |