summaryrefslogtreecommitdiff
path: root/lib/asan/asan_linux.cc
diff options
context:
space:
mode:
authorAlexey Samsonov <samsonov@google.com>2012-06-05 09:49:25 +0000
committerAlexey Samsonov <samsonov@google.com>2012-06-05 09:49:25 +0000
commit1f11d31faa5ed89b74f7d543b1182fe8de198be5 (patch)
tree3aceffff0668e24457729ab3e7e94d8bf4f36828 /lib/asan/asan_linux.cc
parent3f46cf42b0f8e0667a3bea88cf871ebd4dc0ecdf (diff)
downloadcompiler-rt-1f11d31faa5ed89b74f7d543b1182fe8de198be5.tar.gz
compiler-rt-1f11d31faa5ed89b74f7d543b1182fe8de198be5.tar.bz2
compiler-rt-1f11d31faa5ed89b74f7d543b1182fe8de198be5.tar.xz
[Sanitizer] add sanitizer_posix.cc. Move more various functions into sanitizer_libc: sscanf, munmap, memchr
git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@157994 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/asan/asan_linux.cc')
-rw-r--r--lib/asan/asan_linux.cc10
1 files changed, 5 insertions, 5 deletions
diff --git a/lib/asan/asan_linux.cc b/lib/asan/asan_linux.cc
index 908138c5..ee356edd 100644
--- a/lib/asan/asan_linux.cc
+++ b/lib/asan/asan_linux.cc
@@ -103,7 +103,7 @@ void *AsanMprotect(uptr fixed_addr, uptr size) {
void AsanUnmapOrDie(void *addr, uptr size) {
if (!addr || !size) return;
- int res = syscall(__NR_munmap, addr, size);
+ int res = internal_munmap(addr, size);
if (res != 0) {
Report("Failed to unmap\n");
AsanDie();
@@ -171,10 +171,10 @@ bool AsanProcMaps::Next(uptr *start, uptr *end,
char *next_line = (char*)internal_memchr(current_, '\n', last - current_);
if (next_line == 0)
next_line = last;
- if (SScanf(current_,
- "%lx-%lx %4s %lx %x:%x %ld %n",
- start, end, flags, offset, &major, &minor,
- &inode, &consumed) != 7)
+ if (internal_sscanf(current_,
+ "%lx-%lx %4s %lx %x:%x %ld %n",
+ start, end, flags, offset, &major, &minor,
+ &inode, &consumed) != 7)
return false;
current_ += consumed;
// Skip spaces.