Alexey Samsonov
fdff4a8e0b
[TSan] add support for running external symbolizer other than addr2line (for testing purposes)
...
llvm-svn: 163297
2012-09-06 08:48:43 +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
Dmitry Vyukov
49dd68ae7c
tsan: do not crash with obscure message if a user passes invalid arguments to malloc/free/memset/etc
...
llvm-svn: 163092
2012-09-02 12:04:51 +00:00
Dmitry Vyukov
318f77749e
tsan: add "as if synchronized via sleep" feature
...
llvm-svn: 163006
2012-08-31 17:27:49 +00:00
Dmitry Vyukov
191f2f7cdb
tsan: use stack depot to describe heap blocks
...
llvm-svn: 162902
2012-08-30 13:02:30 +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
Dmitry Vyukov
9f143c5c5f
tsan: improve Go report format + fix build
...
llvm-svn: 162042
2012-08-16 19:36:45 +00:00
Dmitry Vyukov
9f1509fe44
tsan: provide function that imitates write to a region but does not detect races
...
llvm-svn: 161957
2012-08-15 16:52:19 +00:00
Dmitry Vyukov
954fc8c3e4
tsan: switch to new allocator
...
llvm-svn: 161953
2012-08-15 15:35:15 +00:00
Dmitry Vyukov
e91e9ac2a2
tsan: remove unnecessary and wrong include
...
llvm-svn: 160860
2012-07-27 13:21:01 +00:00
Dmitry Vyukov
5bfac97ff9
tsan: use dynamic shadow stack for Go
...
llvm-svn: 160288
2012-07-16 16:44:47 +00:00
Dmitry Vyukov
03d32ecd4f
tsan: Go language support
...
llvm-svn: 159754
2012-07-05 16:18:28 +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
de1fd1c83b
tsan: do not call malloc/free in memory access handling routine.
...
This improves signal-/fork-safety of instrumented programs.
llvm-svn: 158988
2012-06-22 11:08:55 +00:00
Alexey Samsonov
e1cb524226
[Sanitizer] Renaming: SNPrintf -> internal_snprintf (and move it to sanitizer libc)
...
llvm-svn: 158710
2012-06-19 09:21:57 +00:00
Alexey Samsonov
58a3c58ec9
[Sanitizer] move different wrappers from TSan to common sanitizer runtime
...
llvm-svn: 158655
2012-06-18 08:44:30 +00:00
Alexey Samsonov
156958dd0c
[Sanitizer] move all the rest re-implementations of libc functions from ASan runtime to common sanitizer runtime
...
llvm-svn: 158519
2012-06-15 13:09:52 +00:00
Alexey Samsonov
8bd9098b32
[Sanitizer] move placement_new definiton from TSan to common runtime
...
llvm-svn: 158145
2012-06-07 09:50:16 +00:00
Alexey Samsonov
51ae983718
[Sanitizer]: Introduce a common internal printf function. For now, also use tool-specific wrappers TsanPrintf (its output is controlled by TSan flags) and AsanPrintf (which copies its results to the ASan-private buffer). Supported formats: %[z]{d,u,x}, %s, %p. Re-write all format strings in TSan according to this format (this should have no effect on 64-bit platforms).
...
llvm-svn: 158065
2012-06-06 13:11:29 +00:00
Alexey Samsonov
ac4c290d02
[TSan] run some renaming as a preparation for factoring out Printf implementation.
...
llvm-svn: 158058
2012-06-06 10:13:27 +00:00
Alexey Samsonov
8602c65719
[Sanitizer] remove using namespace __sanitizer lines
...
llvm-svn: 157999
2012-06-05 14:05:09 +00:00
Alexey Samsonov
ef2e2cfd33
[Sanitizer] Use common defines for ASan and TSan runtime. Split defines between interface defines (can be visible in user code that includes interface ASan/TSan headers) and internal defines.
...
llvm-svn: 157998
2012-06-05 13:50:57 +00:00
Alexey Samsonov
3b2f9f4c98
Remove file-type tags in .cc files in tsan/ and sanitizer_common/
...
llvm-svn: 157928
2012-06-04 13:55:19 +00:00
Kostya Serebryany
c5bea20e2e
[asan,tsan] rename files in sanitizer_common to have a common prefix (sanitizer_).
...
llvm-svn: 157740
2012-05-31 13:42:53 +00:00
Kostya Serebryany
458b4006b2
[asan,tsan] Add a new directory compiler-rt/lib/sanitizer_common
...
which will contain code shared between asan and tsan run-times.
Naming is hard. If you can suggest a better name for the directory -- speak up.
llvm-svn: 157611
2012-05-29 12:18:18 +00:00
Dmitry Vyukov
3de9ca068f
tsan: use DCHECK_GT/LT instead of plain DCHECK (better diagnostics)
...
llvm-svn: 157567
2012-05-28 07:45:35 +00:00
Dmitry Vyukov
302cebb8f1
tsan: add shadow memory flush + fix few bugs
...
llvm-svn: 157270
2012-05-22 18:07:45 +00:00
Dmitry Vyukov
f6985e3ab9
tsan: reduce per-thread memory usage
...
llvm-svn: 157252
2012-05-22 14:34:43 +00:00
Dmitry Vyukov
15710c9220
tsan: simple memory profiler
...
llvm-svn: 157248
2012-05-22 11:33:03 +00:00
Dmitry Vyukov
19b855fe3e
tsan: remove shutdown code
...
tsan runtime shutdown is problematic for 2 reasons:
1. others crash during shutdown
2. we have to override user exit status (don't know it and can't return from atexit handler)
llvm-svn: 156991
2012-05-17 15:00:27 +00:00
Dmitry Vyukov
fee5b7d2e0
tsan: detect accesses to freed memory
...
http://codereview.appspot.com/6214052
llvm-svn: 156990
2012-05-17 14:17:51 +00:00
Kostya Serebryany
4ad375f0a9
[tsan] First commit of ThreadSanitizer (TSan) run-time library.
...
Algorithm description: http://code.google.com/p/thread-sanitizer/wiki/ThreadSanitizerAlgorithm
Status:
The tool is known to work on large real-life applications, but still has quite a few rough edges.
Nothing is guaranteed yet.
The tool works on x86_64 Linux.
Support for 64-bit MacOS 10.7+ is planned for late 2012.
Support for 32-bit OSes is doable, but problematic and not yet planed.
Further commits coming:
- tests
- makefiles
- documentation
- clang driver patch
The code was previously developed at http://code.google.com/p/data-race-test/source/browse/trunk/v2/
by Dmitry Vyukov and Kostya Serebryany with contributions from
Timur Iskhodzhanov, Alexander Potapenko, Alexey Samsonov and Evgeniy Stepanov.
llvm-svn: 156542
2012-05-10 13:48:04 +00:00