Do not intercept __libc_memalign and cfree on Android because neither of these exists in Bionic.
Differential Revision: https://reviews.llvm.org/D89616
This commit is contained in:
parent
da43d428d0
commit
e2858997ab
|
@ -115,7 +115,11 @@ INTERCEPTOR(void*, memalign, uptr alignment, uptr size) {
|
|||
return lsan_memalign(alignment, size, stack);
|
||||
}
|
||||
#define LSAN_MAYBE_INTERCEPT_MEMALIGN INTERCEPT_FUNCTION(memalign)
|
||||
#else
|
||||
#define LSAN_MAYBE_INTERCEPT_MEMALIGN
|
||||
#endif // SANITIZER_INTERCEPT_MEMALIGN
|
||||
|
||||
#if SANITIZER_INTERCEPT___LIBC_MEMALIGN
|
||||
INTERCEPTOR(void *, __libc_memalign, uptr alignment, uptr size) {
|
||||
ENSURE_LSAN_INITED;
|
||||
GET_STACK_TRACE_MALLOC;
|
||||
|
@ -125,9 +129,8 @@ INTERCEPTOR(void *, __libc_memalign, uptr alignment, uptr size) {
|
|||
}
|
||||
#define LSAN_MAYBE_INTERCEPT___LIBC_MEMALIGN INTERCEPT_FUNCTION(__libc_memalign)
|
||||
#else
|
||||
#define LSAN_MAYBE_INTERCEPT_MEMALIGN
|
||||
#define LSAN_MAYBE_INTERCEPT___LIBC_MEMALIGN
|
||||
#endif // SANITIZER_INTERCEPT_MEMALIGN
|
||||
#endif // SANITIZER_INTERCEPT___LIBC_MEMALIGN
|
||||
|
||||
#if SANITIZER_INTERCEPT_ALIGNED_ALLOC
|
||||
INTERCEPTOR(void*, aligned_alloc, uptr alignment, uptr size) {
|
||||
|
|
|
@ -499,12 +499,15 @@
|
|||
SI_NOT_RTEMS && !SI_SOLARIS) // NOLINT
|
||||
#define SANITIZER_INTERCEPT_MEMALIGN \
|
||||
(!SI_FREEBSD && !SI_MAC && !SI_NETBSD && SI_NOT_RTEMS)
|
||||
#define SANITIZER_INTERCEPT___LIBC_MEMALIGN \
|
||||
(!SI_FREEBSD && !SI_MAC && !SI_NETBSD && !SI_OPENBSD && SI_NOT_RTEMS && \
|
||||
!SI_ANDROID)
|
||||
#define SANITIZER_INTERCEPT_PVALLOC \
|
||||
(!SI_FREEBSD && !SI_MAC && !SI_NETBSD && SI_NOT_FUCHSIA && \
|
||||
SI_NOT_RTEMS && !SI_SOLARIS) // NOLINT
|
||||
#define SANITIZER_INTERCEPT_CFREE \
|
||||
(!SI_FREEBSD && !SI_MAC && !SI_NETBSD && SI_NOT_FUCHSIA && \
|
||||
SI_NOT_RTEMS && !SI_SOLARIS) // NOLINT
|
||||
#define SANITIZER_INTERCEPT_CFREE \
|
||||
(!SI_FREEBSD && !SI_MAC && !SI_NETBSD && SI_NOT_FUCHSIA && SI_NOT_RTEMS && \
|
||||
!SI_SOLARIS && !SANITIZER_ANDROID) // NOLINT
|
||||
#define SANITIZER_INTERCEPT_REALLOCARRAY SI_POSIX
|
||||
#define SANITIZER_INTERCEPT_ALIGNED_ALLOC (!SI_MAC && SI_NOT_RTEMS)
|
||||
#define SANITIZER_INTERCEPT_MALLOC_USABLE_SIZE \
|
||||
|
|
Loading…
Reference in New Issue