summaryrefslogtreecommitdiffstats
path: root/compiler-rt/lib/asan
Commit message (Collapse)AuthorAgeFilesLines
...
* Reapply r201910. MSVC gets __func__ defined explicitly, even though itJoerg Sonnenberger2014-02-263-4/+4
| | | | | | can't build anything here. llvm-svn: 202297
* [asan] remove UB (comparison of two unrelated pointers) from a testKostya Serebryany2014-02-261-7/+8
| | | | llvm-svn: 202266
* [asan] asan_device_setup: fix a typo in usage textEvgeniy Stepanov2014-02-261-2/+2
| | | | llvm-svn: 202246
* [asan] Remove .sh extension from asan_device_setup.Evgeniy Stepanov2014-02-261-1/+1
| | | | llvm-svn: 202245
* [ASan] Don't set rpath when building ASan runtime libraries.Alexander Potapenko2014-02-251-0/+7
| | | | | | This should fix the issues with `make check-asan` on OS X. llvm-svn: 202144
* [asan] Fix for size_t in Asan's new and delete operators on x64 FreeBSD in ↵Kostya Serebryany2014-02-251-0/+9
| | | | | | 32-bit mode, only for FreeBSD <= 9.2; patch by Viktor Kutuzov llvm-svn: 202124
* [asan] simplify the code that compute the shadow offset; get rid of two ↵Kostya Serebryany2014-02-241-2/+0
| | | | | | internal flags that allowed to override it. The tests pass, but still this change might break asan on some platform not covered by tests. If you see this, please submit a fix with a test. llvm-svn: 202033
* Revert "Replace __FUNCTION__ with __func__, the latter being standard ↵Reid Kleckner2014-02-223-4/+4
| | | | | | | | | | | | C99/C++11." This reverts commit r201910. While __func__ may be standard in C++11, it was only recently added to MSVC in 2013 CTP, and LLVM supports MSVC 2012. __FUNCTION__ may not be standard, but it's *very* portable. llvm-svn: 201916
* Replace __FUNCTION__ with __func__, the latter being standard C99/C++11.Joerg Sonnenberger2014-02-213-4/+4
| | | | llvm-svn: 201910
* [CMake] break dependency between unit tests and runtimes in standalone buildAlexey Samsonov2014-02-201-4/+9
| | | | llvm-svn: 201778
* [asan] Changes to asm instrumentation must be done through the generator script.Evgeniy Stepanov2014-02-201-1/+1
| | | | llvm-svn: 201766
* [asan] Do all calls to __asan_report_* through PLT.Evgeniy Stepanov2014-02-201-20/+20
| | | | | | | | | | | | | This matters when runtime is built as a shared library. Even though calling code is itself part of the same library, these symbols are public and can (theoretically) be interposed. It might be better to declare hidden aliases for asan_report_* and call them directly, but (a) they are (noreturn), so performance does not matter, and (b) it may be potentially less portable. llvm-svn: 201764
* [asan] A different way of detectinb stack overflow.Evgeniy Stepanov2014-02-193-21/+30
| | | | | | | Instead of checking stack limits that are not well defined for the main thread, we rely on siginfo::si_code and distance from SP. llvm-svn: 201673
* [CMake] Introduce COMPILER_RT_INCLUDE_TESTS optionAlexey Samsonov2014-02-191-1/+1
| | | | llvm-svn: 201666
* [asan] Improve stack overflow detection.Evgeniy Stepanov2014-02-191-8/+6
| | | | | | There are more cases when those manifest as an access below SP. llvm-svn: 201664
* [asan] Disable asm instrumentation and tests on Mac.Evgeniy Stepanov2014-02-195-207/+228
| | | | | | Move asm tests to their own file. llvm-svn: 201653
* [asan] Fix build on ARM.Evgeniy Stepanov2014-02-191-1/+6
| | | | llvm-svn: 201652
* [asan] Added assembly functions for x86/amd64 asan.Evgeniy Stepanov2014-02-194-0/+1066
| | | | | | | | | These are runtime support functions for inline assembly instrumentation. This is a re-submit of r201402. Patch by Yuri Gorshenin. llvm-svn: 201650
* [ASan/Win] Add a couple more DLL thunksTimur Iskhodzhanov2014-02-181-0/+6
| | | | llvm-svn: 201580
* [asan] Stack overflow detection.Evgeniy Stepanov2014-02-181-5/+28
| | | | | | | Report segmentation faults near or below stack bottom as stack-overflow (not stack-buffer-overflow!). llvm-svn: 201565
* [CMake] Add top-level target for each compiler-rt library, and add ↵Alexey Samsonov2014-02-181-0/+1
| | | | | | 'compiler-rt' target encompassing them all. llvm-svn: 201556
* [CMake] Simplify setting compile flag disabling RTTIAlexey Samsonov2014-02-181-9/+2
| | | | llvm-svn: 201547
* [CMake] Simplify code for detecting/setting compiler flagsAlexey Samsonov2014-02-181-3/+1
| | | | llvm-svn: 201543
* [ASan] Rename asan_runtime_libraries to asan. Re-enable tests on Android.Alexey Samsonov2014-02-142-14/+11
| | | | llvm-svn: 201417
* Move ASan lit-tests under test/asanAlexey Samsonov2014-02-14152-4464/+0
| | | | llvm-svn: 201413
* [asan] Revert r201402, r201404.Evgeniy Stepanov2014-02-144-871/+0
| | | | | | Test fails in bootstrap build. llvm-svn: 201411
* [asan] Disable assembly on windows.Evgeniy Stepanov2014-02-141-3/+5
| | | | llvm-svn: 201404
* [asan] Added assembly functions for x86/amd64 asan.Evgeniy Stepanov2014-02-144-0/+869
| | | | | | | | These are runtime support functions for inline assembly instrumentation. Patch by Yuri Gorshenin. llvm-svn: 201402
* [sanitizer] Use mmap to zero-fill large shadow regions.Evgeniy Stepanov2014-02-141-1/+21
| | | | | | | | | | This is covered by existing ASan test. This does not change anything for TSan by default (but provides a flag to change the threshold size). Based on a patch by florent.bruneau here:   https://code.google.com/p/address-sanitizer/issues/detail?id=256 llvm-svn: 201400
* Move shared configs for lit test suites to test/ and unittests/ directoriesAlexey Samsonov2014-02-142-2/+2
| | | | llvm-svn: 201399
* [asan] Android test runner for ASan lit tests.Evgeniy Stepanov2014-02-147-43/+166
| | | | | | | | | | | | | This change replaces 32- and 64- bit config.in-s with a single config template that is used to generate both 32 and 64 bits configs as well as the new arm-android config. Arm-android config is special because it can run tests on a remote device over adb (android debug bridge). We replace %clang with a script that run the compiler, upload the result to the device, and replaces it with another script. The second script runs the binary on the device and delivers stdout/stderr/exitcode back. llvm-svn: 201394
* [libsanitizer] Create SanitizerCommonDecorator which provides the Warning() ↵Alexander Potapenko2014-02-141-4/+2
| | | | | | | | and EndWarning() methods (needed for SEGV handling in sanitizer_common) llvm-svn: 201392
* [asan] Disable 1 test on Android.Evgeniy Stepanov2014-02-131-0/+4
| | | | llvm-svn: 201332
* [asan] Remove extra clone() arguments in test.Evgeniy Stepanov2014-02-131-1/+1
| | | | | | Android headers define clone() as a 4-argument function without ellipsis. llvm-svn: 201331
* [asan] Enable signal and sigaction interceptors on Android.Evgeniy Stepanov2014-02-132-1/+16
| | | | | | Fixes AddressSanitizer.SignalTest breakage. llvm-svn: 201330
* [asan] Enable SEGV handler on Android by default.Evgeniy Stepanov2014-02-131-7/+1
| | | | | | | Seems stable enough. Fixes null_deref.cc test. llvm-svn: 201326
* [asan] Fix null_deref test with zero base shadow.Evgeniy Stepanov2014-02-131-1/+1
| | | | | | | | | | With zero base shadow, shadow for near-zero access is itself at near-zero location. As a result, this test crashes on the shadow access, and not on the app access. Relax a check to match this behavior. llvm-svn: 201324
* Remove a check from strerror_r test.Evgeniy Stepanov2014-02-131-1/+2
| | | | | | | | | It's not always true: on Android, strerror_r with invalid errno prints "Unknown error ..." to the buffer and returns 0. This test now only checks that strerror_r does not crash. llvm-svn: 201321
* [asan] Avoid deadlock in CovDump.Evgeniy Stepanov2014-02-131-0/+3
| | | | llvm-svn: 201304
* [sanitizer] AArch64 sanitizer support; patch by Christophe Lyon and Yvan RouxKostya Serebryany2014-02-132-1/+9
| | | | llvm-svn: 201303
* [sanitizer] Fix wait4 interceptor on Android.Evgeniy Stepanov2014-02-122-8/+31
| | | | | | It's called __wait4 there. llvm-svn: 201235
* [sanitizer] Use system unwinder in signal handlers on Android.Evgeniy Stepanov2014-02-115-16/+22
| | | | | | | | | | Because of the way Bionic sets up signal stack frames, libc unwinder is unable to step through it, resulting in broken SEGV stack traces. Luckily, libcorkscrew.so on Android implements an unwinder that can start with a signal context, thus sidestepping the issue. llvm-svn: 201151
* Add a copy of missing <ucontext.h> for Android and enable ASan SEGV handler.Evgeniy Stepanov2014-02-102-5/+8
| | | | | | | | | This change adds a copy of <ucontext.h> for Android found in google-breakpad that is missing from the official NDK. ASan SEGV handler is still disabled by default and can be enabled with ASAN_OPTIONS=handle_segv. llvm-svn: 201084
* Stick to C++98 for this.Nick Lewycky2014-02-081-2/+2
| | | | llvm-svn: 201015
* Update these declarations of operator delete (and delete[]) to have noexcept,Nick Lewycky2014-02-081-6/+12
| | | | | | | as required per core issue 1552 and warned about with -Wimplicit-exception-spec-mismatch. llvm-svn: 201014
* [asan] fix testing on MacKostya Serebryany2014-02-061-0/+2
| | | | llvm-svn: 200910
* [asan] introduce two functions that will allow implementations of C++ ↵Kostya Serebryany2014-02-064-5/+84
| | | | | | garbage colection to work with asan's fake stack llvm-svn: 200908
* [sanitizer] hide two functions in the __sanitizer namespace to avoid ↵Kostya Serebryany2014-02-051-2/+3
| | | | | | exporting them (gold complained) llvm-svn: 200844
* [ASan/Win] Add DLL thunks for __asan_{,un}poison_memory_regionTimur Iskhodzhanov2014-02-041-0/+3
| | | | llvm-svn: 200809
* [ASan] Get rid of asan_mac.h, which contents have been moved to sanitizer_mac.hAlexander Potapenko2014-02-043-51/+0
| | | | llvm-svn: 200757
OpenPOWER on IntegriCloud