summaryrefslogtreecommitdiffstats
path: root/compiler-rt/lib/asan
Commit message (Collapse)AuthorAgeFilesLines
...
* [ASan] Use replace_str=0 and replace_intrin=0 in printf-{2,4}.c to avoid ↵Alexander Potapenko2014-02-042-6/+10
| | | | | | | | triggering a buffer overflow in strlen and memcpy. This change fixes printf-2.c and printf-4.c under OSX. llvm-svn: 200756
* [ASan] Fix printf-5.c on OSX: fix a compiler warning, avoid intercepting ↵Alexander Potapenko2014-02-041-4/+5
| | | | | | memcpy (which triggers the error report before printf does). llvm-svn: 200751
* [ASan] Move GetMacosVersion() to sanitizer_common.Alexander Potapenko2014-02-033-47/+2
| | | | llvm-svn: 200700
* [asan] asan_device_setup.sh: allow overriding adb path.Evgeniy Stepanov2014-02-031-2/+2
| | | | llvm-svn: 200698
* [asan] Reinitialize allocator quarantine on activation.Evgeniy Stepanov2014-02-033-0/+8
| | | | | | | This is covered by AddressSanitizer.UAF_* tests in asan_test with start_deactivated=1. llvm-svn: 200696
* [sanitizer] Resubmit r200683: disable -ffunction-sections.Evgeniy Stepanov2014-02-031-0/+39
| | | | llvm-svn: 200686
* Revert r200683.Evgeniy Stepanov2014-02-031-39/+0
| | | | | | -fno-function-sections is broken in Clang. llvm-svn: 200684
* [sanitizer] Disable -ffunction-sections.Evgeniy Stepanov2014-02-031-0/+39
| | | | | | | It breaks when a binary is linked with --gc-sections: parts of sanitizer interface get thrown away and inaccessible from dlopen-ed libs. llvm-svn: 200683
* [ASan] Implement __sanitizer::InstallDeadlySignalHandlers() and ↵Alexander Potapenko2014-01-311-0/+4
| | | | | | __asan::AsanOnSIGSEGV() on Windows. llvm-svn: 200554
* [ASan] Add a failing test that demonstrates that ASan currently breaks dead ↵Alexander Potapenko2014-01-311-0/+13
| | | | | | | | code stripping on Linux. See https://code.google.com/p/address-sanitizer/issues/detail?id=260 for more info. llvm-svn: 200553
* [asan] Read extra flags from a system property on activation on Android.Evgeniy Stepanov2014-01-313-0/+19
| | | | llvm-svn: 200550
* [ASan] Move the SIGSEGV/SIGBUS handling to sanitizer_commonAlexander Potapenko2014-01-315-30/+11
| | | | | | | This change is a part of refactoring intended to have common signal handling behavior in all tools. This particular CL moves InstallSignalHandlers() into sanitizer_common (making it InstallDeadlySignalHandlers()), but doesn't enable default signal handlers for any tool other than ASan. llvm-svn: 200542
* [ASan] Run LSan for ASan unit tests only on 64-bit LinuxAlexey Samsonov2014-01-311-1/+2
| | | | llvm-svn: 200537
* Move /FS to SANITIZER_COMMON_CFLAGSTimur Iskhodzhanov2014-01-301-1/+1
| | | | llvm-svn: 200485
* Add an /FS flag to the ASan RTL CMake to make it buildable with VS2013Timur Iskhodzhanov2014-01-301-1/+1
| | | | llvm-svn: 200474
* [sanitizer] Fix typo that breaks shmctl() interceptor.Evgeniy Stepanov2014-01-301-0/+6
| | | | | | https://code.google.com/p/address-sanitizer/issues/detail?id=259 llvm-svn: 200468
* [asan] re-enable __tls_get_addr interceptor with a proper fix (use ↵Kostya Serebryany2014-01-301-2/+0
| | | | | | __attribute__((tls_model(initial-exec)))) llvm-svn: 200463
* [asan] disable __tls_get_addr interceptor while I am investigating why it ↵Kostya Serebryany2014-01-301-1/+6
| | | | | | causes trouble; few more debugging llvm-svn: 200462
* [asan] increase the buffer size for printing asan legend, add a test for legendKostya Serebryany2014-01-292-1/+4
| | | | llvm-svn: 200387
* [asan] experimental intercetor for __tls_get_addr. So far it does nothing ↵Kostya Serebryany2014-01-293-2/+111
| | | | | | interesting, actual usage will come later. See https://groups.google.com/forum/#!topic/address-sanitizer/BfwYD8HMxTM for background llvm-svn: 200384
* [asan] Fix asan_device_setup.sh failure on userdebug Android.Evgeniy Stepanov2014-01-291-0/+2
| | | | llvm-svn: 200382
* [ASan] Reinstate ASAN_LOW_MEMORY, which has nothing to do with signal ↵Alexander Potapenko2014-01-281-0/+5
| | | | | | handling and thus should not be moved to common. llvm-svn: 200319
* [ASan] Fix compilation.Alexander Potapenko2014-01-281-2/+0
| | | | llvm-svn: 200312
* [ASan] Move the sigaltstack() bits to sanitizer_common.Alexander Potapenko2014-01-283-37/+0
| | | | | | | This change is a part of refactoring intended to have common signal handling behavior in all tools. Note that this particular change doesn't enable use_sigaltstack support in every tool. llvm-svn: 200310
* [ASan] Move the signal handling-related flags to sanitizer_common.Alexander Potapenko2014-01-289-41/+11
| | | | | | This change is a part of refactoring intended to have common signal handling behavior in all tools. llvm-svn: 200295
* [asan] Android setup: do "adb root" before "adb remount".Evgeniy Stepanov2014-01-271-0/+2
| | | | llvm-svn: 200199
* [asan] Add an ASan-on-Android installation script.Evgeniy Stepanov2014-01-241-0/+190
| | | | llvm-svn: 200009
* [Sanitizer] Fix false positive in snprintf interceptor - take the number of ↵Alexey Samsonov2014-01-231-2/+7
| | | | | | actually written symbols from real snprintf call. llvm-svn: 199899
* [asan] More buffering in report printing.Evgeniy Stepanov2014-01-231-30/+39
| | | | llvm-svn: 199888
* [asan] Android logging.Evgeniy Stepanov2014-01-232-1/+2
| | | | | | This change duplicates all ASan output to system log on Android. llvm-svn: 199887
* [asan] Print shadow memory and legend as a single printf call.Evgeniy Stepanov2014-01-231-32/+44
| | | | llvm-svn: 199878
* [asan] clang-format part of asan_report.ccEvgeniy Stepanov2014-01-231-19/+16
| | | | llvm-svn: 199877
* [asan] Enable replacement new/delete on Android.Evgeniy Stepanov2014-01-231-5/+2
| | | | | | | | | | | New/delete implementations in system libraries almost always are built without frame pointers. As we switched to frame pointer based unwinder on ARM, they no longer work for us, resulting in broken allocation/deallocation stacks. Note that this does not work with statically linked libstdc++/libc++/libstlport. llvm-svn: 199872
* asan: fix atomic operations on ARMDmitry Vyukov2014-01-221-1/+2
| | | | | | | | implement correct atomic load/store for ARM add test for atomic load/store http://llvm-reviews.chandlerc.com/D2582 llvm-svn: 199802
* Sanitize printf functions.Alexey Samsonov2014-01-215-0/+98
| | | | | | | | | | Intercept and sanitize arguments passed to printf functions in ASan and TSan (don't do this in MSan for now). The checks are controlled by runtime flag (off by default for now). Patch http://llvm-reviews.chandlerc.com/D2480 by Yuri Gribov! llvm-svn: 199729
* [asan] one more test for ↵Kostya Serebryany2014-01-211-0/+75
| | | | | | https://code.google.com/p/address-sanitizer/issues/detail?id=258 llvm-svn: 199723
* [asan] relax the checks inside __sanitizer_annotate_contiguous_container: ↵Kostya Serebryany2014-01-212-6/+36
| | | | | | they are too optimistic due to https://code.google.com/p/address-sanitizer/issues/detail?id=258. llvm-svn: 199715
* [asan] use correct type when computing shadow address in allocator (caused ↵Kostya Serebryany2014-01-181-1/+1
| | | | | | SEGV when asan run-time is built with gcc 4.8.2 on 32-bit arch) llvm-svn: 199544
* [asan] Fix a build warning on windows.Evgeniy Stepanov2014-01-161-1/+1
| | | | llvm-svn: 199390
* [asan] Fix a bunch of style issues.Evgeniy Stepanov2014-01-165-25/+25
| | | | llvm-svn: 199380
* [asan] Restore lost -pie in Android tests.Evgeniy Stepanov2014-01-161-1/+1
| | | | llvm-svn: 199379
* [asan] Implement delayed activation of AddressSanitizerEvgeniy Stepanov2014-01-1611-64/+258
| | | | | | | | | | | | This change adds ASAN_OPTIONS=start_deactivated=1 flag. When present, ASan will start in "deactivated" mode, with no heap poisoning, no quarantine, no stack trace gathering, and minimal redzones. All this features come back when __asan_init is called for the constructor of an instrumented library. The primary use case for this feature is Android. Code itself is not Android-specific, and this patch includes a Linux test for it. llvm-svn: 199377
* [asan] Remove leftover use of -fsanitize-address-zero-base-shadow.Evgeniy Stepanov2014-01-161-11/+0
| | | | llvm-svn: 199373
* [asan] Nuke ASAN_FLEXIBLE_MAPPING_AND_OFFSET.Evgeniy Stepanov2014-01-168-127/+13
| | | | llvm-svn: 199370
* [lsan] handle 'new T[0]' where T is a type with DTOR; fixes ↵Kostya Serebryany2014-01-101-2/+6
| | | | | | https://code.google.com/p/address-sanitizer/issues/detail?id=257 llvm-svn: 198932
* [asan] Implement max_redzone runtime flag.Evgeniy Stepanov2014-01-094-4/+39
| | | | llvm-svn: 198873
* [ASan] Delete asan_intercepted_functions.h, move the code into ↵Alexander Potapenko2013-12-264-81/+61
| | | | | | | | asan_interceptors.h Fixes https://code.google.com/p/address-sanitizer/issues/detail?id=188. llvm-svn: 198048
* [asan] allow asan to use SizeClassAllocator32 on a 64-bit platform (if ↵Kostya Serebryany2013-12-261-11/+15
| | | | | | SANITIZER_CAN_USE_ALLOCATOR64=0). No functionality change by default is intended llvm-svn: 198044
* [ASan] Add a test for __asan_gen_ globals labels on Darwin.Alexander Potapenko2013-12-251-0/+14
| | | | | | | | | | | | | Per Nick Kledzik (http://llvm.org/bugs/show_bug.cgi?id=17976): """ For MacOSX, the labels in __cstring section should be 'L' labels, and the labels in the __const section should be non-L or 'l' labels. The later ('l') will cause the linker to remove the label in the final executable. """ , so we need to ensure that the globals emitted by ASan have appropriate labels. llvm-svn: 198022
* [ASan] Fix the test for __asan_gen_ globals and actually fix ↵Alexander Potapenko2013-12-251-1/+2
| | | | | | | | http://llvm.org/bugs/show_bug.cgi?id=17976 by setting the correct linkage (as stated in the bug). llvm-svn: 198018
OpenPOWER on IntegriCloud