summaryrefslogtreecommitdiff
path: root/include
Commit message (Collapse)AuthorAge
* [LSan] Add the way to disable LSan at link timeAlexey Samsonov2013-06-27
| | | | git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@185066 91177308-0d34-0410-b5e6-96231b3b80d8
* [msan] Add keep_going runtime flag.Evgeniy Stepanov2013-06-21
| | | | git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@184542 91177308-0d34-0410-b5e6-96231b3b80d8
* Properly install LSan interface header, rely on sanitizer header presence in ↵Alexey Samsonov2013-06-14
| | | | | | lit tests git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@183977 91177308-0d34-0410-b5e6-96231b3b80d8
* [lsan] Implement __lsan_ignore_object().Sergey Matveev2013-06-06
| | | | | | Leak annotation similar to HeapChecker's IgnoreObject(). git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@183412 91177308-0d34-0410-b5e6-96231b3b80d8
* [lsan] Add __lsan_disable() and __lsan_enable().Sergey Matveev2013-06-03
| | | | | | | Objects allocated after a call to __lsan_disable() will be treated as live memory. Also add a ScopedDisabler. git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@183099 91177308-0d34-0410-b5e6-96231b3b80d8
* [MSan] Make a few interface functions accept 'const void *' instead of 'void*'Alexey Samsonov2013-04-23
| | | | git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@180102 91177308-0d34-0410-b5e6-96231b3b80d8
* [sanitizer] Fix lint.Evgeniy Stepanov2013-04-22
| | | | git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@180012 91177308-0d34-0410-b5e6-96231b3b80d8
* [sanitizer] Implement wait4 and waitpid syscall hooks.Evgeniy Stepanov2013-04-16
| | | | git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@179592 91177308-0d34-0410-b5e6-96231b3b80d8
* [sanitizer] More syscall handler placeholders.Evgeniy Stepanov2013-04-12
| | | | | | | | This time it's the full list scavenged from syscalls.h Fixed return value type. git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@179378 91177308-0d34-0410-b5e6-96231b3b80d8
* Explicitly list all sanitizer headers in CMake build rules. Make sure ↵Alexey Samsonov2013-04-11
| | | | | | sanitizer lit_tests depend on fresh headers. git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@179293 91177308-0d34-0410-b5e6-96231b3b80d8
* [sanitizer] Syscall hooks.Evgeniy Stepanov2013-04-11
| | | | | | | | Pre- and post- hooks for linux syscalls. Not wired into anything, but exposed through public interface. git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@179288 91177308-0d34-0410-b5e6-96231b3b80d8
* [asan] implement callbacks for unaligned loads/storesKostya Serebryany2013-04-10
| | | | | | | | | | | | Reviewers: samsonov Reviewed By: samsonov CC: samsonov, llvm-commits Differential Revision: http://llvm-reviews.chandlerc.com/D652 git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@179175 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] print a short one-line report summary after the full report. ↵Kostya Serebryany2013-02-06
| | | | | | Currently, works only if symbolization happens in-process. git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@174501 91177308-0d34-0410-b5e6-96231b3b80d8
* [ASan] Split ASan interface header into private and public parts. Add a test ↵Alexey Samsonov2013-01-31
| | | | | | that makes sure users can include interface header git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@174058 91177308-0d34-0410-b5e6-96231b3b80d8
* [sanitizer] Further split private and public sanitizer headers.Evgeniy Stepanov2013-01-30
| | | | | | | And make msan_interface.h C-compatible. git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@173928 91177308-0d34-0410-b5e6-96231b3b80d8
* [msan] Remove an extra #ifdef.Evgeniy Stepanov2013-01-30
| | | | | | | __has_feature is always defined at this point. git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@173920 91177308-0d34-0410-b5e6-96231b3b80d8
* [msan] Cleanup public interface header.Evgeniy Stepanov2013-01-29
| | | | | | | | | Moved everything users are not supposed to use to a private interface header. Documented all public interfaces. Made them safe to use even if built without MemorySanitizer. git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@173800 91177308-0d34-0410-b5e6-96231b3b80d8
* [msan] A runtime call to support custom allocators.Evgeniy Stepanov2013-01-28
| | | | git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@173687 91177308-0d34-0410-b5e6-96231b3b80d8
* [asan] kill some dead codeKostya Serebryany2013-01-18
| | | | git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@172815 91177308-0d34-0410-b5e6-96231b3b80d8
* [asan] add a new interface function __asan_describe_address, useful for ↵Kostya Serebryany2012-12-29
| | | | | | running asan-ified binary under a debugger (e.g. gdb) git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@171217 91177308-0d34-0410-b5e6-96231b3b80d8
* [asan] one more change missed at r171198Kostya Serebryany2012-12-28
| | | | git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@171199 91177308-0d34-0410-b5e6-96231b3b80d8
* [msan] Add a missing file from r169858.Evgeniy Stepanov2012-12-11
| | | | git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@169860 91177308-0d34-0410-b5e6-96231b3b80d8
* Add a libsanitizer API __sanitizer_sandbox_on_notify(void* reserved), which ↵Alexander Potapenko2012-12-10
| | | | | | | | | | should be used by the client programs to notify the tools that sandboxing is about to be turned on. git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@169732 91177308-0d34-0410-b5e6-96231b3b80d8
* ASan: change the strategy we use for installing malloc/free/symbolization ↵Alexey Samsonov2012-12-07
| | | | | | hooks on Linux: don't provide a default no-op implementations for hooks in runtime, and optionally call hooks if they are provided by the user. Don't force weak interface functions into runtime. git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@169641 91177308-0d34-0410-b5e6-96231b3b80d8
* ASan: add new interface functions - __asan_(un)poison_stack_memory. Calls to ↵Alexey Samsonov2012-12-04
| | | | | | these functions are inserted by the instrumentation pass in use-after-scope mode git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@169201 91177308-0d34-0410-b5e6-96231b3b80d8
* [asan] support x32 mode in the fast stack unwinder. Patch by H.J. Lu Kostya Serebryany2012-11-19
| | | | git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@168306 91177308-0d34-0410-b5e6-96231b3b80d8
* [Sanitizer]: add __sanitizer_set_report_fd function to alter file descriptor ↵Alexey Samsonov2012-11-02
| | | | | | for error reports git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@167290 91177308-0d34-0410-b5e6-96231b3b80d8
* [ASan] Change __asan_set_on_error_callback to weak overridable ↵Alexey Samsonov2012-10-02
| | | | | | __asan_on_error, so that ASan would call the latter even if it finds the error early (i.e. during module initialization) git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@165008 91177308-0d34-0410-b5e6-96231b3b80d8
* [Sanitizer/ASan] Simplify the code that prints and symbolizes stack traces. ↵Alexey Samsonov2012-10-02
| | | | | | Fall back to module+offset if user-provided symbolizer failed. Use weak function __asan_symbolize instead of __asan_set_symbolize_callback in ASan interface, so that we're able to symbolize reports for errors that happen before the main() is called, for example, during module initialization. git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@165000 91177308-0d34-0410-b5e6-96231b3b80d8
* [ASan] Apply some ASan-relevant pieces of patch by Ruben Van Boxem. In the ↵Alexey Samsonov2012-09-24
| | | | | | same time, remove ASan from CMake build on Windows after conversation with Timur. We don't want to support building ASan on Windows until it is in a working state. git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@164486 91177308-0d34-0410-b5e6-96231b3b80d8
* [asan] add asan option log_path=PATH to let users redirect asan reports to a ↵Kostya Serebryany2012-09-14
| | | | | | file PATH.PID instead of stderr git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@163872 91177308-0d34-0410-b5e6-96231b3b80d8
* Relocate the external headers provided by ASan and the common sanitizerChandler Carruth2012-08-29
library. These headers are intended to be available to user code when built with AddressSanitizer (or one of the other sanitizer's in the future) to interface with the runtime library. As such, they form stable external C interfaces, and the headers shouldn't be located within the implementation. I've pulled them out into what seem like fairly obvious locations and names, but I'm wide open to further bikeshedding of these names and locations. I've updated the code and the build system to cope with the new locations, both CMake and Makefile. Please let me know if this breaks anyone's build. The eventual goal is to install these headers along side the Clang builtin headers when we build the ASan runtime and install it. My current thinking is to locate them at: <prefix>/lib/clang/X.Y/include/sanitizer/common_interface_defs.h <prefix>/lib/clang/X.Y/include/sanitizer/asan_interface.h <prefix>/lib/clang/X.Y/include/sanitizer/... But maybe others have different suggestions? Fixing the style of the #include between these headers at least unblocks experimentation with installing them as they now should work when installed in these locations. git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@162822 91177308-0d34-0410-b5e6-96231b3b80d8