Dmitry Vyukov
ed6d54368c
tsan: comment out debug output in test
...
llvm-svn: 170186
2012-12-14 10:12:14 +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
40bac5b01f
[asan] fix lint, remove debug prints
...
llvm-svn: 169620
2012-12-07 18:07:52 +00:00
Kostya Serebryany
35f9e5e87b
[sanitizer] implement SanitizerSetThreadName/SanitizerGetThreadName. Just for linux so far (using prctl(PR_GET_NAME))
...
llvm-svn: 169598
2012-12-07 11:27:24 +00:00
Kostya Serebryany
52a3b92abd
[sanitizer] try not to use libc mem* functions in sanitizer_common tests (conflicts with our own interceptors)
...
llvm-svn: 169595
2012-12-07 10:13:10 +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
9f84eecc9e
[asan/msan] add GetBlockBegin to the 32-bit allocator (+test)
...
llvm-svn: 169499
2012-12-06 13:13:58 +00:00
Kostya Serebryany
2731cb23b1
[asan/msan] one more test for 32-bit allocator
...
llvm-svn: 169497
2012-12-06 13:00:11 +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
1e3d387459
[tsan] add MmapAlignedOrDie
...
llvm-svn: 169474
2012-12-06 06:10:31 +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
7436d95c9c
[tsan] test the allocator with CompactSizeClassMap
...
llvm-svn: 169270
2012-12-04 14:39:51 +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
485f7b4a70
[tsan] add CompactSizeClassMap as an alternative (more compact) size class map. Not used yet.
...
llvm-svn: 169128
2012-12-03 15:00:33 +00:00
Kostya Serebryany
dab61684ef
[tsan] remove unused InternalAllocBlock as part of larger refactoring
...
llvm-svn: 169123
2012-12-03 11:57:01 +00:00
Dmitry Vyukov
2429b02770
tsan: move traces from tls into dedicated storage at fixed address
...
helps to reduce tls size (it's weird to have multi-MB tls)
will help with dynamically adjustable trace size
llvm-svn: 168783
2012-11-28 10:35:31 +00:00
Kostya Serebryany
df198db1aa
[asan/tsan] get rid of kPageSize completely in favor of GetPageSizeCached(). This makes the code friendly to more platforms
...
llvm-svn: 168537
2012-11-24 05:03:11 +00:00
Dmitry Vyukov
35437032be
tsan: better error message for OOM
...
llvm-svn: 168491
2012-11-22 08:42:01 +00:00
Alexey Samsonov
f7a24c4e2b
[Sanitizer] fix printf unittest on 32-bit arch
...
llvm-svn: 167297
2012-11-02 14:28:17 +00:00
Alexey Samsonov
008274440a
[Sanitizer] move unit test for Printf from tsan to sanitizer_common
...
llvm-svn: 167296
2012-11-02 12:36:11 +00:00
Alexander Potapenko
2a1925852d
Fix the internal_memmove() implementation that used to skip src[0] if dst < src.
...
llvm-svn: 166774
2012-10-26 13:24:20 +00:00
Kostya Serebryany
0a31ed1417
[tsan] fix the tsan allocator to handle any alignment
...
llvm-svn: 164107
2012-09-18 06:00:59 +00:00
Dmitry Vyukov
4d743f5346
tsan: reserve msb in stack depot id's (required for msan)
...
llvm-svn: 164010
2012-09-17 03:14:15 +00:00
Alexey Samsonov
100150f59d
[Sanitizer] test 64-bit allocator only on suitable targets
...
llvm-svn: 163615
2012-09-11 12:19:18 +00:00
Alexey Samsonov
894069796e
[Sanitizer] Add new lit testsuite: check-sanitizer that runs unit tests for sanitizer_common runtime (shared between ASan and TSan)
...
llvm-svn: 163610
2012-09-11 10:50:32 +00:00
Alexey Samsonov
c21f901b2f
[Sanitizer] fix warnings reported by gcc. Update the list of targets to check lint for
...
llvm-svn: 163608
2012-09-11 10:31:28 +00:00
Alexey Samsonov
fcbc97a13f
[Sanitizer] remove custom Die/CheckFailed from allocator testlib
...
llvm-svn: 163604
2012-09-11 09:48:52 +00:00
Alexey Samsonov
329eae86ef
[Sanitizer] Resolve fixme: break dependency of sanitizer_common tests on TSan RTL
...
llvm-svn: 162984
2012-08-31 10:15:44 +00:00
Dmitry Vyukov
191f2f7cdb
tsan: use stack depot to describe heap blocks
...
llvm-svn: 162902
2012-08-30 13:02:30 +00:00
Dmitry Vyukov
f4792878c4
asan/tsan: first version of "stack depot"
...
llvm-svn: 162897
2012-08-30 10:02:48 +00:00
Alexey Samsonov
d1d1a814b7
[Sanitizer] align allocation sizes in low level allocator
...
llvm-svn: 162676
2012-08-27 14:51:36 +00:00
Dmitry Vyukov
7e6347402d
tsan: fix new memory allocator
...
Deallocate: drain blocks to central cache if cached too much (instead of never drain).
Allocate: batch allocate fixed amount of blocks (instead of all blocks).
This significantly reduces memory consumption of large heavy-multithreaded programs.
llvm-svn: 162447
2012-08-23 17:16:07 +00:00
Alexey Samsonov
e6704ee109
[Sanitizer] define InternalScopedBuffer to replace large arrays on stack. It is defined analogous to similar class in tsan and should replace it.
...
llvm-svn: 162262
2012-08-21 08:13:37 +00:00
Dmitry Vyukov
4b5ec3145a
tsan: add some more tests for memory allocator
...
llvm-svn: 161950
2012-08-15 14:25:33 +00:00
Kostya Serebryany
7a32f8dcb8
[tsan] fix lint
...
llvm-svn: 160504
2012-07-19 12:22:04 +00:00
Kostya Serebryany
a415df6539
[tsan] minor fixes in tsan allocator and its testlib. Now runs fine with chrome
...
llvm-svn: 160503
2012-07-19 12:15:33 +00:00
Kostya Serebryany
ab34919413
[tsan] minor enhancements in the new tsan allocator and a test malloc replacement library that can be linked to any program to replace malloc (tested on spec2006)
...
llvm-svn: 160436
2012-07-18 16:04:55 +00:00
Alexey Samsonov
4dbfad627e
[Sanitizer] add missing unit test for flag parsing (forgot to run svn add before)
...
llvm-svn: 160428
2012-07-18 06:29:18 +00:00
Alexey Samsonov
d77fbba74a
[Sanitizer] implement straightforward nlogn sorting, as qsort() may call malloc, which leads to deadlock in ASan allocator
...
llvm-svn: 160262
2012-07-16 11:27:17 +00:00
Kostya Serebryany
739b0de5b1
[tsan] start using AllocatorCache in CombinedAllocator
...
llvm-svn: 159825
2012-07-06 14:32:00 +00:00
Kostya Serebryany
d1e6094f9e
[tsan] implement SizeClassAllocatorLocalCache (part of tsan allocator)
...
llvm-svn: 159823
2012-07-06 13:46:49 +00:00
Kostya Serebryany
78e973fa6b
[tsan] use intrusive list in the new tsan allocator
...
llvm-svn: 159814
2012-07-06 09:26:01 +00:00
Kostya Serebryany
ff13537a94
[tsan] add intrusive list to be used in tsan allocator, etc
...
llvm-svn: 159812
2012-07-06 09:03:45 +00:00
Dmitry Vyukov
513f0238d8
tsan/asan: add SpinMutex to sanitizer_common
...
llvm-svn: 159439
2012-06-29 17:32:18 +00:00
Kostya Serebryany
92afdb6c31
[tsan] added CombinedAllocator for tsan
...
llvm-svn: 159432
2012-06-29 15:35:18 +00:00
Kostya Serebryany
4196046714
[tsan] added LargeMmapAllocator, a part of the new tsan allocator
...
llvm-svn: 159204
2012-06-26 14:23:32 +00:00
Dmitry Vyukov
c598de93bd
tsan: remove internal allocator, switch to sanitizer_common one.
...
llvm-svn: 159142
2012-06-25 15:09:24 +00:00
Kostya Serebryany
100590f756
[tsan] minor changes in tsan allocator
...
llvm-svn: 159139
2012-06-25 14:53:49 +00:00
Kostya Serebryany
f299f7013a
[tsan] a better CHECK for OOM in the new allocator
...
llvm-svn: 159122
2012-06-25 04:12:49 +00:00
Kostya Serebryany
278ccdacdc
[tsan] add metadata to the new tsan allocator
...
llvm-svn: 159002
2012-06-22 16:13:28 +00:00
Kostya Serebryany
5b01415dc0
[tsan] more code for a specialized tsan allocator
...
llvm-svn: 158991
2012-06-22 13:00:50 +00:00
Kostya Serebryany
6e26fa9dd1
[tsan] first step in implementing a custom allocator for tsan (and msan) which saves precious shadow
...
llvm-svn: 158913
2012-06-21 10:04:36 +00:00