[compiler-rt] r373681 - compiler-rt: use __GLIBC_PREREQ for SANITIZER_INTERCEPT_GETRANDOM
Vitaly Buka via llvm-commits
llvm-commits at lists.llvm.org
Thu Oct 3 17:38:07 PDT 2019
Author: vitalybuka
Date: Thu Oct 3 17:38:07 2019
New Revision: 373681
URL: http://llvm.org/viewvc/llvm-project?rev=373681&view=rev
Log:
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
Modified:
compiler-rt/trunk/lib/sanitizer_common/sanitizer_platform_interceptors.h
Modified: compiler-rt/trunk/lib/sanitizer_common/sanitizer_platform_interceptors.h
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/lib/sanitizer_common/sanitizer_platform_interceptors.h?rev=373681&r1=373680&r2=373681&view=diff
==============================================================================
--- compiler-rt/trunk/lib/sanitizer_common/sanitizer_platform_interceptors.h (original)
+++ compiler-rt/trunk/lib/sanitizer_common/sanitizer_platform_interceptors.h Thu Oct 3 17:38:07 2019
@@ -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
More information about the llvm-commits
mailing list