tsan: fix handling of setjmp

It's incorrect to take address of setjmp,
because it may not (ligally) present in libc.
Fixes http://gcc.gnu.org/bugzilla/show_bug.cgi?id=59188



git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@195345 91177308-0d34-0410-b5e6-96231b3b80d8
tsan: add -lm to output test build script
as common sanitizer interceptors now require it



git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@195346 91177308-0d34-0410-b5e6-96231b3b80d8
tsan: remove debug output from test



git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@195347 91177308-0d34-0410-b5e6-96231b3b80d8
[msan] Test for r195349.


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

the tests produce episodic flakes
the hypothesis is that it's due to our "racy" race detection algorithm
sleeps should remove the flakes



git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@195351 91177308-0d34-0410-b5e6-96231b3b80d8
[asan] rename contiguous-container-buffer-overflow (too long) to container-overflow

git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@195352 91177308-0d34-0410-b5e6-96231b3b80d8
Implement a bunch of custom glibc wrappers & corresponding tests.

- Introduce several new custom glibc wrappers
- Implement some of the not yet implemented wrappers
- Refactor and extend the tests
- Add script to make sure all declare custom glibc wrappers are implemented & tested.

Patch by Lorenzo Martignoni!

Differential Revision: http://llvm-reviews.chandlerc.com/D2234

git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@195381 91177308-0d34-0410-b5e6-96231b3b80d8
Revert r195381, "Implement a bunch of custom glibc wrappers & corresponding tests."

It broke a buildbot.

git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@195392 91177308-0d34-0410-b5e6-96231b3b80d8
[sanitizer] Add missing header dependencies.


git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@195425 91177308-0d34-0410-b5e6-96231b3b80d8
[sanitizer] Change the way we use certain linux kernel headers.

Some linux headers are broken on older kernels.
Instead of depending on the constants and types from such headers directly,
we provide our own definitions and then verify them with compile-time
assertions. This makes the dependency on the headers test-only and would allow
switching to some other way of testing on older kernels, or even disable the
tests as the last resort (after all, kernel interfaces are supposed to be
stable).


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


git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@195433 91177308-0d34-0410-b5e6-96231b3b80d8
[sanitizer] Restore perf_event_attr handling.

This time in a forward/backward compatible way.


git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@195434 91177308-0d34-0410-b5e6-96231b3b80d8
[sanitizer] Add kernel_stat definitions for arm.


git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@195436 91177308-0d34-0410-b5e6-96231b3b80d8
Call real pthread_attr_getstack instead of the interceptor

Summary:
Call real pthread_attr_getstack instead of the interceptor
when we do intercept pthread_attr_getstack.

Reviewers: samsonov, eugenis

Reviewed By: samsonov

CC: llvm-commits

Differential Revision: http://llvm-reviews.chandlerc.com/D2237

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