[PATCH] D72367: Summary: update macro for OFF_T so that sanitizer works on AARCH64.
Lirong Yuan via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Fri Jan 10 12:15:06 PST 2020
yuanzi updated this revision to Diff 237412.
yuanzi added a comment.
Tested that it works internally. https://critique.corp.google.com/#review/288921325
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D72367/new/
https://reviews.llvm.org/D72367
Files:
compiler-rt/lib/sanitizer_common/sanitizer_linux.cpp
compiler-rt/lib/sanitizer_common/sanitizer_posix.h
compiler-rt/lib/sanitizer_common/symbolizer/sanitizer_wrappers.cpp
Index: compiler-rt/lib/sanitizer_common/symbolizer/sanitizer_wrappers.cpp
===================================================================
--- compiler-rt/lib/sanitizer_common/symbolizer/sanitizer_wrappers.cpp
+++ compiler-rt/lib/sanitizer_common/symbolizer/sanitizer_wrappers.cpp
@@ -19,13 +19,6 @@
#include <tuple>
-// Need to match ../sanitizer_common/sanitizer_internal_defs.h
-#if defined(ARCH_PPC)
-#define OFF_T unsigned long
-#else
-#define OFF_T unsigned long long
-#endif
-
namespace __sanitizer {
unsigned long internal_open(const char *filename, int flags);
unsigned long internal_open(const char *filename, int flags, unsigned mode);
@@ -35,7 +28,7 @@
unsigned long internal_fstat(int fd, void *buf);
size_t internal_strlen(const char *s);
unsigned long internal_mmap(void *addr, unsigned long length, int prot,
- int flags, int fd, OFF_T offset);
+ int flags, int fd, unsigned long long offset);
void *internal_memcpy(void *dest, const void *src, unsigned long n);
// Used to propagate errno.
bool internal_iserror(unsigned long retval, int *rverrno = 0);
Index: compiler-rt/lib/sanitizer_common/sanitizer_posix.h
===================================================================
--- compiler-rt/lib/sanitizer_common/sanitizer_posix.h
+++ compiler-rt/lib/sanitizer_common/sanitizer_posix.h
@@ -39,7 +39,7 @@
// Memory
uptr internal_mmap(void *addr, uptr length, int prot, int flags,
- int fd, OFF_T offset);
+ int fd, u64 offset);
uptr internal_munmap(void *addr, uptr length);
int internal_mprotect(void *addr, uptr length, int prot);
Index: compiler-rt/lib/sanitizer_common/sanitizer_linux.cpp
===================================================================
--- compiler-rt/lib/sanitizer_common/sanitizer_linux.cpp
+++ compiler-rt/lib/sanitizer_common/sanitizer_linux.cpp
@@ -166,7 +166,7 @@
#if !SANITIZER_SOLARIS && !SANITIZER_NETBSD
#if !SANITIZER_S390 && !SANITIZER_OPENBSD
uptr internal_mmap(void *addr, uptr length, int prot, int flags, int fd,
- OFF_T offset) {
+ u64 offset) {
#if SANITIZER_FREEBSD || SANITIZER_LINUX_USES_64BIT_SYSCALLS
return internal_syscall(SYSCALL(mmap), (uptr)addr, length, prot, flags, fd,
offset);
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D72367.237412.patch
Type: text/x-patch
Size: 2338 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20200110/21df9df6/attachment.bin>
More information about the llvm-commits
mailing list