summaryrefslogtreecommitdiff
path: root/lib/sanitizer_common/sanitizer_quarantine.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-01-19Whenever reasonable, merge ASAN quarantine batches to save memory.Alex Shlyapnikov
Summary: There are cases when thread local quarantine drains almost empty quarantine batches into the global quarantine. The current approach leaves them almost empty, which might create a huge memory overhead (each batch is 4K/8K, depends on bitness). Reviewers: eugenis Subscribers: kubabrecka, llvm-commits Differential Revision: https://reviews.llvm.org/D28068 git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@292525 91177308-0d34-0410-b5e6-96231b3b80d8
2017-01-12ASAN activate/deactive controls thread_local_quarantine_size_kb option.Alex Shlyapnikov
Summary: Bypass quarantine altogether when quarantine size is set ot zero. Also, relax atomic load/store of quarantine parameters, the release/acquire semantics is an overkill here. Reviewers: eugenis Subscribers: kubabrecka, llvm-commits, mehdi_amini Differential Revision: https://reviews.llvm.org/D28586 git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@291791 91177308-0d34-0410-b5e6-96231b3b80d8
2017-01-10Revert r291509, 291510 and 291511Diana Picus
Revert "ASAN activate/deactive controls thread_local_quarantine_size_kb option." Revert "Bypass quarantine when quarantine size is set ot zero." Revert "ASAN activate/deactive controls thread_local_quarantine_size_kb option." One of these commits broke some of the ARM / AArch64 buildbots: TEST 'AddressSanitizer-aarch64-linux :: TestCases/Posix/start-deactivated.cc' FAILED Command Output (stderr): -- /home/buildslave/buildslave/clang-cmake-aarch64-42vma/llvm/projects/compiler-rt/test/asan/TestCases/Posix/start-deactivated.cc:85:12: error: expected string not found in input // CHECK: WARNING: AddressSanitizer failed to allocate 0xfff{{.*}} bytes ^ <stdin>:1:1: note: scanning from here start-deactivated.cc.tmp: /home/buildslave/buildslave/clang-cmake-aarch64-42vma/llvm/projects/compiler-rt/test/asan/TestCases/Posix/start-deactivated.cc:40: void test_malloc_shadow(char *, size_t, bool): Assertion `(char *)__asan_region_is_poisoned(p - 1, sz + 1) == (expect_redzones ? p - 1 : nullptr)' failed. ^ <stdin>:2:1: note: possible intended match here Error: Aborted (core dumped) ^ git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@291560 91177308-0d34-0410-b5e6-96231b3b80d8
2017-01-09Bypass quarantine when quarantine size is set ot zero.Alex Shlyapnikov
git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@291510 91177308-0d34-0410-b5e6-96231b3b80d8
2017-01-09ASAN activate/deactive controls thread_local_quarantine_size_kb option.Alex Shlyapnikov
git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@291509 91177308-0d34-0410-b5e6-96231b3b80d8
2017-01-05Improved ASAN allocator and quarantine stats.Evgeniy Stepanov
Summary: Improved ASAN allocator and quarantine stats. Reviewers: eugenis Patch by Alex Shlyapnikov. Subscribers: llvm-commits, kubabrecka Differential Revision: https://reviews.llvm.org/D28333 git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@291183 91177308-0d34-0410-b5e6-96231b3b80d8
2016-12-22Expose thread local quarantine size as ASAN option.Evgeniy Stepanov
Summary: Make thread local quarantine size an option so it can be turned off to save memory. Reviewers: eugenis Patch by Alex Shlyapnikov. Subscribers: kubabrecka, llvm-commits Differential Revision: https://reviews.llvm.org/D28027 git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@290373 91177308-0d34-0410-b5e6-96231b3b80d8
2016-04-14asan: fix buildDmitry Vyukov
Some bots failed with: sanitizer_quarantine.h:104:7: error: unused typedef 'assertion_failed__104' [-Werror,-Wunused-local-typedef] COMPILER_CHECK(kPrefetch <= ARRAY_SIZE(b->batch)); Replace COMPILER_CHECK with CHECK. git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@266291 91177308-0d34-0410-b5e6-96231b3b80d8
2016-04-14asan: fix out-of-bounds access in quarantineDmitry Vyukov
git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@266288 91177308-0d34-0410-b5e6-96231b3b80d8
2015-09-29[sanitizer] Fix Clang-tidy modernize-use-nullptr warnings in ↵Kostya Serebryany
lib/sanitizer_common headers, unify closing inclusion guards. Patch by Eugene Zelenko git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@248816 91177308-0d34-0410-b5e6-96231b3b80d8
2015-01-06[asan] add a flag soft_rss_limit_mbKostya Serebryany
git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@225323 91177308-0d34-0410-b5e6-96231b3b80d8
2014-12-19[Sanitizer] Make Quarantine::Init slightly safer.Alexey Samsonov
ASan Quarantine can be reinitialized at activation/deactivation. Make max_size_/min_size_ atomic. git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@224613 91177308-0d34-0410-b5e6-96231b3b80d8
2013-10-21[asan] count the size of QuarantineBatch in the total Quarantine size; make ↵Kostya Serebryany
QuarantineBatch fit into 8K, fix a MSVC compile warning git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@193072 91177308-0d34-0410-b5e6-96231b3b80d8
2013-05-29Fix MSVC warnings at the -W2 levelTimur Iskhodzhanov
git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@182848 91177308-0d34-0410-b5e6-96231b3b80d8
2013-02-08[ASan] Switch Windows to allocator v2, also fixing some build errorsTimur Iskhodzhanov
git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@174707 91177308-0d34-0410-b5e6-96231b3b80d8
2013-01-30[Sanitizer] update style checker script and fix namespace style warningsAlexey Samsonov
git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@173910 91177308-0d34-0410-b5e6-96231b3b80d8
2013-01-11asan: add memory prefetch to quarantine recycleDmitry Vyukov
git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@172215 91177308-0d34-0410-b5e6-96231b3b80d8
2013-01-11asan: prevent inlining of cold functionDmitry Vyukov
git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@172197 91177308-0d34-0410-b5e6-96231b3b80d8
2013-01-11asan: faster quarantineDmitry Vyukov
git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@172192 91177308-0d34-0410-b5e6-96231b3b80d8
2013-01-11asan: Refactor asan memory quarantine.Dmitry Vyukov
git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@172183 91177308-0d34-0410-b5e6-96231b3b80d8