[llvm-commits] [compiler-rt] r149892 -	/compiler-rt/trunk/lib/asan/asan_linux.cc
    Kostya Serebryany 
    kcc at google.com
       
    Mon Feb  6 11:23:38 PST 2012
    
    
  
Author: kcc
Date: Mon Feb  6 13:23:38 2012
New Revision: 149892
URL: http://llvm.org/viewvc/llvm-project?rev=149892&view=rev
Log:
[asan] use raw syscalls for open/close on linux to avoid being intercepted
Modified:
    compiler-rt/trunk/lib/asan/asan_linux.cc
Modified: compiler-rt/trunk/lib/asan/asan_linux.cc
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/lib/asan/asan_linux.cc?rev=149892&r1=149891&r2=149892&view=diff
==============================================================================
--- compiler-rt/trunk/lib/asan/asan_linux.cc (original)
+++ compiler-rt/trunk/lib/asan/asan_linux.cc Mon Feb  6 13:23:38 2012
@@ -118,7 +118,7 @@
 }
 
 int AsanOpenReadonly(const char* filename) {
-  return open(filename, O_RDONLY);
+  return syscall(__NR_open, filename, O_RDONLY);
 }
 
 // Like getenv, but reads env directly from /proc and does not use libc.
@@ -154,7 +154,7 @@
 }
 
 int AsanClose(int fd) {
-  return close(fd);
+  return syscall(__NR_close, fd);
 }
 
 AsanProcMaps::AsanProcMaps() {
    
    
More information about the llvm-commits
mailing list