diff --git a/compiler-rt/lib/sanitizer_common/sanitizer_platform_interceptors.h b/compiler-rt/lib/sanitizer_common/sanitizer_platform_interceptors.h --- a/compiler-rt/lib/sanitizer_common/sanitizer_platform_interceptors.h +++ b/compiler-rt/lib/sanitizer_common/sanitizer_platform_interceptors.h @@ -498,17 +498,17 @@ #define SANITIZER_INTERCEPT_MMAP SI_POSIX #define SANITIZER_INTERCEPT_MMAP64 SI_LINUX_NOT_ANDROID -#define SANITIZER_INTERCEPT_MALLOPT_AND_MALLINFO \ +#define SANITIZER_INTERCEPT_MALLOPT_AND_MALLINFO \ (!SI_FREEBSD && !SI_MAC && !SI_NETBSD && !SI_OPENBSD && SI_NOT_FUCHSIA && \ - SI_NOT_RTEMS) + SI_NOT_RTEMS && !SI_SOLARIS) #define SANITIZER_INTERCEPT_MEMALIGN \ (!SI_FREEBSD && !SI_MAC && !SI_NETBSD && !SI_OPENBSD && SI_NOT_RTEMS) -#define SANITIZER_INTERCEPT_PVALLOC \ +#define SANITIZER_INTERCEPT_PVALLOC \ (!SI_FREEBSD && !SI_MAC && !SI_NETBSD && !SI_OPENBSD && SI_NOT_FUCHSIA && \ - SI_NOT_RTEMS) -#define SANITIZER_INTERCEPT_CFREE \ + SI_NOT_RTEMS && !SI_SOLARIS) +#define SANITIZER_INTERCEPT_CFREE \ (!SI_FREEBSD && !SI_MAC && !SI_NETBSD && !SI_OPENBSD && SI_NOT_FUCHSIA && \ - SI_NOT_RTEMS) + SI_NOT_RTEMS && !SI_SOLARIS) #define SANITIZER_INTERCEPT_REALLOCARRAY SI_POSIX #define SANITIZER_INTERCEPT_ALIGNED_ALLOC (!SI_MAC && SI_NOT_RTEMS) #define SANITIZER_INTERCEPT_MALLOC_USABLE_SIZE \ diff --git a/compiler-rt/test/asan/TestCases/malloc-no-intercept.c b/compiler-rt/test/asan/TestCases/malloc-no-intercept.c --- a/compiler-rt/test/asan/TestCases/malloc-no-intercept.c +++ b/compiler-rt/test/asan/TestCases/malloc-no-intercept.c @@ -9,6 +9,9 @@ // Conflicts with BIONIC declarations. // UNSUPPORTED: android +// Lacks mallinfo, mallopt except in libmalloc. cfree with different +// signature in libc. +// UNSUPPORTED: solaris // Inhibit conflicting declaration of memalign on Solaris. #if defined(__sun__) && defined(__svr4__)