summaryrefslogtreecommitdiffstats
path: root/compiler-rt/lib/sanitizer_common/sanitizer_allocator.h
Commit message (Collapse)AuthorAgeFilesLines
* [sanitizer] use the right memory orderKostya Serebryany2015-01-091-1/+1
| | | | llvm-svn: 225546
* [asan] add a flag soft_rss_limit_mbKostya Serebryany2015-01-061-1/+13
| | | | llvm-svn: 225323
* [ASan] Change activation strategy.Alexey Samsonov2014-12-191-1/+5
| | | | | | | | | | | Now ASan deactivation doesn't modify common or ASan-specific runtime flags. Flags stay constant after initialization, and "deactivation" instead stashes initialized runtime state, and deactivates the runtime. Activation then just restores the original state (possibly, overriden by some activation flags provided in system property on Android). llvm-svn: 224614
* [sanitizer] Rename InitIfLinkerInitialized to InitLinkerInitialized.Sergey Matveev2014-12-191-8/+8
| | | | llvm-svn: 224577
* [sanitizer] add CombinedAllocator::InitIfLinkerInitialized and use it in ↵Kostya Serebryany2014-12-171-6/+24
| | | | | | lsan: speeds up lsan start-up time by ~25% llvm-svn: 224469
* [Sanitizer] Introduce Allocator::may_return_null bool flag.Alexey Samsonov2014-12-121-7/+34
| | | | | | | | | | | | | | | | | | | | Summary: Turn "allocator_may_return_null" common flag into an Allocator::may_return_null bool flag. We want to make sure that common flags are immutable after initialization. There are cases when we want to change this flag in the allocator at runtime: e.g. in unit tests and during ASan activation on Android. Test Plan: regression test suite, real-life applications Reviewers: kcc, eugenis Subscribers: llvm-commits Differential Revision: http://reviews.llvm.org/D6623 llvm-svn: 224148
* tsan: support mmap(MAP_32BIT)Dmitry Vyukov2014-10-241-5/+5
| | | | | | | | | Allow user memory in the first TB of address space. This also enabled non-pie binaries and freebsd. Fixes issue: https://code.google.com/p/thread-sanitizer/issues/detail?id=5 llvm-svn: 220571
* [sanitizer] Add a bunch of sanity checks.Evgeniy Stepanov2014-10-231-1/+4
| | | | llvm-svn: 220528
* Fix apparent thinko in r209744: allocator stats can be zeroAlexey Samsonov2014-06-301-2/+2
| | | | llvm-svn: 212071
* tsan: do not use 64-bit atomics in allocator codeDmitry Vyukov2014-05-281-18/+24
| | | | | | 64-bit atomics make porting of asan to 32-bits platforms problematic. llvm-svn: 209744
* [sanitizer] revert r200197: the buggy kernel ↵Kostya Serebryany2014-01-271-1/+1
| | | | | | (https://bugzilla.kernel.org/show_bug.cgi?id=67651) is almost unusable with asan even with this workaround (too slow), so this workaround makes no sense. The asan/msan bootstrap bot was changed to use a non-buggy kernel llvm-svn: 200217
* [sanitizer] increase the mmap granularity in sanitizer allocator from 2^16 ↵Kostya Serebryany2014-01-271-1/+1
| | | | | | to 2^18. This is a partial workaround for the fresh Kernel bug https://bugzilla.kernel.org/show_bug.cgi?id=67651 llvm-svn: 200197
* [sanitizer] Implement TwoLevelByteMap and use it for the internal allocator ↵Kostya Serebryany2013-11-251-1/+63
| | | | | | | | | | | | | | | | | | | | on 64-bit. Summary: Implement TwoLevelByteMap and use it for the internal allocator on 64-bit. This reduces bss on 64-bit by ~8Mb because we don't use FlatByteMap on 64-bits any more. Dmitry, please check my understanding of atomics. Reviewers: dvyukov Reviewed By: dvyukov CC: samsonov, llvm-commits Differential Revision: http://llvm-reviews.chandlerc.com/D2259 llvm-svn: 195637
* [sanitizer] Do not clear memory which comes from secondary allocator.Sergey Matveev2013-11-241-2/+3
| | | | | | Secondary allocator is mmap-based, so the memory is already zeroed. llvm-svn: 195571
* [sanitizer] use 16-byte aligned bzero in performance critical place (mostly ↵Kostya Serebryany2013-11-231-1/+1
| | | | | | for lsan) llvm-svn: 195549
* Rename SpinMutex::AssertHeld to CheckLocked, for consistency with BlockingMutex.Peter Collingbourne2013-10-251-1/+1
| | | | llvm-svn: 193447
* [asan] Fix a deadlock between asan's allocator and lsanKostya Serebryany2013-10-171-0/+1
| | | | | | | | | | | | | | | | Summary: This fixes a deadlock which happens in lsan on a large memalign-allocated chunk that resides in lsan's root set. Reviewers: samsonov, earthdok Reviewed By: earthdok CC: llvm-commits Differential Revision: http://llvm-reviews.chandlerc.com/D1957 llvm-svn: 192885
* [sanitizer] make the allocator crash instead of returning 0 on huge size ↵Kostya Serebryany2013-09-061-2/+5
| | | | | | (controlled by the allocator_may_return_null flag) llvm-svn: 190127
* tsan: better diagnostics for invalid addresses passed to free()Dmitry Vyukov2013-08-081-1/+4
| | | | llvm-svn: 187980
* Lint fixesAlexey Samsonov2013-08-051-1/+3
| | | | llvm-svn: 187726
* [msan] Allocator statistics interface and malloc hooks.Evgeniy Stepanov2013-08-021-5/+5
| | | | llvm-svn: 187653
* Revert to C-style callbacks for iteration over allocator chunks.Sergey Matveev2013-06-241-33/+28
| | | | | | | Also clean up LSan code, fix some comments and replace void* with uptr to bring down the number of reinterpret_casts. llvm-svn: 184700
* [lsan] Implement __lsan_ignore_object().Sergey Matveev2013-06-061-9/+9
| | | | | | Leak annotation similar to HeapChecker's IgnoreObject(). llvm-svn: 183412
* [lsan] Use the fast version of GetBlockBegin for leak checking in LSan and ASan.Sergey Matveev2013-05-311-4/+11
| | | | llvm-svn: 182994
* [sanitizer] introduce LargeMmapAllocator::GetBlockBeginFastSingleThreaded, ↵Kostya Serebryany2013-05-301-2/+49
| | | | | | required for LeakSanitizer to work faster. Also fix lint. llvm-svn: 182917
* Fix MSVC W3 compiler warningsTimur Iskhodzhanov2013-05-291-1/+1
| | | | llvm-svn: 182857
* [sanitizer] factor out ByteMap from SizeClassAllocator32 so that it can be ↵Kostya Serebryany2013-05-201-18/+39
| | | | | | later replaced with a more memory-efficient implementation on 64-bit. llvm-svn: 182234
* [sanitizer] fix gcc buildKostya Serebryany2013-05-161-1/+1
| | | | llvm-svn: 182006
* [sanitizer] Fix the region overflow condition in ↵Sergey Matveev2013-05-161-1/+1
| | | | | | SanitizerAllocator64::PopulateFreeList(). llvm-svn: 182002
* [sanitizer] fix a gcc warningKostya Serebryany2013-05-161-1/+1
| | | | llvm-svn: 181992
* [sanitizer] fix the GetBlockBegin overflow bug while preserving the ↵Kostya Serebryany2013-05-161-4/+5
| | | | | | performance optimization (use 32-bit division when possible). Improve the benchmarks that checks for performance of GetBlockBegin/GetMetaData llvm-svn: 181989
* [sanitizer] Fix boundary condition in LargeMmapAllocator::GetBlockBegin. ↵Kostya Serebryany2013-04-081-1/+1
| | | | | | Patch by Sergey Matveev llvm-svn: 179007
* asan/tsan: reduce per-thread memory allocator cachesDmitry Vyukov2013-03-201-1/+1
| | | | | | | 256 blocks (which is 512 in reallity) seems to be too big cache, reducing the size reduces memory consumption but does not degrade performance. llvm-svn: 177502
* [asan] Add ForEachChunk() to sanitizer allocators. Patch by Sergey MatveevKostya Serebryany2013-03-151-0/+55
| | | | llvm-svn: 177147
* [asan] remove one redundant malloc stress test, unify the usage of ↵Kostya Serebryany2013-03-141-1/+1
| | | | | | ASAN_LOW_MEMORY macro in tests, slightly reduce test memory usage (all to make 32-bit runs consume less RAM) llvm-svn: 177069
* [sanitizer] use fewer size classes in the allocator to reduce the memory ↵Kostya Serebryany2013-03-121-25/+27
| | | | | | footprint. There is no all-size-fits-all constant here, but this change is positive or neutral on several large apps I've tested llvm-svn: 176855
* [sanitizer] simplify the allocator's SizeClassMap: do not require an extra ↵Kostya Serebryany2013-03-121-20/+15
| | | | | | template parameter, instead compute it in flight. No functionality change llvm-svn: 176853
* [sanitizer] make SizeClassAllocator64::GetBlockBegin more bullet proof (by ↵Kostya Serebryany2013-03-111-0/+2
| | | | | | Sergey Matveev) llvm-svn: 176799
* [sanitizers] Fix check failure on dealloc from new threadReid Kleckner2013-03-061-2/+13
| | | | | | | | | | | | | | Summary: Adds a test for this case, which was reduced from a chromium build of WebKit's DumpRenderTree. Reviewers: eugenis CC: glider Differential Revision: http://llvm-reviews.chandlerc.com/D495 llvm-svn: 176552
* [sanitizer] Fix check failure in SizeClassMap::Print.Evgeniy Stepanov2013-03-011-1/+1
| | | | llvm-svn: 176338
* [asan] a bit stricter lint for CHECK vs CHECK_XX (these CHECK_XX really help ↵Kostya Serebryany2013-02-261-0/+1
| | | | | | debugging!) llvm-svn: 176085
* [ASan] Switch Windows to allocator v2, also fixing some build errorsTimur Iskhodzhanov2013-02-081-3/+3
| | | | llvm-svn: 174707
* [sanitizer] always allocate 16-byte aligned chunks of memoryKostya Serebryany2013-02-071-23/+38
| | | | llvm-svn: 174617
* [sanitizer_common] Fix lint warnings.Alexander Potapenko2013-02-071-4/+4
| | | | llvm-svn: 174616
* [ASan] Fix a compilation warning.Alexander Potapenko2013-02-071-1/+1
| | | | llvm-svn: 174604
* [ASan] Implement asan_mz_size(), asan_mz_force_lock() and ↵Alexander Potapenko2013-02-071-0/+50
| | | | | | | | asan_mz_force_unlock() for allocator2. Switch to allocator2 on Darwin. llvm-svn: 174603
* asan/tsan: fix compilation errors/bugs on Windows where long is 32-bit even ↵Dmitry Vyukov2013-02-041-1/+1
| | | | | | in 64-bit mode llvm-svn: 174312
* Use the correct order of NOINLINE vs ret type to fix Windows buildTimur Iskhodzhanov2013-01-281-7/+7
| | | | llvm-svn: 173694
* [sanitizer] fix calloc overflow in asan/tsan/msanKostya Serebryany2013-01-251-0/+3
| | | | llvm-svn: 173441
* tsan: implement malloc stats queryingDmitry Vyukov2013-01-241-20/+135
| | | | llvm-svn: 173332
OpenPOWER on IntegriCloud