summaryrefslogtreecommitdiff
path: root/lib/interception/interception_linux.h
AgeCommit message (Collapse)Author
2017-12-06[Sanitizers] Use SANITIZER_* macros in lib/interceptionKamil Rytarowski
Summary: Unlike the rest of the sanitizer code, lib/interception uses native macros like __linux__ to check for specific targets instead of the common ones like SANITIZER_LINUX. When working on the Solaris port of the sanitizers, the current style was found to not only be inconsistent, but clumsy to use because the canonical way to check for Solaris is to check for __sun__ && __svr4__ which is a mouthful. Therefore, this patch switches to use SANITIZER_* macros instead. Tested on x86_64-pc-linux-gnu. Reviewers: kcc, vitalybuka Reviewed By: vitalybuka Subscribers: #sanitizers, srhines, krytarowski, llvm-commits, fedor.sergeev Tags: #sanitizers Differential Revision: https://reviews.llvm.org/D39798 git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@319906 91177308-0d34-0410-b5e6-96231b3b80d8
2017-08-08Reuse interception_linux for NetBSDKamil Rytarowski
Summary: Part of the code inspired by the original work on libsanitizer in GCC 5.4 by Christos Zoulas. Sponsored by <The NetBSD Foundation> Reviewers: joerg, kcc, vitalybuka, filcab Reviewed By: vitalybuka Subscribers: llvm-commits, #sanitizers Tags: #sanitizers Differential Revision: https://reviews.llvm.org/D36321 git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@310351 91177308-0d34-0410-b5e6-96231b3b80d8
2015-09-22[asan] Versioned interceptor for pthread_create.Evgeniy Stepanov
This fixes a crash in pthread_create on linux/i386 due to abi incompatibility between intercepted and non-intercepted functions. See the test case for more details. git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@248325 91177308-0d34-0410-b5e6-96231b3b80d8
2014-02-24[sanitizer] Interception macros for sanitizers on FreeBSD; patch by Viktor ↵Kostya Serebryany
Kutuzov git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@202009 91177308-0d34-0410-b5e6-96231b3b80d8
2013-12-20[msan] Wrap indirect calls to REAL(x) in interceptors.Evgeniy Stepanov
git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@197806 91177308-0d34-0410-b5e6-96231b3b80d8
2013-11-12[sanitizer] Avoid needless use of stringification (#symver) in ↵Evgeniy Stepanov
INTERCEPT_FUNCTION_VER. This is a workaround for clang-format bug (PR17874). git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@194468 91177308-0d34-0410-b5e6-96231b3b80d8
2013-10-16Make some pthread_mutex_* and pthread_cond_* interceptors common.Alexey Samsonov
Reviewers: eugenis, dvyukov Reviewed By: dvyukov CC: llvm-commits Differential Revision: http://llvm-reviews.chandlerc.com/D1937 git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@192774 91177308-0d34-0410-b5e6-96231b3b80d8
2013-09-19tsan: fix linking of tsan runtime into dynamic librariesDmitry Vyukov
versioned symbols can not be linked into dynamic library w/o linker script also simplifies code as side effect git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@191056 91177308-0d34-0410-b5e6-96231b3b80d8
2013-09-03tsan: fix linking when -ltsan is passed before -lpthreadDmitry Vyukov
libpthread is weird: /lib/x86_64-linux-gnu/libpthread.so.0:000000000000b9b0 T pthread_cond_init@@GLIBC_2.3.2 /lib/x86_64-linux-gnu/libpthread.so.0:000000000000c720 T pthread_cond_init@GLIBC_2.2.5 let's do it with @@ for now we can always introduce more macros parameters later git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@189788 91177308-0d34-0410-b5e6-96231b3b80d8
2013-09-03asan: fix android buildDmitry Vyukov
android does not have dlvsym git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@189781 91177308-0d34-0410-b5e6-96231b3b80d8
2013-09-02tsan: properly intercept pthread_cond functionsDmitry Vyukov
git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@189767 91177308-0d34-0410-b5e6-96231b3b80d8
2012-08-02[Sanitizer] Workaround for a compiler warning - ISO C++ forbids casting ↵Alexey Samsonov
pointer-to-function to pointer-to-object, so we use cast via integral type git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@161168 91177308-0d34-0410-b5e6-96231b3b80d8
2012-05-24asan/tsan: weak interceptorsDmitry Vyukov
The idea isthat asan/tsan can survive if user intercepts the same functions. At the same time user has an ability to call back into asan/tsan runtime. See the following tests for examples: asan/output_tests/interception_failure_test-linux.cc asan/output_tests/interception_test-linux.cc asan/output_tests/interception_malloc_test-linux.cc git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@157388 91177308-0d34-0410-b5e6-96231b3b80d8
2012-05-15[asan] move lib/asan/interception to lib/interception so that other tools ↵Kostya Serebryany
(e.g. tsan) can use it git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@156816 91177308-0d34-0410-b5e6-96231b3b80d8