Nick Kledzik
35293305b7
<rdar://problem/11668446> Add .subsections_via_symbols to Darwin assembly files
...
llvm-svn: 160062
2012-07-11 19:21:39 +00:00
Alexey Samsonov
2d4bd13eb6
[Sanitizer] fix CMake build
...
llvm-svn: 159988
2012-07-10 09:17:06 +00:00
Alexey Samsonov
9f666ea6ca
[ASan] move flags description to separate header, add comments about them.
...
llvm-svn: 159985
2012-07-10 07:41:27 +00:00
Alexey Samsonov
2467ca5010
[ASan] cleanup: remove dead flag
...
llvm-svn: 159934
2012-07-09 15:11:28 +00:00
Alexey Samsonov
34efb8e9b9
[ASan] Use common flags parsing machinery.
...
llvm-svn: 159933
2012-07-09 14:36:04 +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
Dmitry Vyukov
239ae7186b
tsan: Go language support fixes
...
llvm-svn: 159856
2012-07-06 20:23:59 +00:00
Dmitry Vyukov
e0d31e9170
tsan: Go lang: symbolize stack traces
...
llvm-svn: 159827
2012-07-06 14:54:25 +00:00
Kostya Serebryany
739b0de5b1
[tsan] start using AllocatorCache in CombinedAllocator
...
llvm-svn: 159825
2012-07-06 14:32:00 +00:00
Alexander Potapenko
740d166c3e
Small fix: do not replace the default CFAllocator if it has been replaced already.
...
llvm-svn: 159824
2012-07-06 13:52:28 +00:00
Kostya Serebryany
d1e6094f9e
[tsan] implement SizeClassAllocatorLocalCache (part of tsan allocator)
...
llvm-svn: 159823
2012-07-06 13:46:49 +00:00
Alexander Potapenko
dc211a8db4
Because CFAllocatorCreate() should also be called after __CFInitialize() on Lion,
...
do so by factoring the CFAllocator logic into ReplaceCFAllocator(), which is called from
either the __CFInitialize wrapper or __asan_init(), depending on which of them is called later.
llvm-svn: 159822
2012-07-06 13:24:28 +00:00
Alexander Potapenko
89f9270366
A portable way to check whether __CFInitialize has been called: compare kCFAllocatorSystemDefault._base._cfisa to 0.
...
This should fix http://code.google.com/p/address-sanitizer/issues/detail?id=87 on both Lion and Snow Leopard.
llvm-svn: 159821
2012-07-06 13:04:12 +00:00
Alexander Potapenko
d2ff0b087a
Do not check for __CFRuntimeClassTableSize on non-10.6 systems, where this symbol is private.
...
This change may cause http://code.google.com/p/address-sanitizer/issues/detail?id=87 to re-appear on Lion.
llvm-svn: 159819
2012-07-06 11:58:54 +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
Alexander Potapenko
25b567dd0d
Fix http://code.google.com/p/address-sanitizer/issues/detail?id=87 by making sure we replace the default CFAllocator only after __CFInitialize has been called.
...
llvm-svn: 159749
2012-07-05 14:46:56 +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
Kostya Serebryany
ba235522e0
[tsan] reg test for tsan issue #3
...
llvm-svn: 159737
2012-07-05 09:09:40 +00:00
Alexey Samsonov
78a3bbc82c
[TSan] add a new option 'use_internal_symbolizer' that allows to choose between addr2line-based and llvm-based symbolizer w/o having to rebuild the runtime. This is hopefully a temporary solution that simplifies testing process. In the end, we should leave a single symbolizer.
...
llvm-svn: 159730
2012-07-05 07:18:29 +00:00
Alexey Samsonov
b4ea34f5d7
[TSan] Improve output tests: allow reports to contain file:line:column instead of file:line
...
llvm-svn: 159714
2012-07-04 15:48:05 +00:00
Alexander Potapenko
77769caaef
Do not call malloc_zone_from_ptr() for the pointers passed to mz_size() and mz_free().
...
These callbacks assume that the memory belongs to asan_zone, so it's incorrect to pass it to another one.
If a need for this appears (e.g. system libraries free the memory using wrong zone), it should be documented.
llvm-svn: 159713
2012-07-04 13:58:07 +00:00
Alexey Samsonov
3ac4548c92
[ASan] Minor fix in symbolizer output.
...
llvm-svn: 159709
2012-07-04 10:58:35 +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
Alexey Samsonov
6f510f8eb5
[TSan] use threadsafe death tests in TSan unit tests
...
llvm-svn: 159533
2012-07-02 14:35:25 +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
Alexey Samsonov
4618508ea4
[ASan] cmake cleanup: make tab/space padding in CMakeLists consistent, silence/fix some pedantic warnings
...
llvm-svn: 159514
2012-07-02 06:48:10 +00:00
Dmitry Vyukov
3c5c9e7774
tsan/asan: third try on msvc atomics
...
llvm-svn: 159449
2012-06-29 18:37:45 +00:00
Dmitry Vyukov
b379fe51b4
tsan/asan: second attemp on msvc atomics
...
llvm-svn: 159447
2012-06-29 18:28:02 +00:00
Dmitry Vyukov
e8cee12ce2
tsan/asan: first try on msvc atomics
...
llvm-svn: 159443
2012-06-29 18:00:38 +00:00
Dmitry Vyukov
513f0238d8
tsan/asan: add SpinMutex to sanitizer_common
...
llvm-svn: 159439
2012-06-29 17:32:18 +00:00
Dmitry Vyukov
7a9fa7dbc5
tsan/asan: unify ScopedLock
...
llvm-svn: 159438
2012-06-29 17:10:08 +00:00
Dmitry Vyukov
6fa46f7003
tsan/asan: unify atomics (move atomics from tsan to sanitizer_common)
...
llvm-svn: 159437
2012-06-29 16:58:33 +00:00
Dmitry Vyukov
6967083071
tsan: use -Wno-unused-private-field only for clang (gcc does not understand it)
...
llvm-svn: 159435
2012-06-29 16:37:49 +00:00
Kostya Serebryany
92afdb6c31
[tsan] added CombinedAllocator for tsan
...
llvm-svn: 159432
2012-06-29 15:35:18 +00:00
Dmitry Vyukov
ef5a5a5650
tsan: replace struct copies where clang inserts memcpy() calls with explicit internal_memcpy() calls
...
llvm-svn: 159431
2012-06-29 15:26:55 +00:00
Dmitry Vyukov
5bb47a6e0e
tsan: remove own memset/memcpy/memcmp (too messy)
...
llvm-svn: 159430
2012-06-29 15:19:14 +00:00
Kostya Serebryany
5766a9e015
[asan] fix lint
...
llvm-svn: 159429
2012-06-29 14:14:32 +00:00
Kostya Serebryany
d32d537d63
[asan] get rid of libc's sscanf as it causes infinite recursion on Fedora.
...
llvm-svn: 159424
2012-06-29 13:05:36 +00:00
Alexey Samsonov
c37ac17629
[ASan] cmake unit tests: explicitly add necessary linker flags when linking unit tests with asan runtime
...
llvm-svn: 159420
2012-06-29 11:29:39 +00:00
Alexey Samsonov
548b7b5b0e
[ASan] cmake-based unit tests: merge instrumented and non-instrumented files into one test binary
...
llvm-svn: 159419
2012-06-29 10:23:31 +00:00
Dmitry Vyukov
a932bdfc1e
tsan: clear shadow for ucontext, because it's visible to user
...
llvm-svn: 159365
2012-06-28 18:20:50 +00:00
Dmitry Vyukov
fa985a02ef
tsan: fix crashes if signal is caught during thread bootstrap or shutdown
...
llvm-svn: 159361
2012-06-28 18:07:46 +00:00
Alexey Samsonov
6b03aa1bf7
[ASan] fix the build - erase second main as we link all test sources together
...
llvm-svn: 159348
2012-06-28 13:44:27 +00:00
Alexey Samsonov
3fe0d4d9aa
[ASan] silence various warnings in cmake build of asan unit tests
...
llvm-svn: 159347
2012-06-28 13:12:07 +00:00