From 161229eb1bbc7c4e112485f716790f13c6a25fb0 Mon Sep 17 00:00:00 2001 From: Vitaly Buka Date: Fri, 4 Oct 2019 00:38:07 +0000 Subject: [PATCH] compiler-rt: use __GLIBC_PREREQ for SANITIZER_INTERCEPT_GETRANDOM Summary: Fixes https://github.com/google/oss-fuzz/issues/2836 Reviewers: eugenis Subscribers: dberris, #sanitizers, llvm-commits Tags: #sanitizers, #llvm Differential Revision: https://reviews.llvm.org/D68178 llvm-svn: 373681 --- compiler-rt/lib/sanitizer_common/sanitizer_platform_interceptors.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/compiler-rt/lib/sanitizer_common/sanitizer_platform_interceptors.h b/compiler-rt/lib/sanitizer_common/sanitizer_platform_interceptors.h index c3b6f28..36885da 100644 --- a/compiler-rt/lib/sanitizer_common/sanitizer_platform_interceptors.h +++ b/compiler-rt/lib/sanitizer_common/sanitizer_platform_interceptors.h @@ -13,6 +13,7 @@ #ifndef SANITIZER_PLATFORM_INTERCEPTORS_H #define SANITIZER_PLATFORM_INTERCEPTORS_H +#include "sanitizer_glibc_version.h" #include "sanitizer_internal_defs.h" #if SANITIZER_POSIX @@ -566,10 +567,9 @@ #define SANITIZER_INTERCEPT_GETUSERSHELL (SI_POSIX && !SI_ANDROID) #define SANITIZER_INTERCEPT_SL_INIT (SI_FREEBSD || SI_NETBSD) -#define SANITIZER_INTERCEPT_GETRANDOM SI_LINUX +#define SANITIZER_INTERCEPT_GETRANDOM (SI_LINUX && __GLIBC_PREREQ(2, 25)) #define SANITIZER_INTERCEPT___CXA_ATEXIT SI_NETBSD #define SANITIZER_INTERCEPT_ATEXIT SI_NETBSD #define SANITIZER_INTERCEPT_PTHREAD_ATFORK SI_NETBSD - #endif // #ifndef SANITIZER_PLATFORM_INTERCEPTORS_H -- 2.7.4