[Sanitizers] Porting getrandom/getentropy interceptors to FreeBSD
authorDavid Carlier <devnexen@gmail.com>
Thu, 10 Oct 2019 11:31:37 +0000 (11:31 +0000)
committerDavid Carlier <devnexen@gmail.com>
Thu, 10 Oct 2019 11:31:37 +0000 (11:31 +0000)
commit90c8b59cfc6ea5c1b1f6e024c3a31b990b1b0e66
treed313f758f2e26eaf12c1282ffbb9aa71083406d1
parentd79c3be6187248b1a158911dc162f06a86d4c612
[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
compiler-rt/lib/sanitizer_common/sanitizer_common_interceptors.inc
compiler-rt/lib/sanitizer_common/sanitizer_platform_interceptors.h
compiler-rt/test/sanitizer_common/TestCases/Posix/getrandom.c [moved from compiler-rt/test/sanitizer_common/TestCases/Linux/getrandom.cpp with 50% similarity]