[compiler-rt] 2f353c0 - [sanitizer_common] Fix Posix/mmap_write_exec.cpp on 32-bit Solaris
Rainer Orth via llvm-commits
llvm-commits at lists.llvm.org
Fri Oct 29 05:30:11 PDT 2021
Author: Rainer Orth
Date: 2021-10-29T14:29:41+02:00
New Revision: 2f353c040f328fee0e5582e64cca804d1f083730
URL: https://github.com/llvm/llvm-project/commit/2f353c040f328fee0e5582e64cca804d1f083730
DIFF: https://github.com/llvm/llvm-project/commit/2f353c040f328fee0e5582e64cca804d1f083730.diff
LOG: [sanitizer_common] Fix Posix/mmap_write_exec.cpp on 32-bit Solaris
The new `Posix/mmap_write_exec.cpp` test FAILs on 32-bit Solaris/x86. This
happens because only `mmap` is intercepted, but not `mmap64` which is used
for largefile support.
Fixed by also intercepting `mmap64`.
Tested on `amd64-pc-solaris2.11`.
Differential Revision: https://reviews.llvm.org/D112810
Added:
Modified:
compiler-rt/lib/sanitizer_common/sanitizer_platform_interceptors.h
Removed:
################################################################################
diff --git a/compiler-rt/lib/sanitizer_common/sanitizer_platform_interceptors.h b/compiler-rt/lib/sanitizer_common/sanitizer_platform_interceptors.h
index 4da53ca1ab98..03480586616b 100644
--- a/compiler-rt/lib/sanitizer_common/sanitizer_platform_interceptors.h
+++ b/compiler-rt/lib/sanitizer_common/sanitizer_platform_interceptors.h
@@ -480,7 +480,7 @@
(SI_LINUX_NOT_ANDROID || SI_MAC || SI_FREEBSD || SI_NETBSD)
#define SANITIZER_INTERCEPT_MMAP SI_POSIX
-#define SANITIZER_INTERCEPT_MMAP64 SI_LINUX_NOT_ANDROID
+#define SANITIZER_INTERCEPT_MMAP64 SI_LINUX_NOT_ANDROID || SI_SOLARIS
#define SANITIZER_INTERCEPT_MALLOPT_AND_MALLINFO (SI_GLIBC || SI_ANDROID)
#define SANITIZER_INTERCEPT_MEMALIGN (!SI_FREEBSD && !SI_MAC && !SI_NETBSD)
#define SANITIZER_INTERCEPT___LIBC_MEMALIGN SI_GLIBC
More information about the llvm-commits
mailing list