[PATCH] D44125: [sanitizer] Move mmap interceptors into sanitizer_common

Evgenii Stepanov via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Mar 14 16:48:28 PDT 2018


eugenis added inline comments.


================
Comment at: lib/sanitizer_common/sanitizer_common_interceptors.inc:6818
+INTERCEPTOR(void *, mmap64, void *addr, SIZE_T sz, int prot, int flags, int fd,
+            OFF_T off) {
+  void *ctx;
----------------
This should use OFF64_T.

OFF_T is 32-bit and we pick garbage from the stack as the higher half of the 64-bit offset. This affects linux-i386 with FILE_OFFSET_BITS set to 64.



Repository:
  rCRT Compiler Runtime

https://reviews.llvm.org/D44125





More information about the llvm-commits mailing list