[compiler-rt] r252103 - [TSan] Fix mmap/mmap64 interceptor signature.

Alexey Samsonov via llvm-commits llvm-commits at lists.llvm.org
Wed Nov 4 16:00:36 PST 2015


Author: samsonov
Date: Wed Nov  4 18:00:36 2015
New Revision: 252103

URL: http://llvm.org/viewvc/llvm-project?rev=252103&view=rev
Log:
[TSan] Fix mmap/mmap64 interceptor signature.

mmap() offset argument has type off_t, not unsigned. off_t is usually
64-bit on 64-bit Linux.

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

Modified: compiler-rt/trunk/lib/tsan/rtl/tsan_interceptors.cc
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/lib/tsan/rtl/tsan_interceptors.cc?rev=252103&r1=252102&r2=252103&view=diff
==============================================================================
--- compiler-rt/trunk/lib/tsan/rtl/tsan_interceptors.cc (original)
+++ compiler-rt/trunk/lib/tsan/rtl/tsan_interceptors.cc Wed Nov  4 18:00:36 2015
@@ -701,8 +701,8 @@ static bool fix_mmap_addr(void **addr, l
   return true;
 }
 
-TSAN_INTERCEPTOR(void*, mmap, void *addr, long_t sz, int prot,
-                         int flags, int fd, unsigned off) {
+TSAN_INTERCEPTOR(void *, mmap, void *addr, SIZE_T sz, int prot, int flags,
+                 int fd, OFF_T off) {
   SCOPED_TSAN_INTERCEPTOR(mmap, addr, sz, prot, flags, fd, off);
   if (!fix_mmap_addr(&addr, sz, flags))
     return MAP_FAILED;
@@ -716,8 +716,8 @@ TSAN_INTERCEPTOR(void*, mmap, void *addr
 }
 
 #if SANITIZER_LINUX
-TSAN_INTERCEPTOR(void*, mmap64, void *addr, long_t sz, int prot,
-                           int flags, int fd, u64 off) {
+TSAN_INTERCEPTOR(void *, mmap64, void *addr, SIZE_T sz, int prot, int flags,
+                 int fd, OFF64_T off) {
   SCOPED_TSAN_INTERCEPTOR(mmap64, addr, sz, prot, flags, fd, off);
   if (!fix_mmap_addr(&addr, sz, flags))
     return MAP_FAILED;




More information about the llvm-commits mailing list