summaryrefslogtreecommitdiff
path: root/include/sanitizer/common_interface_defs.h
AgeCommit message (Collapse)Author
2016-06-02[asan] fix arm buildKostya Serebryany
git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@271474 91177308-0d34-0410-b5e6-96231b3b80d8
2016-06-02[asan] add an interface function __sanitizer_print_memory_profile (a basic ↵Kostya Serebryany
memory profiler; asan/Linux-only for now) git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@271463 91177308-0d34-0410-b5e6-96231b3b80d8
2016-05-27[sanitizers] introduce __sanitizer_set_report_fd so that we can re-route the ↵Kostya Serebryany
sanitizer logging to another fd from inside the process git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@271046 91177308-0d34-0410-b5e6-96231b3b80d8
2016-01-12[libFuzzer] extend the weak memcmp/strcmp/strncmp interceptors to receive ↵Kostya Serebryany
the result of the computations. With that, don't do any mutations if memcmp/etc returned 0 git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@257423 91177308-0d34-0410-b5e6-96231b3b80d8
2015-11-04Asan: utility function to determine first wrongly poisoned byte inMike Aizatsky
container. Differential Revision: http://reviews.llvm.org/D14341 git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@252071 91177308-0d34-0410-b5e6-96231b3b80d8
2015-07-30[sanitizer] add a weak hook for strncmp interceptor, both to dfsan and other ↵Kostya Serebryany
sanitizers. Hide the declaration and the calls in better macros git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@243610 91177308-0d34-0410-b5e6-96231b3b80d8
2015-07-30[sanitizer] add a weak hook for memcmp interceptor, to be used primarily for ↵Kostya Serebryany
fuzzing. More hooks will be added later. So far this is a Linux-only feature git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@243601 91177308-0d34-0410-b5e6-96231b3b80d8
2015-02-03[sanitizer] move the coverage interface into a separate header, ↵Kostya Serebryany
<sanitizer/coverage_interface.h>. NFC, except for the header name change. This may break existing users, but in this case it's better this way (not too many users so far) git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@228017 91177308-0d34-0410-b5e6-96231b3b80d8
2015-01-28[sanitizer] allow to reset the bb/edge coverage data inside the process ↵Kostya Serebryany
while it is running (single-threaded). Also expose the current coverage set to the process. git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@227387 91177308-0d34-0410-b5e6-96231b3b80d8
2014-12-15[asan] introduce __sanitizer_set_death_callback, deprecate ↵Kostya Serebryany
__asan_set_death_callback git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@224286 91177308-0d34-0410-b5e6-96231b3b80d8
2014-11-14[asan] add interface function __sanitizer_get_total_unique_coverage; useful ↵Kostya Serebryany
for coverage-guided in-process fuzzers git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@222060 91177308-0d34-0410-b5e6-96231b3b80d8
2014-10-13Fix minor typos in comments.Filipe Cabecinhas
git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@219632 91177308-0d34-0410-b5e6-96231b3b80d8
2014-05-21[sanitizer] Add __sanitizer_maybe_open_cov_file().Sergey Matveev
Summary: Add a new interface function required for coverage sandboxing support. git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@209298 91177308-0d34-0410-b5e6-96231b3b80d8
2014-05-19[sanitizer] Support sandboxing in sanitizer coverage.Sergey Matveev
Summary: Sandboxed code may now pass additional arguments to __sanitizer_sandbox_on_notify() to force all coverage data to be dumped to a single file (the default is one file per module). The user may supply a file or socket to write to. The latter option can be used to broker out the file writing functionality. If -1 is passed, we pre-open a file. git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@209121 91177308-0d34-0410-b5e6-96231b3b80d8
2014-05-06[asan] introduce interface function __sanitizer_verify_contiguous_container ↵Kostya Serebryany
to verify annotations in vector-like containers git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@208092 91177308-0d34-0410-b5e6-96231b3b80d8
2014-04-30[asan] make AsanCoverage lock-free (and AS-safe)Kostya Serebryany
git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@207630 91177308-0d34-0410-b5e6-96231b3b80d8
2014-01-13[sanitizer] fix commentKostya Serebryany
git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@199112 91177308-0d34-0410-b5e6-96231b3b80d8
2013-12-03[sanitizer] Expose __sanitizer_print_stack_trace().Sergey Matveev
Expose a new interface function for debugging code built with sanitizer tools. Add an ASan implementation. git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@196302 91177308-0d34-0410-b5e6-96231b3b80d8
2013-11-19[asan] remove a fixed FIXME; extend the comment around ↵Kostya Serebryany
__sanitizer_annotate_contiguous_container git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@195131 91177308-0d34-0410-b5e6-96231b3b80d8
2013-11-19[asan] new shadow poison magic for contiguous-container-buffer-overflow, ↵Kostya Serebryany
addressed Alexey Samsonov's comments for r195011 git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@195117 91177308-0d34-0410-b5e6-96231b3b80d8
2013-11-18[asan] introduce __sanitizer_annotate_contiguous_containerKostya Serebryany
git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@195011 91177308-0d34-0410-b5e6-96231b3b80d8
2013-11-15Reapply asan coverage changes 194702-194704.Bob Wilson
I still don't know what is causing our bootstrapped LTO buildbots to fail, but llvm r194701 seems to be OK and I can't imagine that these changes could cause the problem. git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@194790 91177308-0d34-0410-b5e6-96231b3b80d8
2013-11-15Speculatively revert asan coverage changes 194702-194704.Bob Wilson
Apple's bootstrapped LTO builds have been failing, and these changes (along with llvm 194701) are the only things on the blamelist. I will either reapply these changes or help debug the problem, depending on whether this fixes the buildbots. git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@194779 91177308-0d34-0410-b5e6-96231b3b80d8
2013-11-14[asan] unbreak dfsan, which includes sanitizer/common_interface_defs.h into ↵Kostya Serebryany
internal sources (although it shoudn't) git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@194704 91177308-0d34-0410-b5e6-96231b3b80d8
2013-11-14[asan] Poor man's coverage that works with ASan (compiler-rt part)Kostya Serebryany
git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@194702 91177308-0d34-0410-b5e6-96231b3b80d8
2013-10-15tsan: remove __sanitizer_set_report_fd function from public interfaceDmitry Vyukov
__sanitizer_set_report_path now accepts two special values - stderr and stdout logging to other file descriptors is not supported anymore, it's fragile in presence of multiple processes, fork, etc git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@192706 91177308-0d34-0410-b5e6-96231b3b80d8
2013-04-10[asan] implement callbacks for unaligned loads/storesKostya Serebryany
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
2013-02-15[asan] make asan work with 7fff8000 offset and prelinkKostya Serebryany
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
2013-02-06[asan] print a short one-line report summary after the full report. ↵Kostya Serebryany
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
2013-01-30[sanitizer] Further split private and public sanitizer headers.Evgeniy Stepanov
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
2012-12-10Add a libsanitizer API __sanitizer_sandbox_on_notify(void* reserved), which ↵Alexander Potapenko
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
2012-12-07ASan: change the strategy we use for installing malloc/free/symbolization ↵Alexey Samsonov
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
2012-11-19[asan] support x32 mode in the fast stack unwinder. Patch by H.J. Lu Kostya Serebryany
git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@168306 91177308-0d34-0410-b5e6-96231b3b80d8
2012-11-02[Sanitizer]: add __sanitizer_set_report_fd function to alter file descriptor ↵Alexey Samsonov
for error reports git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@167290 91177308-0d34-0410-b5e6-96231b3b80d8
2012-09-24[ASan] Apply some ASan-relevant pieces of patch by Ruben Van Boxem. In the ↵Alexey Samsonov
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
2012-09-14[asan] add asan option log_path=PATH to let users redirect asan reports to a ↵Kostya Serebryany
file PATH.PID instead of stderr git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@163872 91177308-0d34-0410-b5e6-96231b3b80d8
2012-08-29Relocate the external headers provided by ASan and the common sanitizerChandler Carruth
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