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).

git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@187841 91177308-0d34-0410-b5e6-96231b3b80d8
Enable pipefail for LSan tests

git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@187873 91177308-0d34-0410-b5e6-96231b3b80d8
Enable pipefail for TSan tests

git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@187875 91177308-0d34-0410-b5e6-96231b3b80d8
[sanitizer] Intercept sched_getaffinity.

Re-applying with a more reliable test case.


git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@187876 91177308-0d34-0410-b5e6-96231b3b80d8
Enable pipefail for ASan tests

git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@187877 91177308-0d34-0410-b5e6-96231b3b80d8
Distinguish 32-bit ASan from 64-bit ASan in lit configs

git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@187878 91177308-0d34-0410-b5e6-96231b3b80d8
ASan: fix one more test case for pipefail

git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@187881 91177308-0d34-0410-b5e6-96231b3b80d8
[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.



git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@187885 91177308-0d34-0410-b5e6-96231b3b80d8
[TSan] Fix free_race.c by removing `not` from the test invocation that doesn't fail.



git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@187889 91177308-0d34-0410-b5e6-96231b3b80d8
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

git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@187924 91177308-0d34-0410-b5e6-96231b3b80d8
Simplify (and fix) check-dfsan configs

git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@187968 91177308-0d34-0410-b5e6-96231b3b80d8
[sanitizer] ASan/MSan tests for r187967.

r187967: Disable inlining between sanitized and non-sanitized functions.


git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@187971 91177308-0d34-0410-b5e6-96231b3b80d8
[sanitizer] Intercept strerror and strerror_r.


git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@187978 91177308-0d34-0410-b5e6-96231b3b80d8
tsan: better  diagnostics for invalid addresses passed to free()


git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@187980 91177308-0d34-0410-b5e6-96231b3b80d8
[sanitizer] Intercept scandir/scandir64.


git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@187982 91177308-0d34-0410-b5e6-96231b3b80d8
[sanitizer] Limit scandir interceptor to Linux.

Implementation uses __thread not available on certain platforms.


git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@187983 91177308-0d34-0410-b5e6-96231b3b80d8
[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.


git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@188069 91177308-0d34-0410-b5e6-96231b3b80d8
[tests] Update to use lit_config and lit package, as appropriate.

git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@188116 91177308-0d34-0410-b5e6-96231b3b80d8
[tests] Add one more lit rename update I missed.

git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@188117 91177308-0d34-0410-b5e6-96231b3b80d8
[sanitizer] Intercept getgroups.


git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@188167 91177308-0d34-0410-b5e6-96231b3b80d8