Evgeniy Stepanov
165d759a6a
[sanitizer] Intercept mbtowc, mbrtowc, get_current_dir_name.
...
Move getcwd to common interceptors.
llvm-svn: 185424
2013-07-02 13:34:44 +00:00
Evgeniy Stepanov
1df4dfe87a
[sanitizer] Intercept setlocale.
...
llvm-svn: 185416
2013-07-02 09:23:45 +00:00
Evgeniy Stepanov
8a4e24ea8b
[sanitizer] Intercept getnameinfo.
...
llvm-svn: 185338
2013-07-01 13:51:31 +00:00
Evgeniy Stepanov
dec0f76c14
[sanitizer] Intercept ptrace.
...
llvm-svn: 185142
2013-06-28 11:02:43 +00:00
Evgeniy Stepanov
06d6c25141
[sanitizer] readdir and readdir_r interceptors.
...
llvm-svn: 184950
2013-06-26 15:00:53 +00:00
Evgeniy Stepanov
60d964d4f2
[sanitizer] Intercept sysinfo.
...
llvm-svn: 184739
2013-06-24 14:25:33 +00:00
Evgeniy Stepanov
8fb2c264a2
[sanitizer] Fix TSan build.
...
llvm-svn: 184736
2013-06-24 14:03:13 +00:00
Evgeniy Stepanov
0e8053af08
[sanitizer] Intercept readv, preadv, writev, pwritev.
...
llvm-svn: 184717
2013-06-24 10:43:23 +00:00
Evgeniy Stepanov
0b1f41b6f4
[sanitizer] ioctl interceptor.
...
ASan: disabled by default
MSan: enabled by default
TSan: disabled
llvm-svn: 183517
2013-06-07 13:00:47 +00:00
Evgeniy Stepanov
fc708db4c1
[sanitizer] Intercept getpeername.
...
llvm-svn: 182844
2013-05-29 11:49:25 +00:00
Evgeniy Stepanov
f28217ad0e
[sanitizer] modf/modff/modfl interceptors.
...
llvm-svn: 182838
2013-05-29 10:03:11 +00:00
Evgeniy Stepanov
b978627cb8
[sanitizer] Intercept getsockopt.
...
llvm-svn: 182574
2013-05-23 11:38:08 +00:00
Evgeniy Stepanov
ab25369d04
[sanitizer] Interceptors for gethostbyname and friends.
...
llvm-svn: 182573
2013-05-23 11:10:23 +00:00
Evgeniy Stepanov
97aea34b54
[msan] Intercept getsockname.
...
llvm-svn: 182475
2013-05-22 13:46:22 +00:00
Evgeniy Stepanov
bfd2122b20
[msan] getaddrinfo & nested interceptor support.
...
Multiple connected changes:
- Ignore reads from nested interceptors.
- Check shadow on reads from common interceptors.
- getaddrinfo interceptor.
llvm-svn: 182466
2013-05-22 12:50:26 +00:00
Evgeniy Stepanov
970be35808
[sanitizer] Intercept pthread_getschedparam.
...
llvm-svn: 182353
2013-05-21 08:12:08 +00:00
Evgeniy Stepanov
44b75efab4
[sanitizer] Intercept inet_pton and inet_ntop.
...
llvm-svn: 180107
2013-04-23 14:05:15 +00:00
Evgeniy Stepanov
3076ba0a08
[sanitizer] Intercept getgrnam{_r}, getgrgid{_r}.
...
llvm-svn: 180091
2013-04-23 12:01:20 +00:00
Evgeniy Stepanov
460067823b
[sanitizer] Interceptors for wait*.
...
llvm-svn: 179096
2013-04-09 14:34:59 +00:00
Evgeniy Stepanov
69967c2835
[msan] Intercept glob() with tests.
...
llvm-svn: 179091
2013-04-09 11:35:13 +00:00
Chandler Carruth
2b3c00eec7
Revert r179012: "[msan] Intercept glob()."
...
This was committed without tests and contains obvious bugs. That's not
acceptable. It broke address sanitizer for most programs using glob(3).
llvm-svn: 179054
2013-04-08 20:59:44 +00:00
Evgeniy Stepanov
8cd707a1a6
[msan] Intercept glob().
...
llvm-svn: 179012
2013-04-08 09:03:00 +00:00
Evgeniy Stepanov
e20c780aaf
[tsan] Fix build.
...
llvm-svn: 179008
2013-04-08 08:46:25 +00:00
Evgeniy Stepanov
f8213b4eb3
[sanitizer] More interceptors.
...
getpwnam, getpwuid, getpwnam_r, getpwuid_r, clock_getres, clock_gettime,
clock_settime, getitimer, setitimer, sigaction (MSan).
llvm-svn: 178465
2013-04-01 14:47:21 +00:00
Dmitry Vyukov
6f4b34bcf4
asan/tsan: move strcasecmp() interceptor to sanitizer_common
...
llvm-svn: 178010
2013-03-26 12:40:23 +00:00
Dmitry Vyukov
69c323d66f
tsan: intercept abort() to fflush() libc streams
...
llvm-svn: 177637
2013-03-21 12:50:43 +00:00
Dmitry Vyukov
9f94dff7a6
tsan: add missing stat descriptions
...
llvm-svn: 177523
2013-03-20 14:04:23 +00:00
Dmitry Vyukov
0954e9c01d
tsan: call fflush(0) on exit again
...
llvm-svn: 177522
2013-03-20 14:01:10 +00:00
Dmitry Vyukov
b62c158d81
tsan: special handling of .rodata (don't try to find races, don't keep shadow, dont' put into traces)
...
llvm-svn: 177517
2013-03-20 13:21:50 +00:00
Evgeniy Stepanov
231894a902
[sanitizer] Intercept frexp and friends.
...
llvm-svn: 177056
2013-03-14 11:34:39 +00:00
Evgeniy Stepanov
ea61d08185
[sanitizer] Add interceptors for localtime and friends.
...
llvm-svn: 175499
2013-02-19 09:19:16 +00:00
Evgeniy Stepanov
d8cfb99a71
[sanitizer] Missing changes from r174960.
...
llvm-svn: 174962
2013-02-12 12:02:49 +00:00
Dmitry Vyukov
effd98b0f4
tsan: intercept libc __res_iclose
...
this is required to catch close of file descriptors created in getaddrinfo()
llvm-svn: 174624
2013-02-07 15:27:45 +00:00
Dmitry Vyukov
606de60163
tsan: intercept bind/listen
...
llvm-svn: 174311
2013-02-04 08:06:32 +00:00
Dmitry Vyukov
4399d92252
tsan: support for inprocess symbolizer
...
llvm-svn: 173797
2013-01-29 13:05:30 +00:00
Dmitry Vyukov
b130fc3c0d
tsan: add interceptor stubs for stat family of functions
...
llvm-svn: 173782
2013-01-29 09:23:09 +00:00
Evgeniy Stepanov
222076e972
[sanitizer] Common *scanf interceptors.
...
llvm-svn: 172805
2013-01-18 11:17:23 +00:00
Kostya Serebryany
69fe0ba415
[sanitizer] reapply r172719, r172721-172723, r172725, and also fix the warning on Mac.
...
llvm-svn: 172791
2013-01-18 06:43:13 +00:00
Jakob Stoklund Olesen
7956e0094d
Revert r172719, r172721-172723, and r172725.
...
The r172719 patch broke the build on Mac, the others depended on it.
compiler-rt/lib/asan/asan_interceptors.cc:78:13: error: unused function
'SetThreadName' [-Werror,-Wunused-function]
static void SetThreadName(const char *name) {
Orignal headlines:
[asan] attempting to fix the Mac build
[asan] restructure read/pread/pread64 tests
[sanitizer] move write/pwrite/pwrite64 interceptors to common
[msan] start using common interceptors in msan
[tsan] move prctl interceptor from asan to common_interceptors thus enabling it for tsan too
llvm-svn: 172763
2013-01-17 22:51:56 +00:00
Kostya Serebryany
f7f5566055
[tsan] move prctl interceptor from asan to common_interceptors thus enabling it for tsan too
...
llvm-svn: 172719
2013-01-17 13:38:16 +00:00
Dmitry Vyukov
a681c01b69
tsan: fix crash when user defines own fopen/fileno
...
llvm-svn: 171967
2013-01-09 11:54:52 +00:00
Dmitry Vyukov
b4ede780b0
tsan: fix crash when user defines own fopen/fileno
...
llvm-svn: 171958
2013-01-09 08:22:06 +00:00
Dmitry Vyukov
22be55e47e
tsan: update mutex table for java
...
llvm-svn: 170884
2012-12-21 11:30:14 +00:00
Dmitry Vyukov
44e1beaee6
tsan: intercept fork() to prevent false race reports on fd's
...
llvm-svn: 170433
2012-12-18 14:44:44 +00:00
Dmitry Vyukov
d509179a0b
tsan: add signalfd() and inotify_init() interceptors
...
llvm-svn: 170429
2012-12-18 12:35:31 +00:00
Dmitry Vyukov
e0c37640f7
tsan: add socketpair() interceptor and test
...
llvm-svn: 170184
2012-12-14 09:57:42 +00:00
Dmitry Vyukov
60c14ce625
tsan: more precise handling of IO synchronization
...
llvm-svn: 169970
2012-12-12 11:59:30 +00:00
Dmitry Vyukov
54b87409b4
tsan: even more fd interceptors + fixes
...
llvm-svn: 169628
2012-12-07 19:23:59 +00:00
Dmitry Vyukov
04580518ce
tsan: more fd interceptors + bug fixes + tests
...
llvm-svn: 169621
2012-12-07 18:30:40 +00:00
Dmitry Vyukov
4e7c0f95fb
tsan: add pipe interceptors
...
llvm-svn: 169602
2012-12-07 15:32:56 +00:00
Dmitry Vyukov
fd5ebcd1b0
tsan: add mutexsets to reports
...
With this change reports say what mutexes the threads hold around the racy memory accesses.
llvm-svn: 169493
2012-12-06 12:16:15 +00:00
Dmitry Vyukov
c446aa039a
tsan: provide own implementation of __cxa_guard_xxx functions
...
that way we allow static linking of libstdc++
llvm-svn: 169376
2012-12-05 12:10:22 +00:00
Dmitry Vyukov
1450ac6406
tsan: add __libc_memalign interceptor (used by dynamic loader to allocate tls for dlopen'ed modules)
...
llvm-svn: 169017
2012-11-30 17:27:58 +00:00
Dmitry Vyukov
59d58665ee
tsan: add 128-bit atomic operations
...
llvm-svn: 168683
2012-11-27 07:41:27 +00:00
Dmitry Vyukov
3b4501254f
tsan: add atomic nand operation
...
llvm-svn: 168584
2012-11-26 09:42:56 +00:00
Dmitry Vyukov
262465c126
tsan: eevn better handling of signals
...
add interceptor for poll()
in addition process signals in every atomic op
in addition process signals in blocking libc functions
llvm-svn: 168050
2012-11-15 17:40:49 +00:00
Dmitry Vyukov
317f39290d
tsan: intercept gettimeofday()
...
llvm-svn: 167630
2012-11-09 19:55:06 +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
Alexander Potapenko
ab7a4ea485
Revert the lockf() support.
...
llvm-svn: 163614
2012-09-11 11:59:05 +00:00
Alexander Potapenko
1a471772b0
Interceptors for lockf and lockf64, minor calloc() fix.
...
llvm-svn: 163602
2012-09-11 09:26:35 +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
3b2f9f4c98
Remove file-type tags in .cc files in tsan/ and sanitizer_common/
...
llvm-svn: 157928
2012-06-04 13:55:19 +00:00
Dmitry Vyukov
95a5c5ca4c
tsan: intercept longjmp() but die in it, greatly simplifies problem diagnostic
...
llvm-svn: 157760
2012-05-31 18:03:59 +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