[llvm-commits] [compiler-rt] r157995 - /compiler-rt/trunk/lib/tsan/rtl/tsan_platform_linux.cc

Alexey Samsonov samsonov at google.com
Tue Jun 5 02:55:24 PDT 2012


Author: samsonov
Date: Tue Jun  5 04:55:24 2012
New Revision: 157995

URL: http://llvm.org/viewvc/llvm-project?rev=157995&view=rev
Log:
[TSan] Use internal_munmap from sanitizer_libc in TSan runtime.

Modified:
    compiler-rt/trunk/lib/tsan/rtl/tsan_platform_linux.cc

Modified: compiler-rt/trunk/lib/tsan/rtl/tsan_platform_linux.cc
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/lib/tsan/rtl/tsan_platform_linux.cc?rev=157995&r1=157994&r2=157995&view=diff
==============================================================================
--- compiler-rt/trunk/lib/tsan/rtl/tsan_platform_linux.cc (original)
+++ compiler-rt/trunk/lib/tsan/rtl/tsan_platform_linux.cc Tue Jun  5 04:55:24 2012
@@ -72,11 +72,6 @@
           MADV_DONTNEED);
 }
 
-static void my_munmap(void *addr, size_t length) {
-  ScopedInRtl in_rtl;
-  syscall(__NR_munmap, addr, length);
-}
-
 void internal_yield() {
   ScopedInRtl in_rtl;
   syscall(__NR_sched_yield);
@@ -263,7 +258,7 @@
       stack = stack * 16 + num;
     }
     internal_close(maps);
-    my_munmap(buf, kBufSize);
+    internal_munmap(buf, kBufSize);
 
     struct rlimit rl;
     CHECK_EQ(getrlimit(RLIMIT_STACK, &rl), 0);





More information about the llvm-commits mailing list