forked from OSchip/llvm-project
[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
This commit is contained in:
parent
7ae65d87cf
commit
e5739981d5
|
@ -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;
|
||||
|
|
Loading…
Reference in New Issue