tsan: fix a bug


git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@172710 91177308-0d34-0410-b5e6-96231b3b80d8
tsan: fix a bug


git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@172712 91177308-0d34-0410-b5e6-96231b3b80d8
[sanitizer] a bit more unification for interceptors (merge read/pread/pread64 in asan and tsan)

git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@172713 91177308-0d34-0410-b5e6-96231b3b80d8
[tsan] add write_range/read_range hooks to common interceptors called from tsan (to find races on read/pread/etc)

git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@172714 91177308-0d34-0410-b5e6-96231b3b80d8
[ASan] fix __asan_get_ownership(p) and __asan_get_allocated_size(p) for the p = malloc(0)

git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@172717 91177308-0d34-0410-b5e6-96231b3b80d8
[tsan] move prctl interceptor from asan to common_interceptors thus enabling it for tsan too

git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@172719 91177308-0d34-0410-b5e6-96231b3b80d8
[msan] More interceptors.

strtod and friends, dladdr, getrusage


git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@172720 91177308-0d34-0410-b5e6-96231b3b80d8
[msan] start using common interceptors in msan

git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@172721 91177308-0d34-0410-b5e6-96231b3b80d8
[sanitizer] move write/pwrite/pwrite64 interceptors to common

git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@172722 91177308-0d34-0410-b5e6-96231b3b80d8
[asan] restructure read/pread/pread64 tests

git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@172723 91177308-0d34-0410-b5e6-96231b3b80d8
[asan] attempting to fix the Mac build

git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@172725 91177308-0d34-0410-b5e6-96231b3b80d8
ASan: Allow __asan_get_allocated_size(malloc(0)) to be 0 or 1

git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@172726 91177308-0d34-0410-b5e6-96231b3b80d8
[ASan] minor changes to swapcontext handling: don't clear shadow memory if context stack is too large

git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@172727 91177308-0d34-0410-b5e6-96231b3b80d8
[ubsan] Add SANITIZER_INTERFACE_ATTRIBUTE to __ubsan_vptr_type_cache

Missed this one previously.

git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@172730 91177308-0d34-0410-b5e6-96231b3b80d8
Have ReExec read environment from /proc/self/environ

It is possible for ReExec to be called before the C standard library
has initialised itself sufficiently for execv to work properly.
Fix this by parsing the environment ourselves and using execve.

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

git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@172748 91177308-0d34-0410-b5e6-96231b3b80d8
Revert r172719, r172721-172723, and r172725.

The r172719 patch broke the build on Mac, the others depended on it.

compiler-rt/lib/asan/asan_interceptors.cc:78:13: error: unused function
      'SetThreadName' [-Werror,-Wunused-function]
      static void SetThreadName(const char *name) {

Orignal headlines:

  [asan] attempting to fix the Mac build
  [asan] restructure read/pread/pread64 tests
  [sanitizer] move write/pwrite/pwrite64 interceptors to common
  [msan] start using common interceptors in msan
  [tsan] move prctl interceptor from asan to common_interceptors thus enabling it for tsan too

git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@172763 91177308-0d34-0410-b5e6-96231b3b80d8
[sanitizer] reapply r172719, r172721-172723, r172725, and also fix the warning on Mac.

git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@172791 91177308-0d34-0410-b5e6-96231b3b80d8
[ASan] fixes for Android build

git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@172800 91177308-0d34-0410-b5e6-96231b3b80d8
Remove references to pthread_workqueue_additem_np(), which isn't in the official libdispatch API.


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