summaryrefslogtreecommitdiff
path: root/lib/sanitizer_common/sanitizer_allocator_interface.h
AgeCommit message (Collapse)Author
2017-10-23[Sanitizers] New sanitizer API to purge allocator quarantine.Alex Shlyapnikov
Summary: Purging allocator quarantine and returning memory to OS might be desired between fuzzer iterations since, most likely, the quarantine is not going to catch bugs in the code under fuzz, but reducing RSS might significantly prolong the fuzzing session. Reviewers: cryptoad Subscribers: kubamracek, llvm-commits Differential Revision: https://reviews.llvm.org/D39153 git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@316347 91177308-0d34-0410-b5e6-96231b3b80d8
2017-03-15[asan] add one more argument to __sanitizer_print_memory_profile, remove a ↵Kostya Serebryany
redundant weak definition. git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@297914 91177308-0d34-0410-b5e6-96231b3b80d8
2017-01-31[sanitizer] Add list of symbols exported in sanitizers' interface.Marcos Pividori
Add a new auxiliary file to each sanitizer: sanitizer_interface.inc, listing all the functions exported, with the macros: INTERFACE_FUNCTION() and INTERFACE_WEAK_FUNCTION(). So, when we need to define or repeat a procedure for each function in the sanitizer's interface, we can define the macros and include that header. In particular, these files are needed for Windows, in the nexts commits. Also, this files could replace the existing files: weak_symbols.txt for Apple. Instead of reading weak_symbols.txt to get the list of weak symbols, we could read the file sanitizer_interface.inc and consider all the symbols included with the macro INTERFACE_WEAK_FUNCTION(Name). In this commit, I only include these files to the sanitizers that work on Windows. We could do the same for the rest of the sanitizers when needed. I updated tests for: Linux, Darwin and Windows. If a new function is exported but is not present in the interface list, the tests "interface_symbols_[darwin|windows|linux].c" fail. Also, I remove the comments: "/* OPTIONAL */" which are not required any more, because we use the macro: INTERFACE_WEAK_FUNCTION() for weak functions. Differential Revision: https://reviews.llvm.org/D29148 git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@293682 91177308-0d34-0410-b5e6-96231b3b80d8
2016-09-14[asan] add heap_profile=1 to asan to periodically print the heap profile. So ↵Kostya Serebryany
far this is a very basic heap-profile functionality git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@281546 91177308-0d34-0410-b5e6-96231b3b80d8
2016-06-16[sanitizers] introduce yet another API function: ↵Kostya Serebryany
__sanitizer_install_malloc_and_free_hooks git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@272943 91177308-0d34-0410-b5e6-96231b3b80d8
2014-07-07Generalize sanitizer allocator public interface.Alexey Samsonov
Introduce new public header <sanitizer/allocator_interface.h> and a set of functions __sanitizer_get_ownership(), __sanitizer_malloc_hook() etc. that will eventually replace their tool-specific equivalents (__asan_get_ownership(), __msan_get_ownership() etc.). Tool-specific functions are now deprecated and implemented as stubs redirecting to __sanitizer_ versions (which are implemented differently in each tool). Replace all uses of __xsan_ versions with __sanitizer_ versions in unit and lit tests. git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@212469 91177308-0d34-0410-b5e6-96231b3b80d8