Alexey Samsonov
70a9c263d4
[TSan] Make path to FileCheck configurable
...
llvm-svn: 178760
2013-04-04 12:18:12 +00:00
Kostya Serebryany
eef8bd4355
[asan] nuke the old unused allocator code
...
llvm-svn: 178758
2013-04-04 11:32:49 +00:00
Kostya Serebryany
13b07733b1
[asan] fill first 4K of malloc-ed memory with garbage, implement flags max_malloc_fill_size and malloc_fill_byte
...
llvm-svn: 178757
2013-04-04 11:17:14 +00:00
Evgeniy Stepanov
24b2169e07
[sanitizer] Android lacks ucontext_t definition.
...
llvm-svn: 178756
2013-04-04 09:21:48 +00:00
Evgeniy Stepanov
7b0e132551
[sanitizer] Use ucontext_t instead of "struct ucontext".
...
Fixes Mac build.
llvm-svn: 178755
2013-04-04 09:03:56 +00:00
Evgeniy Stepanov
1f8b3538b4
[msan] Unpoison siginfo_t and ucontext_t in signal handlers.
...
Add wrappers for all user signal handlers to unpoison the handler's arguments.
llvm-svn: 178754
2013-04-04 08:22:52 +00:00
Kostya Serebryany
c3525ce6ac
[sanitizer] while doing fast unwinding make sure that the frame pointer is aligned; fix lint
...
llvm-svn: 178747
2013-04-04 06:52:40 +00:00
Alexey Samsonov
87c2a87b50
[Sanitizer] Fix OnPrint weak hook. Disable weak hooks for gotsan.
...
llvm-svn: 178640
2013-04-03 13:22:54 +00:00
Alexey Samsonov
60adc1781e
[Sanitizer] Be more careful with arch-specific defines in StopTheWorld code
...
llvm-svn: 178630
2013-04-03 08:26:03 +00:00
Alexey Samsonov
21cb74318c
[ASan] Kill the remainders of platform defines in favor of SANITIZER_ defines
...
llvm-svn: 178629
2013-04-03 07:29:53 +00:00
Alexey Samsonov
a0e28a7aaa
[Sanitizer] Kill the remainders of platform defines in favor of SANITIZER_ defines
...
llvm-svn: 178627
2013-04-03 07:24:35 +00:00
Alexey Samsonov
8d18cc3096
[Sanitizer] Fix StopTheWorld includes on Android. Patch by Sergey Matveev.
...
llvm-svn: 178625
2013-04-03 07:06:10 +00:00
Alexander Potapenko
bbfc722e46
[TSan] Add the WTFAnnotateBenignRaceSized implementation and a test for
...
WTFAnnotateBenignRaceSized and AnnotateBenignRaceSized.
llvm-svn: 178534
2013-04-02 11:21:53 +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
Alexander Potapenko
1d021bff28
[libsanitizer] Run the callback on a separate stack in StopTheWorld.
...
Currently the callback runs on the caller's stack. If this stack
contains values that have gone out of scope, and we are not super careful, those
values can propagate into global variables (the libc sigaction() in particular
has a side effect that can lead to this). This has caused false negatives in
leak checking code.
Changes: map a separate stack space for the tracer thread. Also, move some
globals into local scope (they had no business being global anyway).
Patch by Sergey Matveev (earthdok@google.com )
llvm-svn: 178464
2013-04-01 14:38:56 +00:00
Alexander Potapenko
401bed0b9a
[libsanitizer] Added data() and capacity() getters to InternalVector.
...
Same interface as in STL. Needed for LSan.
Patch by Sergey Matveev (earthdok@google.com )
llvm-svn: 178463
2013-04-01 13:55:34 +00:00
Alexander Potapenko
9cc2e436bb
[libsanitizer] Add register dumping support to SuspendedThreadsList.
...
An interface for obtaining register contexts from suspended threads. Tailored
for LSan use.
Patch by Sergey Matveev (earthdok@google.com )
llvm-svn: 178461
2013-04-01 13:36:42 +00:00
Alexey Samsonov
e624795558
[ASan] More careful reports for globals that are ASCII strings
...
llvm-svn: 178458
2013-04-01 08:57:38 +00:00
Michael Gottesman
4ddc2156d6
Change the cmake variable COMPILER_RT_CAN_EXECUTE_TESTS to be an option so that it can overwritten.
...
The reason why this simple change is needed is that I am trying to set up a
quick cmake/ninja based buildbot and apple-clang does not support using the
sanitizers currently.
The default behavior follows exactly what was there before implying that no ones
builds should be affected at all.
llvm-svn: 178455
2013-04-01 04:13:03 +00:00
Kostya Serebryany
91952cda76
[tsan] restore performance critical inlining in tsan: remove static from ALWAYS_INLINE, use ALWAYS_INLINE USED for critical functions.
...
llvm-svn: 178341
2013-03-29 09:44:16 +00:00
Alexander Potapenko
b042555cd3
[TSan] Build TSan runtime with -fPIE.
...
This removes all register spills from the performance-critical __tsan_{read,write}{1,2,4,8} functions when the host compiler is GCC.
llvm-svn: 178340
2013-03-29 09:44:11 +00:00
Alexander Potapenko
389b45061f
[libsanitizer] Put COMMON_CFLAGS/COMMON_CXXFLAGS before Tmp.CFLAGS to let the config-specific flags override common flags.
...
llvm-svn: 178339
2013-03-29 09:41:10 +00:00
Alexey Samsonov
703a9870a2
[Sanitizer] Follow-up for r178238 - replace DCHECKs with regular CHECKs
...
llvm-svn: 178336
2013-03-29 08:03:01 +00:00
Timur Iskhodzhanov
23411d9a95
Band-aid fix for the TSan RTL build
...
llvm-svn: 178298
2013-03-28 22:23:03 +00:00
Timur Iskhodzhanov
e3164e9647
Add "static" to the Windows ALWAYS_INLINE macro (similar to what we do on POSIX)
...
llvm-svn: 178296
2013-03-28 22:07:28 +00:00
Timur Iskhodzhanov
07d06d7cf5
Remove all 'static' before ALWAYS_INLINE
...
llvm-svn: 178290
2013-03-28 21:16:09 +00:00
Timur Iskhodzhanov
a6788325cf
Make all the ALWAYS_INLINE users Windows-friendly; also, avoid ALWAYS_INLINE INLINE combinations
...
llvm-svn: 178266
2013-03-28 18:52:40 +00:00
Dmitry Vyukov
f2cbda4082
tsan: print statistics about benign race annotations
...
(total count, unique, matched) if requested with print_benign=1
flag.
llvm-svn: 178245
2013-03-28 16:21:19 +00:00
Alexey Samsonov
a88c60b085
[ASan] Speed-up initialization-order checking: create and use fast versions of PoisonShadow functions, store copies of __asan_global descriptors in a vector instead of list of pointers. This gives 3x speedup on both benchmarks and real binaries with lots of globals.
...
llvm-svn: 178239
2013-03-28 15:42:43 +00:00
Alexey Samsonov
cfe56d47da
[Sanitizer] Minor enhancements in InternalVector container
...
llvm-svn: 178238
2013-03-28 15:37:11 +00:00
Kostya Serebryany
3e73c84050
[tsan] a test checking that memset/memcpy/memmove are not inlined in tsan mode
...
llvm-svn: 178231
2013-03-28 11:21:50 +00:00
Alexey Samsonov
e586170e86
Fix unmatching ASan runtime flag for init-order checking exposed by r178158. Add a test for r178158.
...
llvm-svn: 178229
2013-03-28 09:11:20 +00:00
Kostya Serebryany
ac83282665
[tsan] don't use -fno-builtin for tests; add a test for a false negative bug (inlined memcpy is not instrumented)
...
llvm-svn: 178228
2013-03-28 08:41:49 +00:00
Richard Smith
74e3d39710
compiler-rt part of r178194. Remove ubsan test for diagnostic on inf/nan conversion between floating-point types.
...
llvm-svn: 178195
2013-03-27 23:21:10 +00:00
Dmitry Vyukov
b365d40415
tsan: print matched suppressions if print_suppressions=1 flag is provided
...
llvm-svn: 178159
2013-03-27 17:59:57 +00:00
Dmitry Vyukov
fd3f5ec0cb
tsan: better flag parsing: do not confuse flag that is a part of another flag
...
(e.g. suppressions and print_suppressions)
llvm-svn: 178158
2013-03-27 17:59:13 +00:00
Dmitry Vyukov
9f08fe5065
tsan: fix lint warning
...
llvm-svn: 178157
2013-03-27 17:57:58 +00:00
Alexey Samsonov
7152debedd
[ASan] Demangle global names in error reports.
...
llvm-svn: 178131
2013-03-27 10:41:22 +00:00
Alexey Samsonov
f903a9ee6e
[TSan] Fixup for r178128: verify that TSan indeed doesn't report race
...
llvm-svn: 178129
2013-03-27 10:22:51 +00:00
Alexey Samsonov
059e61f8b0
[TSan] Run test output through FileCheck
...
llvm-svn: 178128
2013-03-27 09:25:06 +00:00
Alexey Samsonov
56a784d2f6
[ASan] Change the ABI of __asan_before_dynamic_init function: now it takes pointer to private string with module name. This string serves as a unique module ID in ASan runtime. compiler-rt part
...
llvm-svn: 178014
2013-03-26 13:06:12 +00:00
Alexander Potapenko
29310ba077
[libsanitizer] Fix the Win build.
...
llvm-svn: 178012
2013-03-26 13:02:11 +00:00
Kostya Serebryany
79a6e189b0
[tsan] make memcpy_race.cc test immune to memcpy inlining
...
llvm-svn: 178011
2013-03-26 12:42:18 +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
f3bc56bb6b
asan/tsan: change SANITIZER_GO to more general SANITIZER_SUPPORTS_WEAK_HOOKS
...
llvm-svn: 178009
2013-03-26 12:07:04 +00:00
Alexander Potapenko
f8109dd0f8
[libsanitizer] Unmapping the old cache partially invalidates the memory layout, so add
...
a flag to skip cache update for cases when that's unacceptable (e.g. lsan).
Patch by Sergey Matveev (earthdok@google.com )
llvm-svn: 178000
2013-03-26 10:34:37 +00:00
Alexey Samsonov
7ef76c1cd8
[Sanitizer] Disable atomic_test on Android, where it crashes Clang.
...
llvm-svn: 177998
2013-03-26 08:55:38 +00:00
Kostya Serebryany
4d7efba66e
[tsan] add a test for aligned-vs-unaligned race (tsan's false negative)
...
llvm-svn: 177996
2013-03-26 08:31:02 +00:00
Kostya Serebryany
88b2b45ec8
[asan] print thread number while reporting invalid-free and double-free; add tests; also add a test for use-after-poison
...
llvm-svn: 177993
2013-03-26 08:01:37 +00:00
Timur Iskhodzhanov
2dee3dd61c
Add a GetTid() implementation for Windows
...
llvm-svn: 177927
2013-03-25 22:04:29 +00:00