Peter Collingbourne
50cb32e614
Introduce an operator new for LowLevelAllocator, and convert most users to it.
...
llvm-svn: 193308
2013-10-24 06:23:39 +00:00
Alexey Samsonov
857e3ece9b
[ASan] ASan can be combined with LSan and UBSan, so export symbol from them as well.
...
llvm-svn: 193245
2013-10-23 15:36:22 +00:00
Evgeniy Stepanov
55a3ba2281
[sanitizer] Fix OSX build.
...
llvm-svn: 193244
2013-10-23 15:21:10 +00:00
Evgeniy Stepanov
3e6064f9d2
[sanitizer] Intercept ether_* functions.
...
llvm-svn: 193241
2013-10-23 13:57:47 +00:00
Dmitry Vyukov
1ec0fd4071
tsan: parse symbolize/external_symbolizer_path common flags
...
llvm-svn: 193236
2013-10-23 09:00:49 +00:00
Dmitry Vyukov
2346c7a511
tsan: fix linux syscall hooks
...
the file references non-existent arguments and breaks build
llvm-svn: 193234
2013-10-23 08:40:19 +00:00
Nick Lewycky
993f1f38fd
Continue to keep 'SUMMARY: ' prefix in lsan. Whoops!
...
llvm-svn: 193232
2013-10-23 07:58:11 +00:00
Nick Lewycky
622348e693
Hoist the addition of the prefix "SUMMARY: " from
...
__sanitizer_report_error_summary to ReportErrorSummary.
llvm-svn: 193231
2013-10-23 07:45:53 +00:00
Nick Lewycky
d27d668342
Make sure ASan always emits an error summary if it reports an error.
...
llvm-svn: 193229
2013-10-23 06:19:04 +00:00
Evgeniy Stepanov
2794c47243
[msan] Drain allocator cache when leaving thread.
...
llvm-svn: 193163
2013-10-22 14:31:30 +00:00
Evgeniy Stepanov
0229c09d43
[sanitizer] Intercept initgroups.
...
llvm-svn: 193158
2013-10-22 12:24:48 +00:00
Sergey Matveev
fd10073aeb
[lsan] When detect_leaks=false, be completely silent.
...
In particular, don't make a fuss if we're passed a malformed suppressions file,
or if we have trouble identifying ld.so. Also, make LSan interface functions
no-ops in this case.
llvm-svn: 193108
2013-10-21 19:35:00 +00:00
Peter Collingbourne
b745eec4e4
Use internal_memset to initialize this variable.
...
Otherwise, the compiler may use memset in non-optimized builds, which is
forbidden in the nolibc part of the runtime.
llvm-svn: 193098
2013-10-21 18:11:57 +00:00
Kostya Serebryany
b773785a59
[asan] count the size of QuarantineBatch in the total Quarantine size; make QuarantineBatch fit into 8K, fix a MSVC compile warning
...
llvm-svn: 193072
2013-10-21 08:36:10 +00:00
Dmitry Vyukov
1e995d4f3e
tsan: fix strerror interceptor (eliminate false positives)
...
llvm-svn: 193070
2013-10-21 07:40:19 +00:00
Peter Collingbourne
90a0876ae7
Runtime support for the indirect function call checker.
...
Differential Revision: http://llvm-reviews.chandlerc.com/D1339
llvm-svn: 193060
2013-10-20 21:29:46 +00:00
Peter Collingbourne
b714e7e12a
[ubsan] Introduce %clangxx substitution for all C++ tests.
...
llvm-svn: 193059
2013-10-20 21:29:32 +00:00
Kostya Serebryany
8bb5d60235
[asan] fix stack trace printing on Mac
...
llvm-svn: 192990
2013-10-18 17:46:43 +00:00
Kostya Serebryany
f11e485d60
[asan] allocate AsanThreadContext using LowLevelAllocator instead of mmap to save space
...
llvm-svn: 192980
2013-10-18 15:07:07 +00:00
Kostya Serebryany
9628839869
[asan] reduce the size of AsanThreadContext by storing the stack trace in the stack depot
...
llvm-svn: 192979
2013-10-18 14:50:44 +00:00
Alexander Potapenko
e45ca59fd9
[ASan] fix compilation of sanitizer_platform_limits_posix.cc on OSX.
...
llvm-svn: 192975
2013-10-18 14:16:54 +00:00
Alexander Potapenko
2fe16d720c
[ASan] fix compilation of atexit_stats.cc on OSX
...
llvm-svn: 192973
2013-10-18 14:12:15 +00:00
Evgeniy Stepanov
78c5730bec
[sanitizer] Fix OSX build some more.
...
llvm-svn: 192967
2013-10-18 12:19:23 +00:00
Evgeniy Stepanov
b4e501c6ec
[sanitizer] Fix OSX build.
...
llvm-svn: 192966
2013-10-18 11:26:02 +00:00
Evgeniy Stepanov
3cb9df042e
[sanitizer] Move statfs/fstatfs to common interceptors and add statvfs/fstatvfs.
...
llvm-svn: 192965
2013-10-18 11:14:16 +00:00
Kostya Serebryany
e2007b706e
[asan] fix a test on Mac
...
llvm-svn: 192960
2013-10-18 09:42:24 +00:00
Evgeniy Stepanov
70d5abfba2
[sanitizer] Intercept getmntent, getmntent_r.
...
llvm-svn: 192959
2013-10-18 09:41:43 +00:00
Kostya Serebryany
4bf67d99f4
[asan] fix atexit stats
...
llvm-svn: 192956
2013-10-18 07:57:59 +00:00
Richard Smith
c1d5471291
Make the big array in the UBSan C++ runtime be zero-initialized to dramatically
...
shrink the binary size of the ubsan runtime.
Also fix a bug where long-running processes could eventually trigger a crash in
the runtime by filling up the cache. I've not found a nice way to add a test for
this crasher; ideas welcome.
llvm-svn: 192931
2013-10-17 22:51:04 +00:00
Alexander Potapenko
1f5573cca2
[ASan] fix assign_large_valloc_to_global.cc to use the correct header for valloc() on OSX.
...
llvm-svn: 192901
2013-10-17 15:48:24 +00:00
Kostya Serebryany
8e2881d0c2
[asan] fix a failure with ASAN_OPTIONS=verbosity=1:use_sigaltstack=1
...
llvm-svn: 192892
2013-10-17 13:18:21 +00:00
Evgeniy Stepanov
4bbf273173
[sanitizer] Fix unpoisoning of msghdr::msg_name in recvmsg interceptor.
...
llvm-svn: 192886
2013-10-17 11:32:30 +00:00
Kostya Serebryany
f04ae33106
[asan] Fix a deadlock between asan's allocator and lsan
...
Summary:
This fixes a deadlock which happens in lsan
on a large memalign-allocated chunk that resides in lsan's root set.
Reviewers: samsonov, earthdok
Reviewed By: earthdok
CC: llvm-commits
Differential Revision: http://llvm-reviews.chandlerc.com/D1957
llvm-svn: 192885
2013-10-17 11:18:11 +00:00
Alexey Samsonov
bc7c87a8cb
[Sanitizer] Move pthread_cond_signal and pthread_cond_broadcast to common interceptors
...
llvm-svn: 192876
2013-10-17 09:24:03 +00:00
Dmitry Vyukov
333112a439
tsan: merge 2 similar tests into 1
...
llvm-svn: 192874
2013-10-17 08:27:24 +00:00
Dmitry Vyukov
e88dbe5774
tsan: add a test for __tsan_default_options()
...
llvm-svn: 192873
2013-10-17 08:13:38 +00:00
Will Dietz
ece9ede240
Use configured PYTHON in asan lit tests.
...
llvm-svn: 192870
2013-10-17 05:33:22 +00:00
Dmitry Vyukov
cdc971c03c
tsan: revert variable name change in test
...
It works as is with new llvm-symbolizer.
llvm-svn: 192798
2013-10-16 15:57:23 +00:00
Dmitry Vyukov
464ebbd67b
tsan: move shadow stack from thread descriptors to fixed addresses
...
This allows to increase max shadow stack size to 64K,
and reliably catch shadow stack overflows instead of silently
corrupting memory.
llvm-svn: 192797
2013-10-16 15:35:12 +00:00
Kostya Serebryany
442c4e4b1a
[asan] introduce run-time flag 'poison_partial'
...
llvm-svn: 192793
2013-10-16 13:49:01 +00:00
Alexey Samsonov
fa103da867
[Sanitizer] Fix lint checker script on Mac
...
llvm-svn: 192791
2013-10-16 13:38:23 +00:00
Dmitry Vyukov
d8f595edf1
tsan: refactor libignore implementation
...
llvm-svn: 192785
2013-10-16 11:28:12 +00:00
Alexey Samsonov
1fe87e031c
[TSan] Extend test for reporting globals with races on them
...
llvm-svn: 192782
2013-10-16 09:56:17 +00:00
Evgeniy Stepanov
ec8ec333f0
[asan] Remove CallocOverflow32 test from asan_test.
...
The same as with MSan, this test behavior depends on ASAN_OPTIONS, and we've
got a lit_test that covers this.
llvm-svn: 192777
2013-10-16 08:34:31 +00:00
Evgeniy Stepanov
8df08225e5
[msan] Handle origins in __sanitizer_unaligned_(load|store)*.
...
llvm-svn: 192776
2013-10-16 08:25:13 +00:00
Alexey Samsonov
edecc38395
Make some pthread_mutex_* and pthread_cond_* interceptors common.
...
Reviewers: eugenis, dvyukov
Reviewed By: dvyukov
CC: llvm-commits
Differential Revision: http://llvm-reviews.chandlerc.com/D1937
llvm-svn: 192774
2013-10-16 08:20:31 +00:00
Sergey Matveev
27ef175ef0
[lsan] Fix bug when discovering indirectly leaked objects.
...
If an object contains pointers to itself, that doesn't make it indirectly
leaked. D'oh!
llvm-svn: 192716
2013-10-15 16:00:11 +00:00
Dmitry Vyukov
81f76f6ff7
tsan: introduce __tsan_default_options() function
...
The function allows to statically setup default values for flags.
The interafece matches what asan/msan provide.
llvm-svn: 192715
2013-10-15 15:58:11 +00:00
Dmitry Vyukov
21e99319f4
tsan: be silent if verbosity=0
...
Currently tests fail with:
Check failed: 'AAA' == 'AAA ==26017==Could not detach from thread 361395 (errno 3).'
llvm-svn: 192711
2013-10-15 15:35:56 +00:00
Dmitry Vyukov
67a1eef05b
tsan: remove __sanitizer_set_report_fd function from public interface
...
__sanitizer_set_report_path now accepts two special values - stderr and stdout
logging to other file descriptors is not supported anymore,
it's fragile in presence of multiple processes, fork, etc
llvm-svn: 192706
2013-10-15 14:14:34 +00:00