summaryrefslogtreecommitdiff
path: root/lib/sanitizer_common/sanitizer_allocator_checks.cc
AgeCommit message (Collapse)Author
2017-10-11[sanitizer] Move the errno/ENOMEM allocator checks logic to separate .ccKostya Kortchinsky
Summary: This is a new attempt at D38706, which had 2 issues. The first one was that it broke TSan, because `sanitizer_errno.h` was not directly included in `tsan_mman.cc`. This fixes the include. The second one was that it broke the nolibc build, because `__errno_location` couldn't be found. This adds the new .cc to the libcdep list instead of the base one. Reviewers: alekseyshl Reviewed By: alekseyshl Subscribers: kubamracek, mgorny, llvm-commits Differential Revision: https://reviews.llvm.org/D38743 git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@315509 91177308-0d34-0410-b5e6-96231b3b80d8
2017-10-10[sanitizer] Revert D38706Kostya Kortchinsky
Summary: D38706 breaks tsan and the nolibc build. Reverting while working on a fix. Reviewers: alekseyshl Subscribers: kubamracek, mgorny, llvm-commits Differential Revision: https://reviews.llvm.org/D38739 git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@315320 91177308-0d34-0410-b5e6-96231b3b80d8
2017-10-10[sanitizer] Move the errno/ENOMEM allocator checks logic to separate .ccKostya Kortchinsky
Summary: The fact that `sanitizer_allocator_checks.h` is including `sanitizer_errno.h` creates complications for future changes, where it would conflict with `errno.h` definitions on Android and Fuchsia (macro redefinition). By moving the portion that sets errno in the checks to a separate compilation unit, we avoid the inclusion of the header there, which solves the issue. Not that it is not vital to have that function in a header as it is called as a result of an unlikely event, and doesn't need to be inlined. Reviewers: alekseyshl Reviewed By: alekseyshl Subscribers: kubamracek, llvm-commits, mgorny Differential Revision: https://reviews.llvm.org/D38706 git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@315319 91177308-0d34-0410-b5e6-96231b3b80d8