Kostya Serebryany
b1232474b2
[asan] try fixing the mmap_limit_mb failure on buildbot (tests pass locally)
...
llvm-svn: 206262
2014-04-15 08:35:43 +00:00
Hans Wennborg
8f80ccc635
sanitizer_atomic_msvc.h: add atomic_fetch_{add,sub} overloads for uintptr_t
...
This should hopefully unbreak the MSVC build after r206178.
llvm-svn: 206200
2014-04-14 17:43:49 +00:00
Hans Wennborg
ec77f619bb
sanitizer_deadlock_detector.h: MSVC 2012 doesn't like compound literals
...
llvm-svn: 206199
2014-04-14 17:43:45 +00:00
Evgeniy Stepanov
81d80f7578
[asan] Fix mmap_limit_mb test to not use C++11.
...
llvm-svn: 206182
2014-04-14 15:37:02 +00:00
Evgeniy Stepanov
681016b2ea
[asan] Do not use lambda in sanitizer lit tests.
...
We may be building with a very old C++ library.
llvm-svn: 206180
2014-04-14 15:19:07 +00:00
Evgeniy Stepanov
9ce9a6cdf6
[msan] Intercept wcsftime().
...
llvm-svn: 206179
2014-04-14 14:59:42 +00:00
Kostya Serebryany
bcfbea6d4e
[asan] added internal flag mmap_limit_mb
...
llvm-svn: 206178
2014-04-14 14:51:01 +00:00
Kostya Serebryany
90527cb324
[asan] don't use bool in public interface, make sure the interface headers are usable in plain C
...
llvm-svn: 206160
2014-04-14 11:16:53 +00:00
Kostya Serebryany
f694ab1f18
[asan] provide better reports for cases where memcpy/etc get negative size parameter. Also fix a typo found by Tetsuo Kiso
...
llvm-svn: 206158
2014-04-14 09:50:52 +00:00
Dmitry Vyukov
51f5b5fd73
tsan: serialize report printing in standalone deadlock detector
...
otherwise reports get intermixed
llvm-svn: 206043
2014-04-11 17:54:27 +00:00
Dmitry Vyukov
b5eb8f0212
tsan: fix vector clocks
...
the new optimizations break when thread ids gets reused (clocks go backwards)
add the necessary tests as well
llvm-svn: 206035
2014-04-11 15:38:03 +00:00
Dmitry Vyukov
fa1d56c31f
tsan: ignore interceptors from symbolizer
...
ocassionally we see races coming from symbolizer interceptors (e.g. memcmp)
reproducible only only on large complex programs
llvm-svn: 206034
2014-04-11 15:36:54 +00:00
Evgeniy Stepanov
77d8793fa6
[tsan] Fix output tests.
...
llvm-svn: 206031
2014-04-11 13:01:20 +00:00
Evgeniy Stepanov
652cbd7c15
[tsan] Fix false positive on xdr*_create.
...
llvm-svn: 206030
2014-04-11 12:29:24 +00:00
Evgeniy Stepanov
d326c81117
[msan] mprotect() more memory to detect user code outside of application range.
...
llvm-svn: 206028
2014-04-11 12:04:29 +00:00
Viktor Kutuzov
7004b8c07c
Enable building of sanitizers on FreeBSD
...
llvm-svn: 205919
2014-04-09 18:45:12 +00:00
Viktor Kutuzov
82185a2088
Declare _DYNAMIC and dl_phdr_info in asan_linux.cc on FreeBSD
...
llvm-svn: 205852
2014-04-09 13:37:19 +00:00
Manuel Klimek
0ee8505800
Update arc config to new domain.
...
llvm-svn: 205702
2014-04-07 10:22:41 +00:00
Evgeniy Stepanov
24c8d92fec
[sanitizer] Intercept a subset of sunrpc interface (xdr_*).
...
llvm-svn: 205627
2014-04-04 14:51:23 +00:00
Alexey Samsonov
7dc3c0fb2b
[ASan] Explicitly specify -ldl/-lpthread in RUN-lines where needed
...
llvm-svn: 205623
2014-04-04 12:24:46 +00:00
Dmitry Vyukov
1d66c4d5b7
tsan: improve error message in test
...
we've seen a flake on this test
next time it happens we will be able to gather some info
llvm-svn: 205619
2014-04-04 09:52:41 +00:00
Evgeniy Stepanov
f653cda269
[msan] Introduce MsanThread. Move thread-local allocator cache out of TLS.
...
This reduces .tbss from 109K down to almost nothing.
llvm-svn: 205618
2014-04-04 09:47:41 +00:00
Kostya Serebryany
9f20c9b17c
[asan] fix a leak in __tls_get_addr handler; introduce a run-time flag to disable this handler completely; remove a workaround for a bug fixed in glibc
...
llvm-svn: 205617
2014-04-04 09:10:58 +00:00
Evgeniy Stepanov
6d8f71f928
Revert r205613.
...
llvm-svn: 205614
2014-04-04 08:58:16 +00:00
Evgeniy Stepanov
fe82d5f849
[msan] Fix compilation of a disabled test.
...
llvm-svn: 205613
2014-04-04 08:39:50 +00:00
Alexey Samsonov
425314a65f
[TSan] Fix a rare deadlock on multithreaded fork.
...
If a multi-threaded program calls fork(), TSan ignores all memory accesses
in the child to prevent deadlocks in TSan runtime. This is OK, as child is
probably going to call exec() as soon as possible. However, a rare deadlocks
could be caused by ThreadIgnoreBegin() function itself.
ThreadIgnoreBegin() remembers the current stack trace and puts it into the
StackDepot to report a warning later if a thread exited with ignores enabled.
Using StackDepotPut in a child process is dangerous: it locks a mutex on
a slow path, which could be already locked in a parent process.
The fix is simple: just don't put current stack traces to StackDepot in
ThreadIgnoreBegin() and ThreadIgnoreSyncBegin() functions if we're
running after a multithreaded fork. We will not report any
"thread exited with ignores enabled" errors in this case anyway.
Submitting this without a testcase, as I believe the standalone reproducer
is pretty hard to construct.
llvm-svn: 205534
2014-04-03 12:51:26 +00:00
Alexey Samsonov
b4525218d4
[TSan] Fix a typo ThreadIgnoreSyncEnd. Found by inspection
...
llvm-svn: 205531
2014-04-03 12:28:16 +00:00
Alexey Samsonov
11ff0a26a4
[ASan] Fix incompatible runtimes check: don't iterate /proc/self/maps on every call to __asan_init
...
llvm-svn: 205418
2014-04-02 13:09:22 +00:00
Evgeniy Stepanov
6cc687541f
[msan] Add missing test for r205413.
...
llvm-svn: 205417
2014-04-02 12:38:13 +00:00
Evgeniy Stepanov
2dcb5c0a2c
[msan] Kill __msan_print_param_shadow.
...
It does not do what it's name says, and what it actually does is hard to
describe, and is not useful at all.
llvm-svn: 205415
2014-04-02 11:55:24 +00:00
Evgeniy Stepanov
80cb930c09
[msan] Add __msan_check_mem_is_initialized.
...
An assert()-like function that checks that a memory range is fully initialized.
llvm-svn: 205413
2014-04-02 11:50:42 +00:00
Evgeniy Stepanov
a55fcd35e9
[msan] Precise origin handling in __unaligned_(load|store)*.
...
llvm-svn: 205412
2014-04-02 11:06:35 +00:00
Alexey Samsonov
2c66a22e56
[ASan] One more attempt to fix Android build
...
llvm-svn: 205411
2014-04-02 09:36:36 +00:00
Evgeniy Stepanov
8dbf3faa16
[msan] clang-format several unit tests
...
llvm-svn: 205410
2014-04-02 09:17:55 +00:00
Greg Fitzgerald
c744492f7c
Allow the user to override the compiler used for testing
...
Change-Id: I76d4708a26f17185efb746f4b836aa32f3f8a44f
llvm-svn: 205362
2014-04-01 21:54:56 +00:00
Joerg Sonnenberger
a350ba4883
Move __addsf3 and __adddf3 into the corresponding blocks that define
...
fp_t.
llvm-svn: 205344
2014-04-01 18:39:58 +00:00
Duncan P. N. Exon Smith
dd690a2ca4
InstrProfile: Use SANITIZER_COMMON_LIT_TEST_DEPS
...
Take advantage of the SANITIZER_COMMON_LIT_TEST_DEPS variable.
<rdar://problem/16458307>
llvm-svn: 205321
2014-04-01 16:05:15 +00:00
Duncan P. N. Exon Smith
48e24c7355
InstrProf: Turn on test for Linux
...
Enabling test/profile on Linux to get feedback from the buildbots. I'm
hoping this just works...
<rdar://problem/16458307>
llvm-svn: 205319
2014-04-01 15:56:05 +00:00
Duncan P. N. Exon Smith
a5f806e599
InstrProf: Remove LTO dependency from test
...
The -flto flag relies on linker features that are not available on all
platforms.
<rdar://problem/16458307>
llvm-svn: 205318
2014-04-01 15:29:27 +00:00
Alexander Potapenko
f3e92a9e71
[tsan] Remove an accidentally committed debug print.
...
llvm-svn: 205316
2014-04-01 15:07:09 +00:00
Joerg Sonnenberger
6530149704
Add support for IEEE754 quad precision comparison functions.
...
From GuanHong Liu.
Differential Revision: http://llvm-reviews.chandlerc.com/D2797
llvm-svn: 205312
2014-04-01 13:42:56 +00:00
Alexey Samsonov
107e4abfd0
[ASan] Fix Android build
...
llvm-svn: 205311
2014-04-01 13:42:16 +00:00
Alexey Samsonov
56b6ee9833
[ASan] Optional support for dynamic ASan runtime on Linux.
...
Based on http://llvm-reviews.chandlerc.com/D3042 by Yuri Gribov!
llvm-svn: 205308
2014-04-01 13:16:30 +00:00
Alexey Samsonov
28f30b4176
[TSan] Make this test more portable
...
llvm-svn: 205300
2014-04-01 11:51:50 +00:00
Kostya Serebryany
432c46bf70
[sanitizer] one more stress test for the deadlock detector; this one stresses the slow path with a global lock
...
llvm-svn: 205299
2014-04-01 11:35:55 +00:00
Viktor Kutuzov
7fedc179d2
Add FreeBSD support to sanitizers' procmaps facilities
...
llvm-svn: 205291
2014-04-01 10:34:21 +00:00
Viktor Kutuzov
3ece65b894
Fix definition of the __sanitizer_passwd structure on FreeBSD
...
llvm-svn: 205290
2014-04-01 10:29:42 +00:00
Duncan P. N. Exon Smith
da91cbdfa8
InstrProf: lit.cfg magic for running tests from source
...
Implement magic in compiler-rt to enable llvm-lit to be invoked on the
source tree in lib/profile. This relies on a paired commit in the llvm
tree that exposes a new built-in parameter.
<rdar://problem/16458307>
llvm-svn: 205263
2014-03-31 23:14:28 +00:00
Duncan P. N. Exon Smith
ae2f0bbcf1
InstrProf: Add simple compiler-rt test
...
Add the test infrastructure for testing lib/profile and a single test.
This initial commit only enables the tests on Darwin, but they'll be
enabled on Linux soon after.
<rdar://problem/16458307>
llvm-svn: 205256
2014-03-31 22:45:37 +00:00
Evgeniy Stepanov
3c95744de8
[msan] Remove an extra top frame from track-origins=2 reports.
...
llvm-svn: 205192
2014-03-31 14:18:55 +00:00