[sanitizer] Support PTRACE_GETEVENTMSG in the ptrace() interceptor.

git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@211022 91177308-0d34-0410-b5e6-96231b3b80d8
Swap getdtablesize() for sysconf(_SC_OPEN_MAX).

Bionic is no removing this as it was removed from POSIX 2004.


git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@211027 91177308-0d34-0410-b5e6-96231b3b80d8
compiler-rt: prefer thumb over ARM

When possible, use Thumb or Thumb-2 over ARM instructions.  This is particularly
important for pure-Thumb environments (e.g. Windows on ARM).  Although, it is
possible to conditionalise this for that target specifically, this is available
on most newer ARM CPUs, and the code remains compatible with older CPUs with no
adverse effects.  It therefore feels better to always prefer Thumb when
possible.

git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@211032 91177308-0d34-0410-b5e6-96231b3b80d8
builtins: add it blocks for Thumb-2

Add the missing IT-blocks for Thumb-2 compilation for code paths exercised by
older ARM CPUs.  This should fix the buildbots.

git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@211035 91177308-0d34-0410-b5e6-96231b3b80d8
[msan] Fix handling of multiplication by a constant with a number of trailing zeroes.

Multiplication by an integer with a number of trailing zero bits leaves
the same number of lower bits of the result initialized to zero.
This change makes MSan take this into account in the case of multiplication by
a compile-time constant.

We don't handle the general, non-constant, case because
(a) it's not going to be cheap (computation-wise);
(b) multiplication by a partially uninitialized value in user code is
    a bad idea anyway.

Constant case must be handled because it appears from LLVM optimization of a
completely valid user code, as the test case in compiler-rt demonstrates.


git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@211092 91177308-0d34-0410-b5e6-96231b3b80d8
[ASan] Fix https://code.google.com/p/address-sanitizer/issues/detail?id=321 for time() and frexp()
Add a test for the frexp() interceptor.
Annotate the interceptors that may potentially corrupt stack IDs of freed buffers with FIXME comments.


git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@211153 91177308-0d34-0410-b5e6-96231b3b80d8
[msan] Handle X86 *.psad.* and *.pmadd.* intrinsics.


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


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


git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@211166 91177308-0d34-0410-b5e6-96231b3b80d8
Revert "[sanitizer] Intercept pthread_*attr_get*."

This reverts commit r211166. It broke public mac os x bots.

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

This is a resubmit of r211166 reverted due to osx breakage.


git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@211264 91177308-0d34-0410-b5e6-96231b3b80d8
Merge pull request #13 from llvm-mirror/master

git pull