Kostya Serebryany
459df6f167
[asan] a bit stricter lint for CHECK vs CHECK_XX (these CHECK_XX really help debugging!)
...
llvm-svn: 176085
2013-02-26 12:59:06 +00:00
Timur Iskhodzhanov
167f9e4395
[ASan] Switch Windows to allocator v2, also fixing some build errors
...
llvm-svn: 174707
2013-02-08 12:02:00 +00:00
Kostya Serebryany
39675fe9c8
[sanitizer] always allocate 16-byte aligned chunks of memory
...
llvm-svn: 174617
2013-02-07 15:04:06 +00:00
Alexander Potapenko
109aa04ea9
[sanitizer_common] Fix lint warnings.
...
llvm-svn: 174616
2013-02-07 14:58:04 +00:00
Alexander Potapenko
07c740e213
[ASan] Fix a compilation warning.
...
llvm-svn: 174604
2013-02-07 12:00:40 +00:00
Alexander Potapenko
f444a49310
[ASan] Implement asan_mz_size(), asan_mz_force_lock() and asan_mz_force_unlock() for allocator2.
...
Switch to allocator2 on Darwin.
llvm-svn: 174603
2013-02-07 11:40:03 +00:00
Dmitry Vyukov
7981ea8baa
asan/tsan: fix compilation errors/bugs on Windows where long is 32-bit even in 64-bit mode
...
llvm-svn: 174312
2013-02-04 08:07:45 +00:00
Timur Iskhodzhanov
6cff9deb16
Use the correct order of NOINLINE vs ret type to fix Windows build
...
llvm-svn: 173694
2013-01-28 17:29:50 +00:00
Kostya Serebryany
fa79cd65e2
[sanitizer] fix calloc overflow in asan/tsan/msan
...
llvm-svn: 173441
2013-01-25 11:46:22 +00:00
Dmitry Vyukov
6e406cda4b
tsan: implement malloc stats querying
...
llvm-svn: 173332
2013-01-24 09:08:03 +00:00
Kostya Serebryany
7206a145dd
[sanitizer] increase the minimal mmap size in allocator to 2^16; fix the asan Mac build
...
llvm-svn: 173261
2013-01-23 14:07:17 +00:00
Dmitry Vyukov
45a698eb58
asan: faster thead-local cache for memory allocator
...
llvm-svn: 172521
2013-01-15 09:02:20 +00:00
Dmitry Vyukov
4ebb4e5565
asan/tsan: mmap shadow memory before allocating memory (otherwise other threads can access non yet allocated shadow)
...
llvm-svn: 172395
2013-01-14 10:49:11 +00:00
Dmitry Vyukov
38092f628b
asan/tsan: fix memory allocator statistics
...
llvm-svn: 172390
2013-01-14 08:51:08 +00:00
Dmitry Vyukov
795eb90db5
asan/tsan: faster memory allocator
...
1. Increase size classes from 32k to 128k
2. Use lock-free stack in central cache
3. Use blocking mutex when allocate new memory with mmap
llvm-svn: 172388
2013-01-14 08:23:34 +00:00
Dmitry Vyukov
f22982bf0a
asan/tsan: move blocking mutex from asan to sanitizer_common
...
llvm-svn: 172380
2013-01-14 07:51:39 +00:00
Dmitry Vyukov
ecd73d36d4
asan/tsan: faster memory allocator
...
replace lists with arrays
llvm-svn: 172217
2013-01-11 16:41:19 +00:00
Dmitry Vyukov
008dba6aa0
asan: always pass allocator cache to Allocate()
...
llvm-svn: 172193
2013-01-11 11:15:48 +00:00
Kostya Serebryany
fdcfbda750
[sanitizer] better statistics for the large allocator
...
llvm-svn: 172069
2013-01-10 13:38:38 +00:00
Dmitry Vyukov
22c53df947
asan/tsan: fix comment
...
llvm-svn: 172064
2013-01-10 13:06:35 +00:00
Kostya Serebryany
4a42cf69a6
[sanitizer] add statistics to the allocator; fix lint
...
llvm-svn: 171161
2012-12-27 14:09:19 +00:00
Kostya Serebryany
27ad15e165
[asan] asan_allocator2: store the user requested size in just 32 bits (larger sizes use metadata). This allows to put one more 32-bit field into the chunk header
...
llvm-svn: 171089
2012-12-26 04:52:07 +00:00
Kostya Serebryany
eff9b4b9b1
[asan] add a test for right OOB with special large sizes. Fix this test in asan_allocator2. More test tweaking for allocator2
...
llvm-svn: 171058
2012-12-25 09:40:20 +00:00
Kostya Serebryany
ad24c58e16
[sanitizer] increase the maximum size class of the fast allocator. This should save quite a bit of memory in tsan/msan (and later in asan). This also puts more stress on the large allocator. Add a couple of checks
...
llvm-svn: 171055
2012-12-25 07:50:35 +00:00
Kostya Serebryany
fc7de2910c
[sanitizer] make LargeMmapAllocator::GetBlockBegin faster by not using a linked list
...
llvm-svn: 171035
2012-12-24 14:35:14 +00:00
Kostya Serebryany
ebb23c8cfa
[sanitizer] rework the size class map in the sanitizer allocator: make the differences between size classes more uniform.
...
llvm-svn: 171031
2012-12-24 13:41:07 +00:00
Kostya Serebryany
fe80f080ee
[asan] asan_allocator2 fix two asserts that happen on full chrome: a) memalign called with 0 size and large alignment and b) malloc called after TSD has been destructed
...
llvm-svn: 170900
2012-12-21 14:54:46 +00:00
Kostya Serebryany
a1e29adab5
[sanitizer] mmap less on every size class to make the allocator more friendly to small programs
...
llvm-svn: 170895
2012-12-21 13:38:05 +00:00
Kostya Serebryany
479f05b276
[asan] asan_allocator2: improve FindHeapChunkByAddress to find memory chunks to the left of a given address. Almost all tests pass with the new allocator now, only 6 are left to fix.
...
llvm-svn: 170511
2012-12-19 08:32:50 +00:00
Kostya Serebryany
2abbce6701
[sanitizer] one more stability fix in 64-bit allocator
...
llvm-svn: 170498
2012-12-19 06:51:45 +00:00
Kostya Serebryany
12676268fa
[sanitizer] fix LargeMmapAllocator::GetBlockBegin
...
llvm-svn: 170434
2012-12-18 14:56:38 +00:00
Kostya Serebryany
c8208c5258
[sanitizer] fix a bug that has crept into the sanitizer allocator and caused SEGV on allocations between 1Mb and 2Mb, improve the test
...
llvm-svn: 170274
2012-12-15 18:36:23 +00:00
Kostya Serebryany
9806628792
[sanitizer] introduce MmapFixedOrDie and use it in SizeClassAllocator64
...
llvm-svn: 170099
2012-12-13 05:36:00 +00:00
Kostya Serebryany
2ce42e0aef
[sanitizer] change the way SizeClassAllocator64 allocated memory from the system: instead of one huge mmap(NORESERVE) it does one huge mprotect and then does small on-demand mmaps. This allows us to call OnMap callbacks which are required to poison newly allocated memory in asan
...
llvm-svn: 170097
2012-12-13 05:05:11 +00:00
Kostya Serebryany
e29883c10a
[sanitizer] add OnMap/OnUmap callbacks to the allocator interface
...
llvm-svn: 169985
2012-12-12 14:32:18 +00:00
Kostya Serebryany
378f93e804
[sanitizer] fix the build on ancient gcc which has stricter rules about what can be put on TLS. Long term, we absolutely must build the run-times with the fresh target clang
...
llvm-svn: 169593
2012-12-07 09:40:17 +00:00
Kostya Serebryany
6986550c7d
[sanitizer] POD-ify the allocator cache
...
llvm-svn: 169514
2012-12-06 16:22:04 +00:00
Kostya Serebryany
6d2d30f61d
[asan/msan] one more test for 32-bit allocator + minor code simplification
...
llvm-svn: 169507
2012-12-06 14:39:41 +00:00
Kostya Serebryany
c14ae88b08
[asan/msan] add BulkAllocate to the 32-bit allocator (and a test)
...
llvm-svn: 169506
2012-12-06 14:27:32 +00:00
Kostya Serebryany
0f67d01031
[asan/msan] refactor allocator's BulkAllocate (move to AllocatorFreeList)
...
llvm-svn: 169503
2012-12-06 13:34:11 +00:00
Kostya Serebryany
9f84eecc9e
[asan/msan] add GetBlockBegin to the 32-bit allocator (+test)
...
llvm-svn: 169499
2012-12-06 13:13:58 +00:00
Kostya Serebryany
2044135dca
[asan/msan] new 32-bit allocator, basic functionality so far
...
llvm-svn: 169496
2012-12-06 12:49:28 +00:00
Kostya Serebryany
571232b8cf
[tsan] get rid of *allocator64* files, moving everything to *allocator* files. This will help with the 32-bit allocator implementation and testing
...
llvm-svn: 169368
2012-12-05 10:09:15 +00:00
Kostya Serebryany
f299288f55
[tsan] minor interface refactoring
...
llvm-svn: 169267
2012-12-04 14:15:17 +00:00
Kostya Serebryany
5e6f833bdd
[tsan] refactor the allocator tests to allow testing other flavours of the allocator (add templates)
...
llvm-svn: 169264
2012-12-04 13:59:22 +00:00
Kostya Serebryany
077f88045e
[tsan] refactoring and comment changes in sanitizer_common/sanitizer_allocator{,64}.h. No functionality change
...
llvm-svn: 169234
2012-12-04 07:54:41 +00:00