Dmitry Vyukov
af4b0b084a
asan: fix compilation errors in mutex
...
llvm-svn: 172385
2013-01-14 08:01:58 +00:00
Kostya Serebryany
f55e719a13
[asan] add more frames to standalone_malloc_test
...
llvm-svn: 172383
2013-01-14 07:59:09 +00:00
Dmitry Vyukov
3d462f89de
asan: add missing file
...
llvm-svn: 172381
2013-01-14 07:52:01 +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
86585ad319
asan: add memory prefetch to quarantine recycle
...
llvm-svn: 172216
2013-01-11 16:40:24 +00:00
Dmitry Vyukov
7c6c943782
asan: add memory prefetch to quarantine recycle
...
llvm-svn: 172215
2013-01-11 16:40:01 +00:00
Dmitry Vyukov
f3a7087194
asan: improve allocator benchmark
...
llvm-svn: 172213
2013-01-11 16:22:53 +00:00
Dmitry Vyukov
83c4a77265
asan: improve the benchmark
...
llvm-svn: 172209
2013-01-11 15:57:19 +00:00
Dmitry Vyukov
af96edbad2
asan: fix format string in CHECK
...
llvm-svn: 172203
2013-01-11 15:07:49 +00:00
Dmitry Vyukov
edac64ad3f
asan: prevent inlining of cold function
...
llvm-svn: 172197
2013-01-11 11:39:59 +00:00
Dmitry Vyukov
008dba6aa0
asan: always pass allocator cache to Allocate()
...
llvm-svn: 172193
2013-01-11 11:15:48 +00:00
Dmitry Vyukov
b1c0dbe2c6
asan: faster quarantine
...
llvm-svn: 172192
2013-01-11 11:03:35 +00:00
Dmitry Vyukov
c14bb685a1
asan/tsan: fix bug in list implementation
...
llvm-svn: 172187
2013-01-11 10:15:13 +00:00
Dmitry Vyukov
db0cf871d4
asan: Refactor asan memory quarantine.
...
llvm-svn: 172183
2013-01-11 08:07:43 +00:00
Dmitry Vyukov
5cb6c62641
tsan: symbolize global variables
...
llvm-svn: 172181
2013-01-11 07:23:51 +00:00
Kostya Serebryany
fdcfbda750
[sanitizer] better statistics for the large allocator
...
llvm-svn: 172069
2013-01-10 13:38:38 +00:00
Kostya Serebryany
e1be48fe64
[sanitizer] fix the non-cmake build (2-nd attempt)
...
llvm-svn: 172068
2013-01-10 13:33:15 +00:00
Dmitry Vyukov
22c53df947
asan/tsan: fix comment
...
llvm-svn: 172064
2013-01-10 13:06:35 +00:00
Kostya Serebryany
1199dc0327
[sanitizer] fix the non-cmake build
...
llvm-svn: 172063
2013-01-10 13:05:16 +00:00
Kostya Serebryany
4f6e4ae44a
[sanitizer] add standalone_malloc_test
...
llvm-svn: 172061
2013-01-10 12:34:12 +00:00
Kostya Serebryany
864ef315c0
[asan] make the slow unwinder a bit more robust. The unittests pass with fast_unwind_on_fatal=0, but I still observe some differences between the two unwinders
...
llvm-svn: 171973
2013-01-09 13:55:00 +00:00
Timur Iskhodzhanov
1d1f74cbf5
[ASan/Win] Satisfy lint
...
llvm-svn: 171970
2013-01-09 12:43:16 +00:00
Timur Iskhodzhanov
73e484aa8a
[ASan/Win] Unbreak the 32-bit RTL build
...
llvm-svn: 171968
2013-01-09 12:03:27 +00:00
Kostya Serebryany
cb510e50e2
[asan] implement more strict checking for memset/etc parameters. Instead of checking the first and the last byte, we check the entire shadow region. This costs ~10 slowdown for the instrumented functions. Motivated by a nasty memset-buffer-overflow-by-140-bytes in chrome which was reported as a use-after-free or not at all
...
llvm-svn: 171198
2012-12-28 15:24:16 +00:00
Alexey Samsonov
8474843e3b
[TSan] Blacklist test: Rename blacklisted function. Make this test work for custom TSan testing script.
...
llvm-svn: 171186
2012-12-28 10:06:26 +00:00
Kostya Serebryany
4a42cf69a6
[sanitizer] add statistics to the allocator; fix lint
...
llvm-svn: 171161
2012-12-27 14:09:19 +00:00
Alexey Samsonov
c20f5d2246
Define COMPILER_RT_CAN_EXECUTE_TESTS variable on platforms where we can produce working binaries and use it in build rules for sanitizers tests
...
llvm-svn: 171160
2012-12-27 13:19:23 +00:00
Kostya Serebryany
6f604b5007
[asan/tsan] when unmapping a chunk of user memory, apply madvise(MADV_DONTNEED) to the corresponding chunk of shadow memory. Also update sanitizer_allocator64_testlib.cc
...
llvm-svn: 171144
2012-12-27 07:37:24 +00:00
Alexey Samsonov
c914281341
[Sanitizer] attempt to fix InterlockedCompareExchangePointer intrinsic on MSVC
...
llvm-svn: 171104
2012-12-26 09:25:09 +00:00
Kostya Serebryany
a11cd57a78
[asan] asan_allocator2: by default use the StackDepot to store the stack traces instead of storing them in the redzones
...
llvm-svn: 171099
2012-12-26 06:30:02 +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
Dmitry Vyukov
116518af74
tsan: fix tests to consistently use internal functions (otherwise it leads to false positives)
...
llvm-svn: 171057
2012-12-25 09:20:58 +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
db3250b8b3
[sanitizer] fix gcc warnings, enable one tests under asan_allocator2
...
llvm-svn: 171036
2012-12-24 14:53:13 +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
Alexey Samsonov
e30a84f08f
[Sanitizer] CMake build rules for unittests: depend on headers when compiling a file with custom clang.
...
llvm-svn: 170897
2012-12-21 14:04:52 +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
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
Richard Smith
64e25ce53d
Move C++ name demangling support from ubsan into sanitizer_common.
...
llvm-svn: 170666
2012-12-20 05:00:13 +00:00
Alexey Samsonov
35ed02ebf1
[Sanitizer] add missing header on Windows
...
llvm-svn: 170514
2012-12-19 08:51:39 +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
Alexey Samsonov
b6219c060b
[Sanitizer] implement internal_isatty on Windows
...
llvm-svn: 170507
2012-12-19 07:57:42 +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
Alexey Samsonov
f37c45c20d
[Sanitizer] Expose StackTrace::GetPreviousInstructionPc() to get PC of call instruction from return address
...
llvm-svn: 170424
2012-12-18 09:57:34 +00:00
Kostya Serebryany
bad01549b6
[asan] add some colors to asan output if printing to tty (following ubsan)
...
llvm-svn: 170418
2012-12-18 07:32:16 +00:00
Richard Smith
54fc2370f9
Don't escape %s in printf usage message; it's not written by printf.
...
llvm-svn: 170413
2012-12-18 05:49:49 +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
Evgeniy Stepanov
fb37510e96
Add MemorySanitizer.cpp to the lint script.
...
llvm-svn: 170204
2012-12-14 13:48:55 +00:00
Dmitry Vyukov
51b6e07deb
tsan: fix lint warning
...
llvm-svn: 170202
2012-12-14 13:46:03 +00:00
Dmitry Vyukov
5b375d84c0
tsan: fix build
...
llvm-svn: 170191
2012-12-14 12:24:11 +00:00
Kostya Serebryany
7dfb168eb8
[asan] more asan_allocator2 code: actually un/poison shadow on malloc/free
...
llvm-svn: 170190
2012-12-14 12:15:09 +00:00
Alexey Samsonov
cd1e68ebb1
[Sanitizer] use INTERCEPT_FUNCTION(foo) instead of CHECK(INTERCEPT_FUNCTION(foo)) - this check may fail on Linux if user program defines its own version of library function foo
...
llvm-svn: 170189
2012-12-14 11:52:02 +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
bb69879d09
[asan] pop the internal stack frames in SlowUnwindStack, extend the test to check this
...
llvm-svn: 170124
2012-12-13 12:31:55 +00:00
Alexey Samsonov
506b97d61e
[Sanitizer] disable lint check for line length in ASan output tests
...
llvm-svn: 170123
2012-12-13 12:09:47 +00:00
Kostya Serebryany
baf583c443
[asan] add two asan flags: fast_unwind_on_fatal and fast_unwind_on_malloc to allow using the slow CFI-based unwinder
...
llvm-svn: 170117
2012-12-13 09:34:23 +00:00
Alexey Samsonov
5a26e1fbf2
[Sanitizer] Add new header - sanitizer_platform_interceptors.h, which should define whether or not given function should be intercepted on a given platform.
...
llvm-svn: 170115
2012-12-13 08:50:16 +00:00
Alexey Samsonov
447e2f2f19
[ASan] one more macro for 'read' interception
...
llvm-svn: 170114
2012-12-13 08:36:13 +00:00
Alexey Samsonov
65c14f5314
[ASan] more macro for conditional interception of pread functions
...
llvm-svn: 170112
2012-12-13 08:10:23 +00:00
Kostya Serebryany
07bb3925b0
[sanitizer] replace size_t with SIZE_T in interceptors (same for ssize_t, off_t and off64_t). This is done to avoid confusion and to make the code work with compilers that define size_t w/o any includes (MSVC)
...
llvm-svn: 170103
2012-12-13 06:31:40 +00:00
Kostya Serebryany
a167087571
[asan] fix windows build
...
llvm-svn: 170101
2012-12-13 05:51:02 +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
eec22a628b
[asan] fix the Android build (pread64 interceptor again)
...
llvm-svn: 170098
2012-12-13 05:27:08 +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
Alexander Potapenko
ada2fbd2d4
[ASan] fix compilation on Mac.
...
llvm-svn: 169969
2012-12-12 11:52:26 +00:00
Kostya Serebryany
28a32c89e9
[asan] fix android build and lint
...
llvm-svn: 169968
2012-12-12 11:37:23 +00:00
Kostya Serebryany
9a58d399c7
[asan] add sanitizer_common/sanitizer_common_interceptors.h with pread/pread64/read interceptors. Use it in asan. Add asan tests for pread/etc. Add FIXME to tsan/msan interceptors
...
llvm-svn: 169966
2012-12-12 09:54:35 +00:00
Kostya Serebryany
90a59fafc0
[asan] more code for asan_allocator2: basic Allocate/Deallocate code
...
llvm-svn: 169864
2012-12-11 14:41:31 +00:00
Evgeniy Stepanov
83f05bf960
Add MemorySanitizer runtime to check_lint.sh.
...
llvm-svn: 169861
2012-12-11 12:52:38 +00:00
Kostya Serebryany
5e2a7acdbe
[asan] more sceleton code for asan_allocator2
...
llvm-svn: 169836
2012-12-11 09:02:36 +00:00
Alexander Potapenko
1746f555ee
Add a libsanitizer API __sanitizer_sandbox_on_notify(void* reserved), which should be used by
...
the client programs to notify the tools that sandboxing is about to be turned on.
llvm-svn: 169732
2012-12-10 13:10:40 +00:00
Kostya Serebryany
40bac5b01f
[asan] fix lint, remove debug prints
...
llvm-svn: 169620
2012-12-07 18:07:52 +00:00
Dmitry Vyukov
3a2046b3a6
tsan: fix lint warnings
...
llvm-svn: 169606
2012-12-07 16:20:06 +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
Evgeniy Stepanov
5d2d761ad6
Switch to r83 of cpplint.
...
Ubuntu Precise compatibility.
llvm-svn: 169597
2012-12-07 11:00:14 +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
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
Dmitry Vyukov
e3e0557f19
tsan: fix lint warning and make output tests more robust
...
llvm-svn: 169511
2012-12-06 15:42:54 +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
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
Bill Wendling
f9528843d2
Remove unused variable.
...
llvm-svn: 169485
2012-12-06 07:43:17 +00:00
Kostya Serebryany
1e3d387459
[tsan] add MmapAlignedOrDie
...
llvm-svn: 169474
2012-12-06 06:10:31 +00:00
Dmitry Vyukov
dd95cd148b
tsan: fix lint warnings
...
llvm-svn: 169369
2012-12-05 10:16:02 +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
0afbb325b6
[tsan] make the 64-bit allocator build (but not work) in 32-bit mode to simplify the code and test structure and allow further refactoring
...
llvm-svn: 169361
2012-12-05 07:11:47 +00:00
Alexander Potapenko
0a4e0f6d35
Fix a use-after-unmap bug in /proc/self/maps caching. The cached buffer was occasionally deleted in the MemoryMappingLayout destructor.
...
llvm-svn: 169335
2012-12-04 23:30:00 +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
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
Alexander Potapenko
e2b6d08459
Use a struct to hold the /proc/self/maps buffer on Linux.
...
llvm-svn: 169155
2012-12-03 21:21:22 +00:00
Kostya Serebryany
214b715061
[asan] two more bits for __sparc__
...
llvm-svn: 169141
2012-12-03 18:39:21 +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
e982a1d368
tsan: describe global vars (module+offset for now)
...
llvm-svn: 169122
2012-12-03 11:45:34 +00:00
Alexander Potapenko
7811425843
Add caching to the MemoryMappingLayout class on Linux. This is necessary for the cases when a sandbox prevents ASan from reading the mappings
...
from /proc/self/maps.
The mappings are currently being cached on each access to /proc/self/maps. In the future we'll need to add an API that allows the client to notify ASan about the sandbox.
llvm-svn: 169076
2012-12-01 02:39:45 +00:00
Dmitry Vyukov
ad9c530f7c
tsan: add sanity checks into memory allocator
...
llvm-svn: 169015
2012-11-30 17:26:50 +00:00
Dmitry Vyukov
e1a7f338a3
tsan: dynamic history size
...
introduces history_size parameter that can be used to control trace size at startup
llvm-svn: 168786
2012-11-28 12:19:50 +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
Kostya Serebryany
f22c697f58
[asan] get rid of some of the uses of kPageSize. The intent is to get rid of it completely to support platforms with multiple possible page sizes.
...
llvm-svn: 168517
2012-11-23 15:38:49 +00:00
Dmitry Vyukov
35437032be
tsan: better error message for OOM
...
llvm-svn: 168491
2012-11-22 08:42:01 +00:00
Kostya Serebryany
8bc5421ba0
[asan] get rid of kPageSizeBits
...
llvm-svn: 168426
2012-11-21 13:31:07 +00:00
Evgeniy Stepanov
979a1e7352
Allow PopStackFrames leave the stack empty.
...
llvm-svn: 168425
2012-11-21 13:00:04 +00:00
Kostya Serebryany
734f1eb5f4
[asan/tsan] do not use __WORDSIZE macro, as it is glibc-private thing. Instead, define our own SANITIZER_WORDSIZE
...
llvm-svn: 168424
2012-11-21 12:38:58 +00:00
Alexey Samsonov
3a3488e4e1
[Sanitizer] replace while with internal_memset to make sure compiler won't replace it with library memset
...
llvm-svn: 168422
2012-11-21 11:12:57 +00:00
Kostya Serebryany
87e0464bfb
[asan] better support for powerpc and sparc targets (thanks to H.J. Liu and David Miller)
...
llvm-svn: 168358
2012-11-20 08:57:26 +00:00
Kostya Serebryany
46de580003
[asan] more support for powerpc, patch by Peter Bergner
...
llvm-svn: 168356
2012-11-20 07:00:42 +00:00
Kostya Serebryany
386e2d853b
[asan] support x32 mode in the fast stack unwinder. Patch by H.J. Lu
...
llvm-svn: 168306
2012-11-19 10:31:00 +00:00
Kostya Serebryany
cb9f62189b
[asan] support PowerPC and SPARC in sanitizer_linux.cc
...
llvm-svn: 168301
2012-11-19 07:53:36 +00:00
Richard Smith
05dce7e644
-fsanitize=undefined: Switch to using sanitizer_common for output. This gets us much closer to not depending on any system headers.
...
llvm-svn: 167888
2012-11-13 23:42:05 +00:00
Kostya Serebryany
1f8922cf71
[asan] use #if defined __x86_64__ instead of #if __WORDSIZE == 64 in sanitizer_linux.cc
...
llvm-svn: 167883
2012-11-13 23:13:17 +00:00
Alexey Samsonov
ae9b18b607
[Sanitizer] add sanity checks for communication with external symbolizer
...
llvm-svn: 167617
2012-11-09 14:45:30 +00:00
Alexey Samsonov
c463f3077e
[Sanitizer] try to fix Windows bot - include stdlib.h for abort/_exit functions
...
llvm-svn: 167577
2012-11-08 13:08:41 +00:00
Dmitry Vyukov
da78be74f3
tsan: slightly relax requirements for lazy shadow memory (can overlap and may not be properly aligned)
...
it's problematic on windows where allocation granularity is much larger than page size
llvm-svn: 167466
2012-11-06 16:48:46 +00:00
Dmitry Vyukov
e86c632015
tsan: fix debug output
...
llvm-svn: 167463
2012-11-06 15:54:34 +00:00
Dmitry Vyukov
a0be3e2c68
tsan: better diagnostics for failed mmap()
...
llvm-svn: 167462
2012-11-06 15:39:16 +00:00
Dmitry Vyukov
0ff6d2dd6c
tsan: windows: less includes, better diagnostics for failed VirtualAlloc(), implement sched_yield()
...
llvm-svn: 167452
2012-11-06 13:19:59 +00:00
Dmitry Vyukov
2817639411
tsan: define missing compier macros for windows
...
llvm-svn: 167450
2012-11-06 12:54:16 +00:00
Dmitry Vyukov
e9bafdf5b8
tsan: fix non-msvc windows build
...
llvm-svn: 167449
2012-11-06 12:50:13 +00:00
Dmitry Vyukov
04dd4b7349
tasn: improve sanitizer_internal_defs.h
...
The file uses namespaces and extern "LANG", so it's kinda senseless to use #ifdef __cplusplus
llvm-svn: 167448
2012-11-06 12:49:22 +00:00
Dmitry Vyukov
e6b5a696e3
tsan: fix windows build
...
__declspec is not _WIN32, it's _MSC_VER
llvm-svn: 167447
2012-11-06 12:47:42 +00:00
Alexey Samsonov
58358897a3
[Sanitizer] Add internal_isatty to sanitizer_libc and PrintsToTty to determine whether error reports are printed to terminal
...
llvm-svn: 167298
2012-11-02 15:18:34 +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
Alexey Samsonov
ad9d65feb8
[TSan] finally remove TsanPrintf in favor of Printf from sanitizer_common
...
llvm-svn: 167294
2012-11-02 12:17:51 +00:00
Alexey Samsonov
20ba98fdb1
[Sanitizer] Use kStderrFd constant instead of hardcoded 2
...
llvm-svn: 167291
2012-11-02 09:38:47 +00:00
Alexey Samsonov
fd67c83e7e
[Sanitizer]: add __sanitizer_set_report_fd function to alter file descriptor for error reports
...
llvm-svn: 167290
2012-11-02 09:23:36 +00:00
Alexander Potapenko
dda4f0b593
Fix a compiler warning in internal_memmove.
...
llvm-svn: 166775
2012-10-26 13:47:36 +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
Alexey Samsonov
b9fdf27357
[Sanitizer] fall back to online symbolizer if user-provided callback failed
...
llvm-svn: 166177
2012-10-18 11:46:22 +00:00
Alexey Samsonov
68791d162a
[Sanitizer] symbolizer: increase the maximal number of shared libraries to 16K
...
llvm-svn: 166098
2012-10-17 13:12:23 +00:00
Kostya Serebryany
278bd2e3a3
[asan] fix lint
...
llvm-svn: 166006
2012-10-16 04:50:32 +00:00
Alexander Potapenko
7b03290c43
Implement internal_memmove.
...
Use internal_memmove() and internal_memcpy() in the memcpy() and memmove() wrappers
when building the dynamic runtime (OS X only), to work around a bug in resolver functions wrapping.
See also http://code.google.com/p/address-sanitizer/issues/detail?id=116
llvm-svn: 165939
2012-10-15 15:34:41 +00:00
Alexey Samsonov
83ecabe6e6
[Sanitizer] Remove unneeded returns after UNIMPLEMENTED macro
...
llvm-svn: 165493
2012-10-09 08:51:08 +00:00
Alexey Samsonov
3a0a88fe0a
[Sanitizer] Add UNREACHABLE(msg) macro
...
llvm-svn: 165492
2012-10-09 08:42:07 +00:00
Kostya Serebryany
cb13fff13d
[asan] properly report mmap failure
...
llvm-svn: 165214
2012-10-04 07:21:09 +00:00
Alexander Potapenko
77c0ac2336
Do not patch the instruction address when symbolizing the reports.
...
Instead, print the correct address at runtime.
llvm-svn: 165018
2012-10-02 15:42:24 +00:00
Alexey Samsonov
30c01f25f1
[Sanitizer] fix line width
...
llvm-svn: 165009
2012-10-02 14:09:20 +00:00
Evgeniy Stepanov
49e8576a09
[*San]: handle EINTR.
...
llvm-svn: 165006
2012-10-02 13:41:40 +00:00
Dmitry Vyukov
56faa551b9
tsan: fix mac build
...
llvm-svn: 165004
2012-10-02 12:58:14 +00:00
Alexey Samsonov
e29c6731aa
[Sanitizer/ASan] Simplify the code that prints and symbolizes stack traces. Fall back to module+offset if user-provided symbolizer failed. Use weak function __asan_symbolize instead of __asan_set_symbolize_callback in ASan interface, so that we're able to symbolize reports for errors that happen before the main() is called, for example, during module initialization.
...
llvm-svn: 165000
2012-10-02 12:11:17 +00:00
Dmitry Vyukov
27d5b37c38
tsan: output tid's in reports
...
llvm-svn: 164998
2012-10-02 11:52:05 +00:00
Evgeniy Stepanov
cb9cf0f907
Add a missing const qualifier.
...
llvm-svn: 164773
2012-09-27 13:21:08 +00:00
Alexey Samsonov
a555b3faf4
[ASan] Apply some ASan-relevant pieces of patch by Ruben Van Boxem. In the same time, remove ASan from CMake build on Windows after conversation with Timur. We don't want to support building ASan on Windows until it is in a working state.
...
llvm-svn: 164486
2012-09-24 11:43:40 +00:00
Alexey Samsonov
5a42ac5b0e
[Sanitizer] update lint checker script
...
llvm-svn: 164111
2012-09-18 07:26:51 +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
Alexey Samsonov
97ca306641
[Sanitizer] Hoist functions to get/set stack size and re-exec from memory-sanitizer branch to sanitizer_common
...
llvm-svn: 164020
2012-09-17 09:12:39 +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
Kostya Serebryany
5b0a8f3f53
[asan] fix the va_arg usage
...
llvm-svn: 163879
2012-09-14 06:52:46 +00:00
Kostya Serebryany
45d849c4bd
[asan] add asan option log_path=PATH to let users redirect asan reports to a file PATH.PID instead of stderr
...
llvm-svn: 163872
2012-09-14 04:35:14 +00:00
Alexey Samsonov
3d53c4ecf6
[Sanitizer] Please Android build. Re-check the availability of -Wno-variadic-macros flag.
...
llvm-svn: 163688
2012-09-12 08:06:15 +00:00
Alexey Samsonov
694633e19b
[Sanitizer] first effort to start building ASan runtime with -Werror in CMake build
...
llvm-svn: 163686
2012-09-12 07:38:47 +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
Evgeniy Stepanov
1a8f8fa6c0
CMake build rules for ASan Android runtime and tests.
...
llvm-svn: 163613
2012-09-11 11:55:45 +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
5c6b93bc33
[Sanitizer] Get rid of dependency between sanitizer_common and asan/tsan runtimes: implement tool-specific Die and CheckFailed functions via callbacks
...
llvm-svn: 163603
2012-09-11 09:44:48 +00:00
Evgeniy Stepanov
6f66ed1329
[asan] There is no __libc_malloc on Android.
...
llvm-svn: 163498
2012-09-10 10:18:49 +00:00
Kostya Serebryany
f9caa28ccf
[asan] increase max stack size to 256 (+test)
...
llvm-svn: 163308
2012-09-06 10:57:03 +00:00
Alexey Samsonov
3ebf2fa654
[Sanitizer] remove unused field
...
llvm-svn: 163296
2012-09-06 08:47:38 +00:00
Alexey Samsonov
f6d2125829
[Sanitizer] implement readlink as syscall on Linux
...
llvm-svn: 163213
2012-09-05 14:48:24 +00:00
Kostya Serebryany
4d45b9b784
[asan] added tests for asan-initialization-order, patch by Reid Watson
...
llvm-svn: 163207
2012-09-05 09:07:02 +00:00
Alexey Samsonov
d83ccd067d
[ASan] hoist more compile flags to SANITIZER_COMMON_CFLAGS var and add the rest of flags/defs from old Makefile to CMake
...
llvm-svn: 163204
2012-09-05 09:00:03 +00:00
Alexey Samsonov
ceffb021c5
[Sanitizer] Remove implicit conversion of InternalScopedBuffer<T> to T*
...
llvm-svn: 163197
2012-09-05 07:23:44 +00:00
Alexey Samsonov
6f696f4d17
[Sanitizer] Support for reading inlined frames from llvm-symbolizer
...
llvm-svn: 163140
2012-09-04 15:34:43 +00:00
Dmitry Vyukov
179e5ddae1
tsan: fix windows build (2)
...
llvm-svn: 162997
2012-08-31 14:11:33 +00:00
Dmitry Vyukov
fa90fa357e
tsan: fix windows build (1)
...
llvm-svn: 162996
2012-08-31 14:01:33 +00:00
Dmitry Vyukov
ef8d1944b8
tsan: improve stack depot
...
llvm-svn: 162993
2012-08-31 12:47:44 +00:00
Kostya Serebryany
d19c8cb2cc
[tsan] locate the auxilary space for tsan's Allocator64 after the main region, not before. This simplifies the shadow mappings
...
llvm-svn: 162991
2012-08-31 12:41:00 +00:00
Alexey Samsonov
3222dad6e3
[Sanitizer] fix overloaded operator error
...
llvm-svn: 162990
2012-08-31 11:43:01 +00:00
Alexey Samsonov
704f71616d
[compiler-rt] Move draft code for llvm-symbolizer to compiler-rt/utils/llvm-symbolizer after chandlerc's suggestion
...
llvm-svn: 162988
2012-08-31 11:12:10 +00:00
Alexey Samsonov
e70ed73d1f
[Sanitizer] Remove some calls to libc malloc from symbolizer
...
llvm-svn: 162987
2012-08-31 11:07: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
Alexey Samsonov
79b36285ca
[Sanitizer] Make lint checking a standalone script in sanitizer_common
...
llvm-svn: 162982
2012-08-31 08:36:36 +00:00
Dmitry Vyukov
b244c46c66
tsan: speed up allocator64 GetBlockBegin()
...
llvm-svn: 162908
2012-08-30 13:55:43 +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
Kostya Serebryany
d0d96bfb86
[asan/tsan] use InternalScopedBuffer instead of stack arrays. Use mmap inseted of InternalAlloc in InternalScopedBuffer
...
llvm-svn: 162834
2012-08-29 08:40:36 +00:00
Chandler Carruth
1aa4fef601
Relocate the external headers provided by ASan and the common sanitizer
...
library.
These headers are intended to be available to user code when built with
AddressSanitizer (or one of the other sanitizer's in the future) to
interface with the runtime library. As such, they form stable external
C interfaces, and the headers shouldn't be located within the
implementation.
I've pulled them out into what seem like fairly obvious locations and
names, but I'm wide open to further bikeshedding of these names and
locations.
I've updated the code and the build system to cope with the new
locations, both CMake and Makefile. Please let me know if this breaks
anyone's build.
The eventual goal is to install these headers along side the Clang
builtin headers when we build the ASan runtime and install it. My
current thinking is to locate them at:
<prefix>/lib/clang/X.Y/include/sanitizer/common_interface_defs.h
<prefix>/lib/clang/X.Y/include/sanitizer/asan_interface.h
<prefix>/lib/clang/X.Y/include/sanitizer/...
But maybe others have different suggestions?
Fixing the style of the #include between these headers at least unblocks
experimentation with installing them as they now should work when
installed in these locations.
llvm-svn: 162822
2012-08-29 02:27:54 +00:00
Chandler Carruth
c1c9d5818f
Some flag cleanup for the sanitizer runtimes.
...
This hoists most of the CFLAGS into a common variable. It also adds
detection for -Wno-c99-extensions and uses it to silence a pile of
warnings.
Finally, it switches to the proper flag -rdynamic.
With this, the cmake build is warning free on my bootstrap Linux build.
llvm-svn: 162809
2012-08-29 00:13:11 +00:00
Kostya Serebryany
66a37f3aef
[asan] one more fix for windows build
...
llvm-svn: 162762
2012-08-28 15:25:07 +00:00
Kostya Serebryany
3a6af66a0e
[asan] fix the cmake build (hopefully)
...
llvm-svn: 162760
2012-08-28 14:48:28 +00:00
Kostya Serebryany
327d0a5666
[asan] actually doing 'svn add' helps
...
llvm-svn: 162759
2012-08-28 14:27:06 +00:00
Kostya Serebryany
7575968aa4
[asan] actually move StackTrace to sanitizer_common
...
llvm-svn: 162757
2012-08-28 14:11:57 +00:00
Kostya Serebryany
ccc470c499
[asan] some renaming before we move StackTrace into sanitizer_common (part 2)
...
llvm-svn: 162748
2012-08-28 11:54:51 +00:00
Kostya Serebryany
bb6f165952
[asan] get rid of AsanPrintf in favor of Printf from sanitizer_common
...
llvm-svn: 162746
2012-08-28 11:34:40 +00:00
Alexey Samsonov
384de7c9c9
[Sanitizer] Allow to create stub MemoryMappingLayout on Windows
...
llvm-svn: 162742
2012-08-28 08:27:08 +00:00
Alexey Samsonov
cae486c063
[Sanitizer] One more method stub for Windows
...
llvm-svn: 162739
2012-08-28 07:22:24 +00:00
Alexey Samsonov
d1d1a814b7
[Sanitizer] align allocation sizes in low level allocator
...
llvm-svn: 162676
2012-08-27 14:51:36 +00:00
Evgeniy Stepanov
f72f08affc
CMake build rules for ASan/Android runtime.
...
llvm-svn: 162675
2012-08-27 14:28:27 +00:00
Alexey Samsonov
28d8be2d86
[Sanitizer] One more try to fix Windows build
...
llvm-svn: 162674
2012-08-27 14:08:53 +00:00
Alexey Samsonov
e67a5dd8e1
[Sanitizer] Use low-level allocator in flag parsing to avoid calling malloc() before ASan/TSan initialization is done
...
llvm-svn: 162673
2012-08-27 14:04:54 +00:00
Alexey Samsonov
cc62211fbf
[Sanitizer] Rename ProcessMaps to MemoryMappingLayout and fix Windows build by providing stub implementation
...
llvm-svn: 162671
2012-08-27 13:48:48 +00:00
Evgeniy Stepanov
be01398612
A few tweaks for building ASanRT against Android NDK.
...
llvm-svn: 162666
2012-08-27 11:15:55 +00:00
Alexey Samsonov
dc8d1f1039
[Sanitizer] move low-level (mmap-based) allocator to sanitizer_common
...
llvm-svn: 162663
2012-08-27 09:30:58 +00:00
Dmitry Vyukov
7d3d94454c
tsan: improve memory allocator a bit
...
llvm-svn: 162561
2012-08-24 15:53:14 +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
563fb4113c
[Sanitizer] Add external symbolizer binary. Next steps - include it in CMake build (produce 32-bit and 64-bit version of it, make sure we can compile LLVM sources with our own flags) and add tests for it.
...
llvm-svn: 162442
2012-08-23 12:39:35 +00:00
Alexey Samsonov
419f610a74
[Sanitizer] Switch the symbolization strategy that would be used by sanitizer tools family: as compiling in-process symbolizer into runtime involves certain difficulties, we may instead launch an external symbolizer program (fork + execl) in a subprocess and communicate with it via pipe.
...
llvm-svn: 162437
2012-08-23 07:32:06 +00:00
Alexey Samsonov
75e5fc3e57
[TSan] switch tsan to using InternalScopedBuffer from sanitizer_common
...
llvm-svn: 162351
2012-08-22 07:25:52 +00:00
Alexey Samsonov
b92488a549
[Sanitizer] implement internal_strcspn
...
llvm-svn: 162272
2012-08-21 09:26:26 +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
1c0b3c6b84
tsan: store sync objects in memory block headers + delete them when the block is freed
...
llvm-svn: 161959
2012-08-15 17:27:20 +00:00
Dmitry Vyukov
4b5ec3145a
tsan: add some more tests for memory allocator
...
llvm-svn: 161950
2012-08-15 14:25:33 +00:00
Dmitry Vyukov
c693689bb1
tsan: fix several integer overflows
...
llvm-svn: 161949
2012-08-15 14:25:08 +00:00
Kostya Serebryany
ad855e9438
[asan] better diagnostics for mmap failure
...
llvm-svn: 161874
2012-08-14 15:18:40 +00:00
Alexey Samsonov
ef7758f561
[Sanitizer] move OS-dependent pieces of symbolizer to separate source files
...
llvm-svn: 161862
2012-08-14 13:00:32 +00:00
Alexey Samsonov
d33973edb4
[Sanitizer] Return cmake support for setting compile definitions for sanitizer_common library
...
llvm-svn: 161747
2012-08-13 07:41:43 +00:00
Alexey Samsonov
fb844c7eff
[ASan] CMake support for building ASan runtime as a universal binary on Mac
...
llvm-svn: 161665
2012-08-10 14:45:52 +00:00
Alexey Samsonov
4750230ac6
[Sanitizer] cleanup CMake files for interception and sanitizer_common helper libraries
...
llvm-svn: 161485
2012-08-08 09:46:51 +00:00
Alexey Samsonov
ce8d497aaf
[Sanitizer] Fix warnings to please cmake build
...
llvm-svn: 161166
2012-08-02 10:09:31 +00:00
Alexey Samsonov
500e99639d
[Sanitizer] Wrapper around llvm::DIContext from LLVM DebugInfo library. If a macro SANITIZER_USES_LLVM_LIBS is defined (by default it is not), then sanitizer runtime includes llvm headers and tries to use LLVM libs for in-process symbolization. To make it functional, we have to link with these LLVM libs - either pass them to linker from Clang driver, or link them into static ASan runtime when we build it.
...
llvm-svn: 161045
2012-07-31 11:51:26 +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
Alexey Samsonov
7acdc1738f
[Sanitizer] When obtaining the data for loaded modules, add address ranges of loadable segments only. Looks like address range of PT_TLS segment may intersect with loadable segments of other modules.
...
llvm-svn: 160498
2012-07-19 07:51:20 +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
Alexey Samsonov
2d4bd13eb6
[Sanitizer] fix CMake build
...
llvm-svn: 159988
2012-07-10 09:17:06 +00:00
Alexey Samsonov
2c94cd6e3d
[Sanitizer] move flag parsing routines (and unit tests) from tsan runtime to common runtime.
...
llvm-svn: 159928
2012-07-09 13:21:39 +00:00
Alexander Potapenko
b4e9fd297c
Suppress a lint warning.
...
llvm-svn: 159915
2012-07-08 15:00:06 +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
03d32ecd4f
tsan: Go language support
...
llvm-svn: 159754
2012-07-05 16:18:28 +00:00
Alexey Samsonov
38b1ec4317
[ASan] Add a default constructor for DWARFSection to initialize it with zeros.
...
llvm-svn: 159748
2012-07-05 14:28:37 +00:00
Dmitry Vyukov
5dc3f01676
tsan/asan: kill STL
...
First, placement new from standard library conflicts with our own.
Second, we are in trouble if user uses the same function (we either get instrumented code in runtime, or non-instrumented code in user program).
llvm-svn: 159738
2012-07-05 09:23:37 +00:00
Alexey Samsonov
716aa7e2f2
[ASan] fixup for r159652
...
llvm-svn: 159655
2012-07-03 09:06:39 +00:00
Alexey Samsonov
961276af26
[Sanitizer] Extend a symbolizer code. Implemented for Linux only. Use dl_iterate_phdr to get virtual addresses of mapped module sections. To symbolize an address from a module, map this module to memory and obtain pointers to debug info sections. Later these pointers can be passed to constructor of DWARF context-in-memory from LLVM DebugInfo lib.
...
llvm-svn: 159652
2012-07-03 08:24:14 +00:00
Dmitry Vyukov
b13099c26e
asan/tsan: improve SpinMutex
...
llvm-svn: 159518
2012-07-02 07:09:21 +00:00
Dmitry Vyukov
b462dfcaeb
tsan/asan: add mutex to 64-bit allocator
...
llvm-svn: 159516
2012-07-02 06:54:24 +00:00