Dmitry Vyukov
d326a6cf93
tsan: check that signal handlers do not spoil errno.
...
llvm-svn: 159264
2012-06-27 13:54:46 +00:00
Dmitry Vyukov
f8b7a8dc08
tsan: close all file descriptors after fork()
...
llvm-svn: 159263
2012-06-27 12:48:46 +00:00
Alexey Samsonov
e2109388a4
[TSan] fix warnings suppression: internal-linkage-in-inline was renamed to static-in-inline
...
llvm-svn: 159198
2012-06-26 11:33:51 +00:00
Dmitry Vyukov
ec64f3e738
tsan: remove internal allocator, switch to sanitizer_common one.
...
llvm-svn: 159141
2012-06-25 15:03:15 +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
Kostya Serebryany
6e26fa9dd1
[tsan] first step in implementing a custom allocator for tsan (and msan) which saves precious shadow
...
llvm-svn: 158913
2012-06-21 10:04:36 +00:00
Kostya Serebryany
98390d0b71
[tsan] a bit more lint and Makefile changes to run tests from sanitizer_common
...
llvm-svn: 158821
2012-06-20 15:19:17 +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
b1c3991915
[TSan] Add a comment that tsan_flags.h may be included in the user code, and therefore shouldn't include other headers from TSan or common sanitizer runtime. User may need tsan_flags.h to provide its implementation of __tsan::OverrideFlags
...
llvm-svn: 158708
2012-06-19 08:57:53 +00:00
Alexey Samsonov
d9ae7adb84
[TSan] silence -Winternal-linkage-in-inlinewarning which is produced for gtest code
...
llvm-svn: 158705
2012-06-19 07:38:11 +00:00
Alexey Samsonov
cf7d233ac0
[TSan] kill some linux-specific code in favor of code in common runtime: reuse wrappers for mmap routines, ProcessMaps iterator, thread stack calculation
...
llvm-svn: 158657
2012-06-18 09:42:39 +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
3efd6fc26c
[Sanitizer] Use DEFINE_REAL macro in TSan runtime to call libc implementations of functions. Move strchr to sanitizer_libc.
...
llvm-svn: 158517
2012-06-15 12:24:07 +00:00
Alexey Samsonov
1042454b66
[TSan] don't use too new __attribute__((unused)) for class member
...
llvm-svn: 158500
2012-06-15 07:33:49 +00:00
Dmitry Vyukov
ea03fc2d78
tsan: fix COMPAT mapping to not produce false reports
...
llvm-svn: 158473
2012-06-14 21:40:35 +00:00
Alexey Samsonov
96ef49a71e
[Sanitizer] Move internal_memcmp to common sanitizer libc
...
llvm-svn: 158450
2012-06-14 14:04:54 +00:00
Alexey Samsonov
aac5d0c831
[Sanitizer] Workaround for -Wunused-private-field warning - add an attribute in TSan unit test, and silence this warning as gtest has unused fields.
...
llvm-svn: 158449
2012-06-14 14:02:32 +00:00
Alexey Samsonov
f516d39c1f
[TSan] use efficient real_memcpy inside runtime
...
llvm-svn: 158260
2012-06-09 09:14:24 +00:00
Alexey Samsonov
59036d2c06
[Sanitizer] add internal_memset and internal_strrchr to sanitizer_common/
...
llvm-svn: 158202
2012-06-08 14:11:12 +00:00
Alexey Samsonov
6cfc34ea7f
[TSan] s/internal_memset/real_memset
...
llvm-svn: 158200
2012-06-08 13:59:39 +00:00
Alexey Samsonov
91e1a7eb17
[Sanitizer] move internal_strdup and internal_memcpy to common runtime. Make internal allocations from TSan runtime call InternalAlloc from common runtime
...
llvm-svn: 158148
2012-06-07 11:54:08 +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
e428779dbf
[Sanitizer] Use common CHECK machinery. Currently each tool has to define its own CheckFailed function.
...
llvm-svn: 158075
2012-06-06 15:22:20 +00:00
Alexey Samsonov
d323f4e78e
[Sanitizer] Remove __attribute__((format))
...
llvm-svn: 158070
2012-06-06 13:58:39 +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
ee07290628
[Sanitizer] Move more functions/constants to sanitizer_common.
...
llvm-svn: 158056
2012-06-06 09:26:25 +00:00
Alexey Samsonov
ca2b5d7abb
[Sanitizer] move internal_filesize and internal_dup2 from TSan to sanitizer_common.
...
llvm-svn: 158052
2012-06-06 07:30:33 +00:00
Alexey Samsonov
bc3a7e3fe2
[Sanitizer] add sanitizer_common.h for routines shared between TSan and ASan runtimes. Use __sanitizer::Die() in TSan.
...
llvm-svn: 158050
2012-06-06 06:47:26 +00:00
Alexey Samsonov
5bbf8290a7
[Sanitizer] rename sanitizer_defs.h to sanitizer_internal_defs.h
...
llvm-svn: 158001
2012-06-05 14:25: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
cc88531760
[TSan] Use internal_munmap from sanitizer_libc in TSan runtime.
...
llvm-svn: 157995
2012-06-05 09:55:24 +00:00
Alexey Samsonov
b8f35d9512
[TSan] make TSan runtime use internal_{close,read,write} from sanitizer_libc
...
llvm-svn: 157992
2012-06-05 09:00:36 +00:00
Alexey Samsonov
298dd7c361
[TSan] use __sanitizer::internal_open in TSan run-time
...
llvm-svn: 157988
2012-06-05 07:46:31 +00:00
Alexey Samsonov
11fff6df33
[TSan] use __sanitizer::internal_mmap in TSan run-time
...
llvm-svn: 157984
2012-06-05 06:19:00 +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
Alexey Samsonov
90f9630c80
[Sanitizer]: move internal_strcmp to sanitizer_common
...
llvm-svn: 157926
2012-06-04 13:27:49 +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
Dmitry Vyukov
6f448700e4
tsan: fix a typo
...
llvm-svn: 157744
2012-05-31 14:24:10 +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
Dmitry Vyukov
d6ffccd1da
tsan: suppress reports against source file names as well
...
llvm-svn: 157739
2012-05-31 13:18:11 +00:00
Dmitry Vyukov
92d917d91c
tsan: prevent recursive signal handlers
...
llvm-svn: 157625
2012-05-29 15:51:27 +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
9bf897e696
tsan: fix compiler warnings
...
llvm-svn: 157585
2012-05-28 17:33:08 +00:00
Dmitry Vyukov
880bb6697f
tsan: fix race during pthread_join/detach
...
llvm-svn: 157584
2012-05-28 17:32:50 +00:00
Dmitry Vyukov
e1bbb2f34a
tsan: pass CFLAGS to tests
...
llvm-svn: 157579
2012-05-28 14:15:39 +00:00
Dmitry Vyukov
ed5bc02740
tsan: be more conservative wrt symbolizer output
...
llvm-svn: 157578
2012-05-28 14:14:53 +00:00
Dmitry Vyukov
d558530754
tsan: increase /proc/self/maps max size (1M is far not enough)
...
llvm-svn: 157570
2012-05-28 09:24:01 +00:00