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 @@ -569,8 +569,8 @@ #define SANITIZER_INTERCEPT_FDEVNAME SI_FREEBSD #define SANITIZER_INTERCEPT_GETUSERSHELL (SI_POSIX && !SI_ANDROID) #define SANITIZER_INTERCEPT_SL_INIT (SI_FREEBSD || SI_NETBSD) -#define SANITIZER_INTERCEPT_CRYPT (SI_POSIX && !SI_ANDROID) -#define SANITIZER_INTERCEPT_CRYPT_R (SI_LINUX && !SI_ANDROID) +#define SANITIZER_INTERCEPT_CRYPT (SI_POSIX && !SI_ANDROID && !SI_GLIBC) +#define SANITIZER_INTERCEPT_CRYPT_R (SI_LINUX && !SI_ANDROID && !SI_GLIBC) #define SANITIZER_INTERCEPT_GETRANDOM \ ((SI_LINUX && __GLIBC_PREREQ(2, 25)) || SI_FREEBSD) diff --git a/compiler-rt/test/sanitizer_common/TestCases/Linux/crypt_r.cpp b/compiler-rt/test/sanitizer_common/TestCases/Linux/crypt_r.cpp deleted file mode 100644 --- a/compiler-rt/test/sanitizer_common/TestCases/Linux/crypt_r.cpp +++ /dev/null @@ -1,36 +0,0 @@ -// RUN: %clangxx -O0 -g %s -lcrypt -o %t && %run %t - -// crypt.h is missing from Android. -// UNSUPPORTED: android - -#include -#include -#include -#include - -int main(int argc, char **argv) { - { - crypt_data cd; - cd.initialized = 0; - char *p = crypt_r("abcdef", "xz", &cd); - volatile size_t z = strlen(p); - } - { - crypt_data cd; - cd.initialized = 0; - char *p = crypt_r("abcdef", "$1$", &cd); - volatile size_t z = strlen(p); - } - { - crypt_data cd; - cd.initialized = 0; - char *p = crypt_r("abcdef", "$5$", &cd); - volatile size_t z = strlen(p); - } - { - crypt_data cd; - cd.initialized = 0; - char *p = crypt_r("abcdef", "$6$", &cd); - volatile size_t z = strlen(p); - } -}