summaryrefslogtreecommitdiff
path: root/lib/sanitizer_common/sanitizer_mac.h
AgeCommit message (Collapse)Author
2017-11-10[compiler-rt] Fix const and volatile qualifier warningsKuba Mracek
Building with a new clang produces a bunch of warnings about dropped 'const' and 'volatile' qualifiers on pointers. Let's fix them. Differential Revision: https://reviews.llvm.org/D39861 git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@317929 91177308-0d34-0410-b5e6-96231b3b80d8
2017-09-22Removed platform-specific ifdefs from sanitizer_procmaps.hFrancis Ricci
Summary: Removed platform-specific ifdefs for linux, mac, freebsd and netbsd from sanitizer_procmaps.h Patch by Yicheng Wang <yichengfb@fb.com> Reviewers: kcc, kubamracek, alekseyshl, fjricci, vitalybuka Reviewed By: fjricci, vitalybuka Subscribers: vitalybuka, emaste, krytarowski, llvm-commits Differential Revision: https://reviews.llvm.org/D38098 git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@313999 91177308-0d34-0410-b5e6-96231b3b80d8
2017-07-12[asan] For iOS/AArch64, if the dynamic shadow doesn't fit, restrict the VM spaceKuba Mracek
On iOS/AArch64, the address space is very limited and has a dynamic maximum address based on the configuration of the device. We're already using a dynamic shadow, and we find a large-enough "gap" in the VM where we place the shadow memory. In some cases and some device configuration, we might not be able to find a large-enough gap: E.g. if the main executable is linked against a large number of libraries that are not part of the system, these libraries can fragment the address space, and this happens before ASan starts initializing. This patch has a solution, where we have a "backup plan" when we cannot find a large-enough gap: We will restrict the address space (via MmapFixedNoAccess) to a limit, for which the shadow limit will fit. Differential Revision: https://reviews.llvm.org/D35098 git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@307865 91177308-0d34-0410-b5e6-96231b3b80d8
2016-09-15[compiler-rt] Do not introduce __sanitizer namespace globallyAnna Zaks
The definitions in sanitizer_common may conflict with definitions from system headers because: The runtime includes the system headers after the project headers (as per LLVM coding guidelines). lib/sanitizer_common/sanitizer_internal_defs.h pollutes the namespace of everything defined after it, which is all/most of the sanitizer .h and .cc files and the included system headers with: using namespace __sanitizer; // NOLINT This patch solves the problem by introducing the namespace only within the sanitizer namespaces as proposed by Dmitry. Differential Revision: https://reviews.llvm.org/D21947 git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@281657 91177308-0d34-0410-b5e6-96231b3b80d8
2016-01-06[sanitizers] Log all output to CrashReport on OS XAnna Zaks
Log all of sanitizers' output (not just ASan bug reports) to CrashReport, which simplifies diagnosing failed checks as well as other errors. This also allows to strip the color sequences early from the printed buffer, which is more efficient than what we had perviously. Differential Revision: http://reviews.llvm.org/D15396 git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@256988 91177308-0d34-0410-b5e6-96231b3b80d8
2015-11-20 [asan] On OS X, write error reports into Crash Report.Anna Zaks
The Crash Report is going to add app specific info if it is stored in the magical buffer. Differential Revision: http://reviews.llvm.org/D14791 git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@253691 91177308-0d34-0410-b5e6-96231b3b80d8
2015-06-23Working on reconciling out-of-tree patches to compiler-rt for building for iOS.Chris Bieneman
Summary: This is one of many changes needed for compiler-rt to get it building on iOS. This change does the following: - Don't include crt_externs on iOS (it isn't available) - Support ARM thread state objects Note: this change does not enable building for iOS, as there are more changes to come. Reviewers: glider, kubabrecka, bogner, samsonov Reviewed By: samsonov Subscribers: samsonov, aemerson, llvm-commits Differential Revision: http://reviews.llvm.org/D10510 git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@240467 91177308-0d34-0410-b5e6-96231b3b80d8
2015-04-08Move some POSIX-specific functions from sanitizer_libc.h to a new ↵Timur Iskhodzhanov
sanitizer_posix.h git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@234418 91177308-0d34-0410-b5e6-96231b3b80d8
2014-12-16Add an MACOS_VERSION_UNKNOWN_NEWER enum value for OS X versions above 10.10.Kuba Brecka
We recently had a broken version check because an newer OS X version is treated as MACOS_VERSION_UNKNOWN which is less than all the defined values. Let's have a separate enum value for unknown but newer versions, so the ">=" and "<=" version checks still work even in upcoming OS X releases. Reviewed at http://reviews.llvm.org/D6137 git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@224315 91177308-0d34-0410-b5e6-96231b3b80d8
2014-11-05Extend Mac OS versions to YosemiteKuba Brecka
This also fixes the test/asan/TestCases/Darwin/malloc_zone-protected.cc test failure on OS X 10.10. Reviewed at http://reviews.llvm.org/D6119 git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@221379 91177308-0d34-0410-b5e6-96231b3b80d8
2014-02-03[libsanitizer] Follow-up for r200700: add the new header to CMakeLists.txt ↵Alexander Potapenko
and make it empty on non-Mac. git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@200701 91177308-0d34-0410-b5e6-96231b3b80d8
2014-02-03[ASan] Move GetMacosVersion() to sanitizer_common.Alexander Potapenko
git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@200700 91177308-0d34-0410-b5e6-96231b3b80d8