diff --git a/compiler-rt/lib/sanitizer_common/sanitizer_common_interceptors.inc b/compiler-rt/lib/sanitizer_common/sanitizer_common_interceptors.inc index cd60952a2605495b479607ac139d83414d714e81..c489cb2979f1835b2310484fbbcf4fd044ee228a 100644 --- a/compiler-rt/lib/sanitizer_common/sanitizer_common_interceptors.inc +++ b/compiler-rt/lib/sanitizer_common/sanitizer_common_interceptors.inc @@ -2670,7 +2670,7 @@ INTERCEPTOR(int, wait3, int *status, int options, void *rusage) { } return res; } -#if SANITIZER_ANDROID || SANITIZER_OHOS +#if SANITIZER_ANDROID INTERCEPTOR(int, __wait4, int pid, int *status, int options, void *rusage) { void *ctx; COMMON_INTERCEPTOR_ENTER(ctx, __wait4, pid, status, options, rusage); diff --git a/compiler-rt/lib/sanitizer_common/sanitizer_platform_interceptors.h b/compiler-rt/lib/sanitizer_common/sanitizer_platform_interceptors.h index d2858ab538f337d00675fd0961ef03b52ba5c269..816c2fe9878a263c1fecf64d3d7e50e5524c5f06 100644 --- a/compiler-rt/lib/sanitizer_common/sanitizer_platform_interceptors.h +++ b/compiler-rt/lib/sanitizer_common/sanitizer_platform_interceptors.h @@ -241,8 +241,10 @@ #define SANITIZER_INTERCEPT_TIME SI_POSIX #define SANITIZER_INTERCEPT_GLOB (SI_GLIBC || SI_SOLARIS) #define SANITIZER_INTERCEPT_GLOB64 SI_GLIBC -#define SANITIZER_INTERCEPT___B64_TO SI_LINUX_NOT_ANDROID -#define SANITIZER_INTERCEPT___DN_EXPAND SI_LINUX_NOT_ANDROID +// OHOS_LOCAL begin +#define SANITIZER_INTERCEPT___B64_TO (SI_LINUX_NOT_ANDROID && !SI_OHOS) +#define SANITIZER_INTERCEPT___DN_EXPAND (SI_LINUX_NOT_ANDROID && !SI_OHOS) +// OHOS_LOCAL end #define SANITIZER_INTERCEPT_POSIX_SPAWN SI_POSIX #define SANITIZER_INTERCEPT_WAIT SI_POSIX #define SANITIZER_INTERCEPT_INET SI_POSIX @@ -360,11 +362,14 @@ #define SANITIZER_INTERCEPT_PTHREAD_MUTEXATTR_GETTYPE SI_POSIX #define SANITIZER_INTERCEPT_PTHREAD_MUTEXATTR_GETPROTOCOL \ (SI_MAC || SI_NETBSD || SI_LINUX_NOT_ANDROID || SI_SOLARIS) +// OHOS_LOCAL begin #define SANITIZER_INTERCEPT_PTHREAD_MUTEXATTR_GETPRIOCEILING \ - (SI_MAC || SI_NETBSD || SI_LINUX_NOT_ANDROID || SI_SOLARIS) + ((SI_MAC || SI_NETBSD || SI_LINUX_NOT_ANDROID || SI_SOLARIS) && !SI_OHOS) #define SANITIZER_INTERCEPT_PTHREAD_MUTEXATTR_GETROBUST \ - (SI_LINUX_NOT_ANDROID || SI_SOLARIS) -#define SANITIZER_INTERCEPT_PTHREAD_MUTEXATTR_GETROBUST_NP SI_LINUX_NOT_ANDROID + ((SI_LINUX_NOT_ANDROID || SI_SOLARIS) && !SI_OHOS) +#define SANITIZER_INTERCEPT_PTHREAD_MUTEXATTR_GETROBUST_NP \ + (SI_LINUX_NOT_ANDROID && !SI_OHOS) +// OHOS_LOCAL end #define SANITIZER_INTERCEPT_PTHREAD_RWLOCKATTR_GETPSHARED \ (SI_POSIX && !SI_NETBSD) #define SANITIZER_INTERCEPT_PTHREAD_RWLOCKATTR_GETKIND_NP SI_GLIBC @@ -579,8 +584,9 @@ #define SANITIZER_INTERCEPT_FDEVNAME SI_FREEBSD #define SANITIZER_INTERCEPT_GETUSERSHELL (SI_POSIX && !SI_ANDROID) #define SANITIZER_INTERCEPT_SL_INIT (SI_FREEBSD || SI_NETBSD) +// OHOS_LOCAL #define SANITIZER_INTERCEPT_CRYPT (SI_POSIX && !SI_ANDROID) -#define SANITIZER_INTERCEPT_CRYPT_R (SI_LINUX && !SI_ANDROID) +#define SANITIZER_INTERCEPT_CRYPT_R (SI_LINUX && !SI_ANDROID && !SI_OHOS) #define SANITIZER_INTERCEPT_GETRANDOM \ ((SI_LINUX && __GLIBC_PREREQ(2, 25)) || SI_FREEBSD)