diff options
author | Evgeniy Stepanov <eugeni.stepanov@gmail.com> | 2013-02-07 07:37:12 +0000 |
---|---|---|
committer | Evgeniy Stepanov <eugeni.stepanov@gmail.com> | 2013-02-07 07:37:12 +0000 |
commit | 65e5090c3ca13ebf1061a7043449d1b3561daa6a (patch) | |
tree | cf7256a08c52ae1c348970472b290ed2a9e162c2 /lib/interception/interception.h | |
parent | 5ba301dfe9a39c02b3faeb0fa252473f1d6e742c (diff) | |
download | compiler-rt-65e5090c3ca13ebf1061a7043449d1b3561daa6a.tar.gz compiler-rt-65e5090c3ca13ebf1061a7043449d1b3561daa6a.tar.bz2 compiler-rt-65e5090c3ca13ebf1061a7043449d1b3561daa6a.tar.xz |
[sanitizer] Fix wrong size of OFF_T on 32-bit platforms.
This broke pread/pwrite interceptors when building without
-D_FILE_OFFSET_BITS=64, and always on Android.
git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@174593 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/interception/interception.h')
-rw-r--r-- | lib/interception/interception.h | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/lib/interception/interception.h b/lib/interception/interception.h index ccebf14c..c8a0543d 100644 --- a/lib/interception/interception.h +++ b/lib/interception/interception.h @@ -27,7 +27,10 @@ typedef __sanitizer::uptr SIZE_T; typedef __sanitizer::sptr SSIZE_T; typedef __sanitizer::sptr PTRDIFF_T; typedef __sanitizer::s64 INTMAX_T; -typedef __sanitizer::u64 OFF_T; +// WARNING: OFF_T may be different from OS type off_t, depending on the value of +// _FILE_OFFSET_BITS. This definition of OFF_T matches the ABI of system calls +// like pread and mmap, as opposed to pread64 and mmap64. +typedef __sanitizer::uptr OFF_T; typedef __sanitizer::u64 OFF64_T; // How to add an interceptor: |