summaryrefslogtreecommitdiff
path: root/include/sanitizer
AgeCommit message (Collapse)Author
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-23tsan: fix linux syscall hooksDmitry Vyukov
the file references non-existent arguments and breaks build git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@193234 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-09-21tsan: intercept fork syscallDmitry Vyukov
git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@191144 91177308-0d34-0410-b5e6-96231b3b80d8
2013-09-10[msan] Make all pointers in msan_interface "const volatile void *".Evgeniy Stepanov
This way msan annotations can be used with both normal and volatile memory. git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@190403 91177308-0d34-0410-b5e6-96231b3b80d8
2013-09-10[msan] bool -> int to make msan_interface.h C-compatible.Evgeniy Stepanov
git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@190402 91177308-0d34-0410-b5e6-96231b3b80d8
2013-09-06[sanitizer] A bunch of linux system call handlers.Evgeniy Stepanov
git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@190157 91177308-0d34-0410-b5e6-96231b3b80d8
2013-08-13[dfsan] Introduce dfsan_read_label runtime function.Peter Collingbourne
Differential Revision: http://llvm-reviews.chandlerc.com/D1349 git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@188319 91177308-0d34-0410-b5e6-96231b3b80d8
2013-08-13dfsan: fix lint warningDmitry Vyukov
git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@188292 91177308-0d34-0410-b5e6-96231b3b80d8
2013-08-12[dfsan] Introduce dfsan_union runtime function.Peter Collingbourne
Differential Revision: http://llvm-reviews.chandlerc.com/D1347 git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@188229 91177308-0d34-0410-b5e6-96231b3b80d8
2013-08-07DataFlowSanitizer; compiler-rt changes.Peter Collingbourne
DataFlowSanitizer is a generalised dynamic data flow analysis. Unlike other Sanitizer tools, this tool is not designed to detect a specific class of bugs on its own. Instead, it provides a generic dynamic data flow analysis framework to be used by clients to help detect application-specific issues within their own code. Differential Revision: http://llvm-reviews.chandlerc.com/D967 git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@187924 91177308-0d34-0410-b5e6-96231b3b80d8
2013-08-05Lint fixesAlexey Samsonov
git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@187726 91177308-0d34-0410-b5e6-96231b3b80d8
2013-08-02[msan] Allocator statistics interface and malloc hooks.Evgeniy Stepanov
git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@187653 91177308-0d34-0410-b5e6-96231b3b80d8
2013-07-30[sanitizer] Tweak read syscall handler signature for consistency.Evgeniy Stepanov
git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@187417 91177308-0d34-0410-b5e6-96231b3b80d8
2013-07-30[sanitizer] read() syscall hook.Evgeniy Stepanov
git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@187414 91177308-0d34-0410-b5e6-96231b3b80d8
2013-07-18[lsan] Add __lsan_do_leak_check() to the public interface.Sergey Matveev
Let users override the normal behavior to run leak checking earlier in the process. Also fix a couple nits here and there. git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@186581 91177308-0d34-0410-b5e6-96231b3b80d8
2013-07-09[sanitizer] Syscall handlers for clock_gettime and clock_getres.Evgeniy Stepanov
git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@185913 91177308-0d34-0410-b5e6-96231b3b80d8
2013-06-27[LSan] Add the way to disable LSan at link timeAlexey Samsonov
git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@185066 91177308-0d34-0410-b5e6-96231b3b80d8
2013-06-21[msan] Add keep_going runtime flag.Evgeniy Stepanov
git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@184542 91177308-0d34-0410-b5e6-96231b3b80d8
2013-06-06[lsan] Implement __lsan_ignore_object().Sergey Matveev
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
2013-06-03[lsan] Add __lsan_disable() and __lsan_enable().Sergey Matveev
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
2013-04-23[MSan] Make a few interface functions accept 'const void *' instead of 'void*'Alexey Samsonov
git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@180102 91177308-0d34-0410-b5e6-96231b3b80d8
2013-04-22[sanitizer] Fix lint.Evgeniy Stepanov
git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@180012 91177308-0d34-0410-b5e6-96231b3b80d8
2013-04-16[sanitizer] Implement wait4 and waitpid syscall hooks.Evgeniy Stepanov
git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@179592 91177308-0d34-0410-b5e6-96231b3b80d8
2013-04-12[sanitizer] More syscall handler placeholders.Evgeniy Stepanov
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
2013-04-11[sanitizer] Syscall hooks.Evgeniy Stepanov
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
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-31[ASan] Split ASan interface header into private and public parts. Add a test ↵Alexey Samsonov
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
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
2013-01-30[msan] Remove an extra #ifdef.Evgeniy Stepanov
__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
2013-01-29[msan] Cleanup public interface header.Evgeniy Stepanov
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
2013-01-28[msan] A runtime call to support custom allocators.Evgeniy Stepanov
git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@173687 91177308-0d34-0410-b5e6-96231b3b80d8
2013-01-18[asan] kill some dead codeKostya Serebryany
git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@172815 91177308-0d34-0410-b5e6-96231b3b80d8
2012-12-29[asan] add a new interface function __asan_describe_address, useful for ↵Kostya Serebryany
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
2012-12-28[asan] one more change missed at r171198Kostya Serebryany
git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@171199 91177308-0d34-0410-b5e6-96231b3b80d8
2012-12-11[msan] Add a missing file from r169858.Evgeniy Stepanov
git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@169860 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-12-04ASan: add new interface functions - __asan_(un)poison_stack_memory. Calls to ↵Alexey Samsonov
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
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-10-02[ASan] Change __asan_set_on_error_callback to weak overridable ↵Alexey Samsonov
__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
2012-10-02[Sanitizer/ASan] Simplify the code that prints and symbolizes stack traces. ↵Alexey Samsonov
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