[sanitizer] Fix build with _FILE_OFFSET_BITS=64.

Sanitizer source is not affected by _FILE_OFFSET_BITS in general,
but this one file must be built with 32-bit off_t. More details in the code.



git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@220328 91177308-0d34-0410-b5e6-96231b3b80d8
[msan] Handle param-tls overflow.

ParamTLS (shadow for function arguments) is of limited size. This change
makes all arguments that do not fit unpoisoned, and avoids writing
past the end of a TLS buffer.


git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@220351 91177308-0d34-0410-b5e6-96231b3b80d8
[tsan] add a stub of another dynamic annotation

git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@220369 91177308-0d34-0410-b5e6-96231b3b80d8
Change all of the build flags to switch /MD and /MDd into /MT, instead of just some of the targets. Fixes PR21241.

git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@220506 91177308-0d34-0410-b5e6-96231b3b80d8
Disabling some MSVC warnings that are of questionable value. Note, these are disabled by default in LLVM as well, so there is precedence.

C4146: 'unary minus operator applied to unsigned type, result still unsigned'
C4291: ''declaration' : no matching operator delete found; memory will not be freed if initialization throws an exception'
C4800: ''type' : forcing value to bool 'true' or 'false' (performance warning)'

git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@220507 91177308-0d34-0410-b5e6-96231b3b80d8
Do not set linker flags for MSVC; they are not the same thing as compiler flags. Note, this is already done in the add_compiler_rt_test test_suite function.

git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@220517 91177308-0d34-0410-b5e6-96231b3b80d8
Appeasing an MSVC compile warning about "and"; NFC.

git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@220519 91177308-0d34-0410-b5e6-96231b3b80d8
Cmake variables are global, which is why we would get crud like /machine:X86 in the list of compiler options for MSVC. Clear out the variable before attempting to enumerate arguments and set them.

git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@220522 91177308-0d34-0410-b5e6-96231b3b80d8
[sanitizer] Add a bunch of sanity checks.


git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@220528 91177308-0d34-0410-b5e6-96231b3b80d8
[Tsan] Fix the signal_recursive.cc test to build on FreeBSD
Differential Revision: http://reviews.llvm.org/D5841


git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@220550 91177308-0d34-0410-b5e6-96231b3b80d8
[Tsan] Intercept pthread_set_name_np on FreeBSD
Differential Revision: http://reviews.llvm.org/D5932


git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@220551 91177308-0d34-0410-b5e6-96231b3b80d8
[Tsan] Fix the thread_name tests to build on FreeBSD
Differential Revision: http://reviews.llvm.org/D5855


git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@220552 91177308-0d34-0410-b5e6-96231b3b80d8
[Tsan] Do not intercept non-FreeBSD functions on FreeBSD
Differential Revision: http://reviews.llvm.org/D5858


git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@220554 91177308-0d34-0410-b5e6-96231b3b80d8
tsan: support mmap(MAP_32BIT)
Allow user memory in the first TB of address space.
This also enabled non-pie binaries and freebsd.
Fixes issue:
https://code.google.com/p/thread-sanitizer/issues/detail?id=5



git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@220571 91177308-0d34-0410-b5e6-96231b3b80d8
Add runtime flag 'symbolize_inline_frames' to disable symbolization of inlined frames done in llvm-symbolizer

git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@220582 91177308-0d34-0410-b5e6-96231b3b80d8
builtins: avoid endian.h in favour of compiler builtins

Use the __BYTE_ORDER__ macro which has been available in GCC since 4.6 and is
available in clang as well.

git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@220626 91177308-0d34-0410-b5e6-96231b3b80d8
[Sanitizer] Make StackTrace a lightweight reference to array of PCs, and
introduce a BufferedStackTrace class, which owns this array.

Summary:
This change splits __sanitizer::StackTrace class into a lightweight
__sanitizer::StackTrace, which doesn't own array of PCs, and BufferedStackTrace,
which owns it. This would allow us to simplify the interface of StackDepot,
and eventually merge __sanitizer::StackTrace with __tsan::StackTrace.

Test Plan: regression test suite.

Reviewers: kcc, dvyukov

Reviewed By: dvyukov

Subscribers: llvm-commits

Differential Revision: http://reviews.llvm.org/D5985

git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@220635 91177308-0d34-0410-b5e6-96231b3b80d8
Fixup deadlock sanitizer after r220635

git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@220636 91177308-0d34-0410-b5e6-96231b3b80d8
Change StackDepot interface to use StackTrace more extensively

git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@220637 91177308-0d34-0410-b5e6-96231b3b80d8
Try to fix the Windows build after r220637

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