summaryrefslogtreecommitdiff
path: root/lib/tsan/rtl/tsan_new_delete.cc
AgeCommit message (Collapse)Author
2017-12-22[MSan,TSan] Add aligned new/delete interceptors.Alex Shlyapnikov
Summary: Providing aligned new/delete implementations to match ASan. Unlike ASan, MSan and TSan do not perform any additional checks on overaligned memory, hence no sanitizer specific tests. Reviewers: eugenis Subscribers: kubamracek, #sanitizers, llvm-commits Differential Revision: https://reviews.llvm.org/D41532 git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@321365 91177308-0d34-0410-b5e6-96231b3b80d8
2017-06-28[Sanitizers] Operator new() interceptors always die on allocation errorAlex Shlyapnikov
Summary: Operator new interceptors behavior is now controlled by their nothrow property as well as by allocator_may_return_null flag value: - allocator_may_return_null=* + new() - die on allocation error - allocator_may_return_null=0 + new(nothrow) - die on allocation error - allocator_may_return_null=1 + new(nothrow) - return null Ideally new() should throw std::bad_alloc exception, but that is not trivial to achieve, hence TODO. Reviewers: eugenis Subscribers: kubamracek, llvm-commits Differential Revision: https://reviews.llvm.org/D34731 git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@306604 91177308-0d34-0410-b5e6-96231b3b80d8
2016-06-06[tsan] Switch to InternalAlloc everywhere __libc_malloc is currently usedKuba Brecka
This patch replaces all uses of __libc_malloc and friends with the internal allocator. It seems that the only reason why we have calls to __libc_malloc in the first place was the lack of the internal allocator at the time. Using the internal allocator will also make sure that the system allocator is never used (this is the same behavior as ASan), and we don’t have to worry about working with unknown pointers coming from the system allocator. Differential Revision: http://reviews.llvm.org/D21025 git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@271916 91177308-0d34-0410-b5e6-96231b3b80d8
2015-12-09[tsan] Use REAL(malloc) instead of __libc_malloc for Android.Yabin Cui
Summary: Android doesn't have __libc_malloc and related allocation functions. As its dynamic linker doesn't use malloc, so we can use REAL(malloc) to replace __libc_malloc safely. Reviewers: kcc, eugenis, dvyukov Subscribers: llvm-commits, tberghammer, danalbert, srhines Differential Revision: http://reviews.llvm.org/D15297 git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@255167 91177308-0d34-0410-b5e6-96231b3b80d8
2015-11-11Fixing #include order in tsan_new_delete.cc. Follow-up commit for r252284.Kuba Brecka
git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@252735 91177308-0d34-0410-b5e6-96231b3b80d8
2015-11-06[tsan] Enable new/delete C++ interceptors for OS XKuba Brecka
This patch adds `tsan_new_delete.cc` into the OS X build. Differential Revision: http://reviews.llvm.org/D14424 git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@252284 91177308-0d34-0410-b5e6-96231b3b80d8
2015-08-10-Wdeprecated: Use noexcept rather than throw() where supportedDavid Blaikie
Summary: I've copy/pasted the LLVM_NOEXCEPT definition macro goo from LLVM's Compiler.h. Is there somewhere I should put this in Compiler RT? Is there a useful header to define/share things like this? Reviewers: samsonov Differential Revision: http://reviews.llvm.org/D11780 git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@244453 91177308-0d34-0410-b5e6-96231b3b80d8
2015-04-27[TSan] Move new/delete interceptors into a separate source file. NFC.Alexey Samsonov
git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@235906 91177308-0d34-0410-b5e6-96231b3b80d8
2012-09-27[TSan] move replacement for new/delete back into tsan_interceptorsAlexey Samsonov
git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@164764 91177308-0d34-0410-b5e6-96231b3b80d8
2012-09-24[TSan] Provide replacements for operators new/delete instead of declaring ↵Alexey Samsonov
extern C functions with weirdly mangled names (same strategy is used in ASan). git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@164487 91177308-0d34-0410-b5e6-96231b3b80d8