summaryrefslogtreecommitdiff
path: root/lib/asan/asan_mapping.h
Commit message (Collapse)AuthorAge
* [ASan] Don't add SANITIZER_INTERFACE_ATTRIBUTE for internal ASan functionsAlexey Samsonov2013-09-17
| | | | git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@190860 91177308-0d34-0410-b5e6-96231b3b80d8
* [ASan] Check that getSymbolizer() is defined. Turn magic mapping constants ↵Alexey Samsonov2013-09-16
| | | | | | into named variables git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@190787 91177308-0d34-0410-b5e6-96231b3b80d8
* [asan] ASan Linux MIPS32 support (compiler-rt part), patch by Jyun-Yan YKostya Serebryany2013-06-03
| | | | git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@183105 91177308-0d34-0410-b5e6-96231b3b80d8
* [sanitizer] Move ASan platform macros to sanitizer_common and rename them ↵Evgeniy Stepanov2013-03-19
| | | | | | appropriately. git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@177397 91177308-0d34-0410-b5e6-96231b3b80d8
* [asan] bump kMidMemEnd to 0x4fffffffffULL since in rare cases prelink uses ↵Kostya Serebryany2013-02-28
| | | | | | addresses higher than 0x3fffffffff git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@176250 91177308-0d34-0410-b5e6-96231b3b80d8
* [asan] speedup by more than 2x handling of the small memset/memcpy/etc callsKostya Serebryany2013-02-21
| | | | git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@175728 91177308-0d34-0410-b5e6-96231b3b80d8
* [asan] make asan work with 7fff8000 offset and prelinkKostya Serebryany2013-02-15
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | When prelink is installed in the system, prelink-ed libraries map between 0x003000000000 and 0x004000000000 thus occupying the shadow Gap, so we need so split the address space even further, like this: || [0x10007fff8000, 0x7fffffffffff] || HighMem || || [0x02008fff7000, 0x10007fff7fff] || HighShadow || || [0x004000000000, 0x02008fff6fff] || ShadowGap3 || || [0x003000000000, 0x003fffffffff] || MidMem || || [0x00087fff8000, 0x002fffffffff] || ShadowGap2 || || [0x00067fff8000, 0x00087fff7fff] || MidShadow || || [0x00008fff7000, 0x00067fff7fff] || ShadowGap || || [0x00007fff8000, 0x00008fff6fff] || LowShadow || || [0x000000000000, 0x00007fff7fff] || LowMem || Do it only if necessary. Also added a bit of profiling code to make sure that the mapping code is efficient. Added a lit test to simulate prelink-ed libraries. Unfortunately, this test does not work with binutils-gold linker. If gold is the default linker the test silently passes. Also replaced __has_feature(address_sanitizer) with __has_feature(address_sanitizer) || defined(__SANITIZE_ADDRESS__) in two places. Patch partially by Jakub Jelinek. git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@175263 91177308-0d34-0410-b5e6-96231b3b80d8
* [asan] fix fixed mapping for mac (ASAN_FLEXIBLE_MAPPING_AND_OFFSET=0)Kostya Serebryany2013-02-13
| | | | git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@175049 91177308-0d34-0410-b5e6-96231b3b80d8
* [asan] change the default mapping offset on x86_64 to 0x7fff8000. This gives ↵Kostya Serebryany2013-02-12
| | | | | | roughly 5% speedup. Since this is an ABI change, bump the asan ABI version by renaming __asan_init to __asan_init_v1. compiler-rt part git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@174958 91177308-0d34-0410-b5e6-96231b3b80d8
* [sanitizer] increase the minimal mmap size in allocator to 2^16; fix the ↵Kostya Serebryany2013-01-23
| | | | | | asan Mac build git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@173261 91177308-0d34-0410-b5e6-96231b3b80d8
* [asan] initialize kHighMemEnd at startup (instead of at compile time) to ↵Kostya Serebryany2013-01-23
| | | | | | simplify further changes for various address space layouts. Fix asan_allocator2 for PowerPC (tested on 44-bit address space) git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@173260 91177308-0d34-0410-b5e6-96231b3b80d8
* [asan] simplify the code that poisons global redzones, add some more testsKostya Serebryany2013-01-23
| | | | git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@173251 91177308-0d34-0410-b5e6-96231b3b80d8
* Fixup for r173021: build tests with zero-based shadow on Android only, fix ↵Alexey Samsonov2013-01-21
| | | | | | condition in checking for shadow gap in asan_mapping.h git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@173026 91177308-0d34-0410-b5e6-96231b3b80d8
* ASan: build unit tests with -fsanitize-address-zero-base-shadow on Linux and ↵Alexey Samsonov2013-01-21
| | | | | | Android git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@173021 91177308-0d34-0410-b5e6-96231b3b80d8
* [ASan] use macro instead of raw __attribute__Alexey Samsonov2012-12-28
| | | | git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@171188 91177308-0d34-0410-b5e6-96231b3b80d8
* [asan/tsan] get rid of kPageSize completely in favor of GetPageSizeCached(). ↵Kostya Serebryany2012-11-24
| | | | | | This makes the code friendly to more platforms git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@168537 91177308-0d34-0410-b5e6-96231b3b80d8
* [asan/tsan] do not use __WORDSIZE macro, as it is glibc-private thing. ↵Kostya Serebryany2012-11-21
| | | | | | Instead, define our own SANITIZER_WORDSIZE git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@168424 91177308-0d34-0410-b5e6-96231b3b80d8
* [asan] more support for powerpc, patch by Peter BergnerKostya Serebryany2012-11-20
| | | | git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@168356 91177308-0d34-0410-b5e6-96231b3b80d8
* A few tweaks for building ASanRT against Android NDK.Evgeniy Stepanov2012-08-27
| | | | git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@162666 91177308-0d34-0410-b5e6-96231b3b80d8
* For wild addresses in the shadow or shadow gap areas print an error message ↵Alexander Potapenko2012-07-23
| | | | | | | | | instead of crashing on a check. Add AddressSanitizer.MemsetWildAddressTest that makes sure a proper error message is printed. git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@160620 91177308-0d34-0410-b5e6-96231b3b80d8
* [asan] more renamingKostya Serebryany2012-05-31
| | | | git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@157747 91177308-0d34-0410-b5e6-96231b3b80d8
* [asan] more renamingKostya Serebryany2012-05-31
| | | | git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@157746 91177308-0d34-0410-b5e6-96231b3b80d8
* Use zero-based shadow by default on Android.Evgeniy Stepanov2012-05-23
| | | | git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@157318 91177308-0d34-0410-b5e6-96231b3b80d8
* Fix GetFrameNameByAddr hitting stale stack guards.Evgeniy Stepanov2012-05-12
| | | | | | | | | | | | | | | | | | In the current implementation AsanThread::GetFrameNameByAddr scans the stack for a magic guard value to locate base address of the stack frame. This is not reliable, especially on ARM, where the code that stores this magic value has to construct it in a register from two small intermediates; this register can then end up stored in a random stack location in the prologue of another function. With this change, GetFrameNameByAddr scans the shadow memory for the signature of a left stack redzone instead. It is now possible to remove the magic from the instrumentation pass for additional performance gain. We keep it there for now just to make sure the new algorithm does not fail in some corner case. git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@156710 91177308-0d34-0410-b5e6-96231b3b80d8
* [asan] performance optimization: make sure the check for poisoned shadow ↵Kostya Serebryany2012-03-15
| | | | | | inside inteceptors is inlined git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@152767 91177308-0d34-0410-b5e6-96231b3b80d8
* Refactor shadow poisoning done by asan-rt, no funtionality changes; patch by ↵Kostya Serebryany2011-11-30
| | | | | | samsonov@google.com git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@145505 91177308-0d34-0410-b5e6-96231b3b80d8
* AddressSanitizer run-time library. Not yet integrated with the compiler-rt ↵Kostya Serebryany2011-11-30
build system, but can be built using the old makefile. See details in README.txt git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@145463 91177308-0d34-0410-b5e6-96231b3b80d8