summaryrefslogtreecommitdiffstats
path: root/compiler-rt/lib/asan/asan_allocator2.cc
Commit message (Collapse)AuthorAgeFilesLines
...
* [asan] Modify ASan metadata atomically.Sergey Matveev2013-05-201-3/+5
| | | | | | We need this to avoid races when ASan and LSan are used together. llvm-svn: 182252
* [ASan] Remove an unused ChunkBase fieldTimur Iskhodzhanov2013-05-201-5/+3
| | | | | | Also fix wrong alignment maths and an outdated comment llvm-svn: 182238
* [sanitizer] factor out ByteMap from SizeClassAllocator32 so that it can be ↵Kostya Serebryany2013-05-201-1/+5
| | | | | | later replaced with a more memory-efficient implementation on 64-bit. llvm-svn: 182234
* Replace CHECK(a == b); with CHECK_EQ(a, b); throughout asan_allocator2.ccTimur Iskhodzhanov2013-05-181-3/+3
| | | | llvm-svn: 182198
* [asan] fix powerpc build and one test; fix lintKostya Serebryany2013-05-151-1/+2
| | | | llvm-svn: 181881
* [asan] Common flags in ASan.Sergey Matveev2013-05-061-0/+1
| | | | | | | Some flags that are common to ASan/MSan/TSan/LSan have been moved to sanitizer_common. llvm-svn: 181193
* [asan] nuke the old unused allocator codeKostya Serebryany2013-04-041-4/+0
| | | | llvm-svn: 178758
* [asan] fill first 4K of malloc-ed memory with garbage, implement flags ↵Kostya Serebryany2013-04-041-11/+16
| | | | | | max_malloc_fill_size and malloc_fill_byte llvm-svn: 178757
* [ASan] Speed-up initialization-order checking: create and use fast versions ↵Alexey Samsonov2013-03-281-0/+1
| | | | | | of PoisonShadow functions, store copies of __asan_global descriptors in a vector instead of list of pointers. This gives 3x speedup on both benchmarks and real binaries with lots of globals. llvm-svn: 178239
* Revert 177745 as it was incorrectTimur Iskhodzhanov2013-03-221-2/+1
| | | | llvm-svn: 177746
* Band-aid fix for the Windows build caused by r177710. Long-term, ↵Timur Iskhodzhanov2013-03-221-1/+2
| | | | | | atomic_compare_exchange_strong should be a template on Windows too... llvm-svn: 177745
* [ASan] Fix an error on invalid deallocation in ASan allocator. When ASan ↵Alexey Samsonov2013-03-221-8/+10
| | | | | | checks if memory freed by user was indeed previously allocated, it first does an atomic write to presumed location of chunk header. This is wrong, as if the free is invalid, we may overwrite some valuable data (like other fields of the chunk header). Fix this by using atomic_compare_exchange instead. llvm-svn: 177710
* [ASan] Switch ASan to generic ThreadRegistry from sanitizer_common. Delete ↵Alexey Samsonov2013-03-211-1/+0
| | | | | | ASan-specific AsanThreadRegistry. llvm-svn: 177634
* [ASan] Move malloc stats collection away from AsanThreadRegistry class.Alexey Samsonov2013-03-201-6/+6
| | | | llvm-svn: 177508
* [ASan] Move GetCurrentThread/SetCurrentThread from AsanThreadRegistry class ↵Alexey Samsonov2013-03-201-2/+2
| | | | | | into plain functions: they don't actually use registry llvm-svn: 177501
* [asan] use 4Tb of address space for the asan allocator instead of 1Tb. This ↵Kostya Serebryany2013-03-121-1/+1
| | | | | | increases the memory available for a single size class from 16Gb to 64Gb. The total VM footprint becomes 20Tb llvm-svn: 176857
* [asan] if calloc returns a freshly-mmaped memory, don't clear it with ↵Kostya Serebryany2013-02-271-1/+3
| | | | | | memset. Speeds up calloc-intensive code llvm-svn: 176185
* [asan] a bit stricter lint for CHECK vs CHECK_XX (these CHECK_XX really help ↵Kostya Serebryany2013-02-261-1/+1
| | | | | | debugging!) llvm-svn: 176085
* [ASan] Switch Windows to allocator v2, also fixing some build errorsTimur Iskhodzhanov2013-02-081-1/+1
| | | | llvm-svn: 174707
* [ASan] Implement asan_mz_size(), asan_mz_force_lock() and ↵Alexander Potapenko2013-02-071-4/+5
| | | | | | | | asan_mz_force_unlock() for allocator2. Switch to allocator2 on Darwin. llvm-svn: 174603
* [asan] Fix nonsensical reports of partial right OOB.Evgeniy Stepanov2013-02-051-2/+2
| | | | | | | | | | In case of partial right OOB, ASan was reporting X is located 0 bytes to the right of [A, B) where X was actually inside [A, B). With this change, ASan will report B as the error address in such case. llvm-svn: 174373
* [ASan] Split ASan interface header into private and public parts. Add a test ↵Alexey Samsonov2013-01-311-1/+0
| | | | | | that makes sure users can include interface header llvm-svn: 174058
* [ASan] fix deallocation hook in allocator2: according to specification, ↵Alexey Samsonov2013-01-291-2/+1
| | | | | | dealloc hook should be called before deallocating memory llvm-svn: 173778
* [ASan] Do allocate memory even for zero-size allocation requests. Explain ↵Alexey Samsonov2013-01-291-10/+10
| | | | | | why we have to do this in comments. llvm-svn: 173776
* [ASan] fix a bug in allocator-v2 which could lead to SEGV on ↵Alexey Samsonov2013-01-281-1/+1
| | | | | | realloc(malloc(0), 4) llvm-svn: 173681
* [asan] fix a crash in asan stats printing (initialize the allocator in ↵Kostya Serebryany2013-01-281-6/+3
| | | | | | __asan_init) llvm-svn: 173676
* [sanitizer] fix calloc overflow in asan/tsan/msanKostya Serebryany2013-01-251-0/+1
| | | | llvm-svn: 173441
* [asan] initialize kHighMemEnd at startup (instead of at compile time) to ↵Kostya Serebryany2013-01-231-0/+4
| | | | | | simplify further changes for various address space layouts. Fix asan_allocator2 for PowerPC (tested on 44-bit address space) llvm-svn: 173260
* [ASan] fix __asan_get_ownership(p) and __asan_get_allocated_size(p) for the ↵Alexey Samsonov2013-01-171-4/+6
| | | | | | p = malloc(0) llvm-svn: 172717
* [asan] asan_allocator2: fix the memalign handling (clear the first word of ↵Kostya Serebryany2013-01-161-0/+2
| | | | | | allocated chunk in case there is an old memalign magic) llvm-svn: 172603
* asan: weaken memory ordering, it's expensive in current implementationDmitry Vyukov2013-01-111-1/+1
| | | | llvm-svn: 172210
* [asan] fid asan_allocator2 build Kostya Serebryany2013-01-111-1/+1
| | | | llvm-svn: 172194
* asan: always pass allocator cache to Allocate()Dmitry Vyukov2013-01-111-2/+9
| | | | llvm-svn: 172193
* asan: faster quarantineDmitry Vyukov2013-01-111-5/+7
| | | | llvm-svn: 172192
* asan: Refactor asan memory quarantine.Dmitry Vyukov2013-01-111-61/+42
| | | | llvm-svn: 172183
* [asan] asan_allocator2: do less work under the quarantine lock; make the ↵Kostya Serebryany2013-01-101-11/+11
| | | | | | strcasecmp test more resistant to the contents of unaddressable memory llvm-svn: 172048
* [sanitizer] add statistics to the allocator; fix lintKostya Serebryany2012-12-271-0/+4
| | | | llvm-svn: 171161
* [asan/tsan] when unmapping a chunk of user memory, apply ↵Kostya Serebryany2012-12-271-1/+8
| | | | | | madvise(MADV_DONTNEED) to the corresponding chunk of shadow memory. Also update sanitizer_allocator64_testlib.cc llvm-svn: 171144
* [asan] asan_allocator2: do not align the requested size to the redzone size ↵Kostya Serebryany2012-12-261-6/+10
| | | | | | (saves a bit more memory) llvm-svn: 171111
* [asan] asan_allocator2: implement adaptive redzones. Now with ↵Kostya Serebryany2012-12-261-30/+79
| | | | | | asan_allocator2 allocations <= 48 bytes have 16 byte redzone, allocations of 48-96 bytes -- have 32 bytes redzone, etc (max redzone is 2048). If ASAN_OPTIONS=redzone=n is set, it changes the minimal redzone size llvm-svn: 171107
* [asan] asan_allocator2: by default use the StackDepot to store the stack ↵Kostya Serebryany2012-12-261-9/+35
| | | | | | traces instead of storing them in the redzones llvm-svn: 171099
* [asan] asan_allocator2: store the user requested size in just 32 bits ↵Kostya Serebryany2012-12-261-37/+45
| | | | | | (larger sizes use metadata). This allows to put one more 32-bit field into the chunk header llvm-svn: 171089
* [asan] add a test for right OOB with special large sizes. Fix this test in ↵Kostya Serebryany2012-12-251-0/+4
| | | | | | asan_allocator2. More test tweaking for allocator2 llvm-svn: 171058
* [asan] asan_allocator2 fix two asserts that happen on full chrome: a) ↵Kostya Serebryany2012-12-211-7/+9
| | | | | | memalign called with 0 size and large alignment and b) malloc called after TSD has been destructed llvm-svn: 170900
* [asan] asan_allocator2: better memory statsKostya Serebryany2012-12-211-2/+13
| | | | llvm-svn: 170888
* [asan] add a flag alloc_dealloc_mismatch (off by default for now) which ↵Kostya Serebryany2012-12-211-15/+25
| | | | | | finds malloc/delete, new/free, new/delete[], etc mismatches llvm-svn: 170869
* [asan] asan_allocator2: implement memalignKostya Serebryany2012-12-201-4/+27
| | | | llvm-svn: 170697
* [asan] add a flag poison_heap to allow better allocator benchmarking, ↵Kostya Serebryany2012-12-201-1/+1
| | | | | | implemenet malloc_stats() on Linux llvm-svn: 170685
* [asan] asan_allocator2: make all remaining tests pass.Kostya Serebryany2012-12-201-11/+27
| | | | llvm-svn: 170680
* [asan] asan_allocator2: add mmap/munmap statsKostya Serebryany2012-12-191-0/+13
| | | | llvm-svn: 170548
OpenPOWER on IntegriCloud