Commit Graph

65 Commits

Author SHA1 Message Date
Alexey Samsonov 53a965e125 [Sanitizer] Don't implicitly add object files to the list of dependencies when building compiler_rt unittests. Fix sanitizer_common and asan build rules accordingly. This also fixes check-sanitizer command on Ninja.
llvm-svn: 170870
2012-12-21 08:56:14 +00:00
Alexey Samsonov aef6b78bcb [Sanitizer] Fix CMake build rules for sanitizer_common tests to respect universal static libraries on Mac
llvm-svn: 170698
2012-12-20 14:38:02 +00:00
Alexey Samsonov 01674dfc8f [Sanitizer] Modify CMake build rules for sanitizer_common unit tests: build them with fresh Clang for both 32- and 64-bits (if possible)
llvm-svn: 170691
2012-12-20 13:24:21 +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
Alexey Samsonov 6a68a9117b [Sanitizer] remove extra typename
llvm-svn: 170208
2012-12-14 15:37:35 +00:00
Kostya Serebryany 673c052631 [sanitizer] add AllocatorLeakTest
llvm-svn: 170206
2012-12-14 14:20:29 +00:00
Dmitry Vyukov 51b6e07deb tsan: fix lint warning
llvm-svn: 170202
2012-12-14 13:46:03 +00:00
Dmitry Vyukov 34aef74a4d tsan: disable allocator tests in debug build
llvm-svn: 170187
2012-12-14 10:17:22 +00:00
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