Evgeniy Stepanov
98c39a184e
[sanitizer] Intercept getgroups.
...
llvm-svn: 188167
2013-08-12 11:01:40 +00:00
Daniel Dunbar
beadec4afd
[tests] Add one more lit rename update I missed.
...
llvm-svn: 188117
2013-08-09 22:23:23 +00:00
Daniel Dunbar
bc5dbc435e
[tests] Update to use lit_config and lit package, as appropriate.
...
llvm-svn: 188116
2013-08-09 22:14:01 +00:00
Evgeniy Stepanov
7f915cf8a5
[sanitizer] Fix handling of %n in scanf interceptor.
...
%n does not increase the input item count. The new code emits writes to %n
arguments even if it has run out of input items.
llvm-svn: 188069
2013-08-09 12:58:35 +00:00
Evgeniy Stepanov
3bf5439a9d
[sanitizer] Limit scandir interceptor to Linux.
...
Implementation uses __thread not available on certain platforms.
llvm-svn: 187983
2013-08-08 14:04:36 +00:00
Evgeniy Stepanov
564215d949
[sanitizer] Intercept scandir/scandir64.
...
llvm-svn: 187982
2013-08-08 13:57:15 +00:00
Dmitry Vyukov
87bf47894c
tsan: better diagnostics for invalid addresses passed to free()
...
llvm-svn: 187980
2013-08-08 13:47:50 +00:00
Evgeniy Stepanov
233455cba8
[sanitizer] Intercept strerror and strerror_r.
...
llvm-svn: 187978
2013-08-08 11:44:05 +00:00
Evgeniy Stepanov
7ea4795ed3
[sanitizer] ASan/MSan tests for r187967.
...
r187967: Disable inlining between sanitized and non-sanitized functions.
llvm-svn: 187971
2013-08-08 09:23:19 +00:00
Alexey Samsonov
f49c076ff7
Simplify (and fix) check-dfsan configs
...
llvm-svn: 187968
2013-08-08 08:26:39 +00:00
Peter Collingbourne
5cbab07d02
DataFlowSanitizer; compiler-rt changes.
...
DataFlowSanitizer is a generalised dynamic data flow analysis.
Unlike other Sanitizer tools, this tool is not designed to detect a
specific class of bugs on its own. Instead, it provides a generic
dynamic data flow analysis framework to be used by clients to help
detect application-specific issues within their own code.
Differential Revision: http://llvm-reviews.chandlerc.com/D967
llvm-svn: 187924
2013-08-07 22:47:26 +00:00
Alexander Potapenko
0443f1ac72
[TSan] Fix free_race.c by removing `not` from the test invocation that doesn't fail.
...
llvm-svn: 187889
2013-08-07 13:54:27 +00:00
Alexander Potapenko
ce32410097
[TSan] Let the users suppress use-after-free errors using the "race:" suppressions.
...
If there's a race between a memory access and a free() call in the client program,
it can be reported as a use-after-free (if the access occurs after the free()) or an ordinary race
(if free() occurs after the access).
We've decided to use a single "race:" prefix for both cases instead of introducing a "use-after-free:" one,
because in many cases this allows us to keep a single suppression for both the use-after-free and free-after-use.
This may be misleading if the use-after-free occurs in a non-racy way (e.g. in a single-threaded program).
But normally such bugs shall not be suppressed.
llvm-svn: 187885
2013-08-07 12:39:00 +00:00
Alexey Samsonov
f502fd75ab
ASan: fix one more test case for pipefail
...
llvm-svn: 187881
2013-08-07 10:41:49 +00:00
Alexey Samsonov
15d5eefc65
Distinguish 32-bit ASan from 64-bit ASan in lit configs
...
llvm-svn: 187878
2013-08-07 09:31:28 +00:00
Alexey Samsonov
4431d2d566
Enable pipefail for ASan tests
...
llvm-svn: 187877
2013-08-07 09:14:30 +00:00
Evgeniy Stepanov
04b7bff1fe
[sanitizer] Intercept sched_getaffinity.
...
Re-applying with a more reliable test case.
llvm-svn: 187876
2013-08-07 09:10:16 +00:00
Alexey Samsonov
b6c8b3de70
Enable pipefail for TSan tests
...
llvm-svn: 187875
2013-08-07 09:02:37 +00:00
Alexey Samsonov
fd078b9405
Enable pipefail for LSan tests
...
llvm-svn: 187873
2013-08-07 08:46:09 +00:00
David Blaikie
787e2b6499
Revert "[sanitizer] Intercept sched_getaffinity."
...
This reverts commit r187788.
The test case is unreliable (as the test may be run in a situation in
which it has no affinity with cpu0). This can be recommitted with a more
reliable test - possibly using CPU_COUNT != 0 instead (I wasn't entirely
sure that a process was guaranteed to have at least one affinity, though
it seems reasonable, or I'd have made the change myself).
llvm-svn: 187841
2013-08-07 00:37:26 +00:00
Alexander Potapenko
8c6cd93123
[libsanitizer] Drive-by fix for -Wempty-body in sanitizer_common_syscalls.inc
...
This makes the file consistently use { } around the if statements containing the PRE_/POST_ macros.
llvm-svn: 187797
2013-08-06 14:07:46 +00:00
Evgeniy Stepanov
03c0281a17
[sanitizer] Fix NULL arg handling in setitimer/getitimer interceptors.
...
llvm-svn: 187789
2013-08-06 09:54:33 +00:00
Evgeniy Stepanov
9f05e5e533
[sanitizer] Intercept sched_getaffinity.
...
llvm-svn: 187788
2013-08-06 09:29:01 +00:00
Alexey Samsonov
b42ea7ef21
Lint fixes
...
llvm-svn: 187726
2013-08-05 13:20:39 +00:00
Evgeniy Stepanov
44b77c26e4
[msan] Allocator statistics interface and malloc hooks.
...
llvm-svn: 187653
2013-08-02 14:26:58 +00:00
Evgeniy Stepanov
90daaf9132
[msan] Fix unused function warning in the tests.
...
llvm-svn: 187648
2013-08-02 09:09:02 +00:00
Sergey Matveev
6459a370a7
[lsan] Add leak_check_at_exit flag.
...
We needed a way to tell LSan to invoke leak checking only if __do_leak_check()
is called explicitly. This can now be achieved by setting
leak_check_at_exit=false.
llvm-svn: 187578
2013-08-01 14:57:07 +00:00
Evgeniy Stepanov
5dbedf6c2a
[msan] Intercept setenv, putenv.
...
llvm-svn: 187575
2013-08-01 11:14:14 +00:00
Evgeniy Stepanov
1ea380f693
[msan] Fix msan tests with pipefail option.
...
llvm-svn: 187485
2013-07-31 09:14:55 +00:00
Evgeniy Stepanov
3feb17c452
[sanitizer] Tweak read syscall handler signature for consistency.
...
llvm-svn: 187417
2013-07-30 13:16:52 +00:00
Evgeniy Stepanov
9fbd981f99
[sanitizer] read() syscall hook.
...
llvm-svn: 187414
2013-07-30 13:04:43 +00:00
Evgeniy Stepanov
807e131261
[msan] Intercept pthread_join.
...
llvm-svn: 187413
2013-07-30 12:54:34 +00:00
Evgeniy Stepanov
da9fd25603
[msan] Intercept confstr.
...
llvm-svn: 187412
2013-07-30 12:46:59 +00:00
Evgeniy Stepanov
d8a1798b47
[asan] Limit fake stack size to a reasonable value when running with unlimited stack.
...
llvm-svn: 187411
2013-07-30 11:50:26 +00:00
Evgeniy Stepanov
f3e218a021
[asan] Raise thread stack size limit.
...
It's a sanity check, mostly, and we've seen threads with >256Mb stack.
llvm-svn: 187408
2013-07-30 09:01:18 +00:00
Evgeniy Stepanov
573ba3499e
[sanitizer] Disable ForEachMappedRegion on Android.
...
It needs interface that is missing from the NDK, and it is not used on Android anyway.
llvm-svn: 187407
2013-07-30 08:39:16 +00:00
Peter Collingbourne
e572e17a8e
Fix warning.
...
llvm-svn: 187373
2013-07-29 20:13:41 +00:00
Peter Collingbourne
9058c07c95
Move UnpoisonMappedDSO to sanitizer_common.
...
This is so DFSan will be able to use it.
Differential Revision: http://llvm-reviews.chandlerc.com/D1206
llvm-svn: 187372
2013-07-29 19:09:49 +00:00
Chandler Carruth
d45abe12a6
Turn off pipefail on msan tests to match the other sanitizers until
...
someone can go through and update the RUN lines appropriately for the
new pipefail behavior.
llvm-svn: 187298
2013-07-27 10:30:39 +00:00
Rafael Espindola
3cf7eb50a9
Disable pipefail for lsan.
...
llvm-svn: 187274
2013-07-26 23:42:16 +00:00
Rafael Espindola
f4fa0d8d9f
disable pipefail for ubsan.
...
llvm-svn: 187273
2013-07-26 23:40:17 +00:00
Rafael Espindola
7bc3077afb
Disable pipefail for ThreadSanitizer.
...
llvm-svn: 187272
2013-07-26 23:38:18 +00:00
Rafael Espindola
48e479291e
disable pipefail on asan for now.
...
llvm-svn: 187269
2013-07-26 23:19:33 +00:00
Sergey Matveev
540338259d
[sanitizer] Change strip_path_prefix flag behavior.
...
Previously (in tools other than TSan) the entire prefix of the path had to mach
the argument. With this change, only some suffix of the prefix has to match.
This is the same way this flag works in TSan.
llvm-svn: 186837
2013-07-22 16:14:38 +00:00
Sergey Matveev
9c012165ad
[lsan] Make __lsan_do_leak_check() honor the detect_leaks flag.
...
Also move detect_leaks to common flags.
llvm-svn: 186821
2013-07-22 12:38:17 +00:00
Sergey Matveev
1ac4824841
[lsan] Print direct leaks first.
...
Direct leaks are higher priority, so it makes sense to have them on top.
llvm-svn: 186819
2013-07-22 11:18:32 +00:00
Hans Wennborg
cb445d882e
Fix another instance of -ccc-cxx vs. --driver-mode=g++
...
llvm-svn: 186609
2013-07-18 21:09:03 +00:00
Hans Wennborg
2e304b6ffd
Use --driver-mode=g++ instead of -ccc-cxx; required after Clang r186605
...
llvm-svn: 186607
2013-07-18 20:48:50 +00:00
Sergey Matveev
655bd0d08c
[lsan] Add __lsan_do_leak_check() to the public interface.
...
Let users override the normal behavior to run leak checking earlier in
the process. Also fix a couple nits here and there.
llvm-svn: 186581
2013-07-18 14:06:07 +00:00
Dmitry Vyukov
e9c456e15f
tsan: treat SIGSYS as synchronous signal
...
It is required for chromium sandboxing code.
From the description it seems to be indeed synchronous -- called back on syscall with incorrect arguments,
but seems to be unused in practice. So this should be fine.
llvm-svn: 186579
2013-07-18 13:14:11 +00:00