diff options
author | David Carlier <devnexen@gmail.com> | 2019-10-10 11:31:37 +0000 |
---|---|---|
committer | David Carlier <devnexen@gmail.com> | 2019-10-10 11:31:37 +0000 |
commit | 90c8b59cfc6ea5c1b1f6e024c3a31b990b1b0e66 (patch) | |
tree | d313f758f2e26eaf12c1282ffbb9aa71083406d1 /compiler-rt/test/sanitizer_common/TestCases/Linux/getrandom.cpp | |
parent | d79c3be6187248b1a158911dc162f06a86d4c612 (diff) | |
download | bcm5719-llvm-90c8b59cfc6ea5c1b1f6e024c3a31b990b1b0e66.tar.gz bcm5719-llvm-90c8b59cfc6ea5c1b1f6e024c3a31b990b1b0e66.zip |
[Sanitizers] Porting getrandom/getentropy interceptors to FreeBSD
- Available from 12.x branch, by the time it lands next year in FreeBSD tree, the 11.x's might be EOL.
- Intentionally changed the getrandom test to C code as with 12.0 (might be fixed in CURRENT since), there is a linkage issue in C++ context.
Reviewers: emaste, dim, vitalybuka
Reviewed-By: vitalybuka
Differential Revision: https://reviews.llvm.org/D68451
llvm-svn: 374315
Diffstat (limited to 'compiler-rt/test/sanitizer_common/TestCases/Linux/getrandom.cpp')
-rw-r--r-- | compiler-rt/test/sanitizer_common/TestCases/Linux/getrandom.cpp | 22 |
1 files changed, 0 insertions, 22 deletions
diff --git a/compiler-rt/test/sanitizer_common/TestCases/Linux/getrandom.cpp b/compiler-rt/test/sanitizer_common/TestCases/Linux/getrandom.cpp deleted file mode 100644 index 08337f537d1..00000000000 --- a/compiler-rt/test/sanitizer_common/TestCases/Linux/getrandom.cpp +++ /dev/null @@ -1,22 +0,0 @@ -// RUN: %clangxx -O2 %s -o %t && %run %t -// UNSUPPORTED: android -// - -#include <sys/types.h> - -#if !defined(__GLIBC_PREREQ) -#define __GLIBC_PREREQ(a, b) 0 -#endif - -#if __GLIBC_PREREQ(2, 25) -#include <sys/random.h> -#endif - -int main() { - char buf[16]; - ssize_t n = 1; -#if __GLIBC_PREREQ(2, 25) - n = getrandom(buf, sizeof(buf), 0); -#endif - return (int)(n <= 0); -} |