[PATCH] D68178: compiler-rt: use __GLIBC_PREREQ for SANITIZER_INTERCEPT_GETRANDOM

Vitaly Buka via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon Sep 30 18:00:46 PDT 2019


This revision was automatically updated to reflect the committed changes.
Closed by commit rL373284: compiler-rt: use __GLIBC_PREREQ for SANITIZER_INTERCEPT_GETRANDOM (authored by vitalybuka, committed by ).
Herald added a subscriber: delcypher.

Changed prior to commit:
  https://reviews.llvm.org/D68178?vs=222519&id=222531#toc

Repository:
  rL LLVM

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D68178/new/

https://reviews.llvm.org/D68178

Files:
  compiler-rt/trunk/lib/sanitizer_common/sanitizer_platform_interceptors.h


Index: compiler-rt/trunk/lib/sanitizer_common/sanitizer_platform_interceptors.h
===================================================================
--- compiler-rt/trunk/lib/sanitizer_common/sanitizer_platform_interceptors.h
+++ compiler-rt/trunk/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


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D68178.222531.patch
Type: text/x-patch
Size: 994 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20191001/e8eb400b/attachment.bin>


More information about the llvm-commits mailing list