summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAlexey Samsonov <vonosmas@gmail.com>2015-11-05 00:00:36 +0000
committerAlexey Samsonov <vonosmas@gmail.com>2015-11-05 00:00:36 +0000
commite5739981d5f4e3b9f62af10a8eb3b2ec18f807dc (patch)
treeeef2c3a8ab65276e469f92fbcfbe2e55201d22a8
parent7ae65d87cf51da4a92818510953a43224ca3ae55 (diff)
downloadbcm5719-llvm-e5739981d5f4e3b9f62af10a8eb3b2ec18f807dc.tar.gz
bcm5719-llvm-e5739981d5f4e3b9f62af10a8eb3b2ec18f807dc.zip
[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. llvm-svn: 252103
-rw-r--r--compiler-rt/lib/tsan/rtl/tsan_interceptors.cc8
1 files changed, 4 insertions, 4 deletions
diff --git a/compiler-rt/lib/tsan/rtl/tsan_interceptors.cc b/compiler-rt/lib/tsan/rtl/tsan_interceptors.cc
index 0d9bba5b2fd..eb25cfdf7ea 100644
--- a/compiler-rt/lib/tsan/rtl/tsan_interceptors.cc
+++ b/compiler-rt/lib/tsan/rtl/tsan_interceptors.cc
@@ -701,8 +701,8 @@ static bool fix_mmap_addr(void **addr, long_t sz, int flags) {
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, long_t sz, int prot,
}
#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;
OpenPOWER on IntegriCloud