[asan] run-time part of the caller-callee coverage instrumentation

git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@220975 91177308-0d34-0410-b5e6-96231b3b80d8
[asan] increase the initial buffer size in caller-callee dumper

git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@220991 91177308-0d34-0410-b5e6-96231b3b80d8
[TSan] Fix signed-compare warning in the unit test

git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@221190 91177308-0d34-0410-b5e6-96231b3b80d8
[TSan} Build Go version with -std=c++11

git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@221192 91177308-0d34-0410-b5e6-96231b3b80d8
[TSan] Use StackTrace from sanitizer_common where applicable

Summary:
This change removes `__tsan::StackTrace` class. There are
now three alternatives:
  # Lightweight `__sanitizer::StackTrace`, which doesn't own a buffer
  of PCs. It is used in functions that need stack traces in read-only
  mode, and helps to prevent unnecessary allocations/copies (e.g.
  for StackTraces fetched from StackDepot).
  # `__sanitizer::BufferedStackTrace`, which stores buffer of PCs in
  a constant array. It is used in TraceHeader (non-Go version)
  # `__tsan::VarSizeStackTrace`, which owns buffer of PCs, dynamically
  allocated via TSan internal allocator.

Test Plan: compiler-rt test suite

Reviewers: dvyukov, kcc

Reviewed By: kcc

Subscribers: llvm-commits, kcc

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

git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@221194 91177308-0d34-0410-b5e6-96231b3b80d8
[TSan] Remove bogus unused global variables

git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@221195 91177308-0d34-0410-b5e6-96231b3b80d8
[TSan] Don't strip binary/library name until the moment we print it.

This commit changes the place where TSan runtime turns full path
to binary or shared library into its basename
(/usr/foo/mybinary -> mybinary). Instead of doing it as early as possible
(when we obtained the full path from the symbolizer), we now do it as
late as possible (right before printing the error report).

This seems like a right thing to do - stripping to basename is a detail
of report formatting implementation, and should belong there. Also, we
might need the full path at some point - for example, to match the
suppressions.


git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@221225 91177308-0d34-0410-b5e6-96231b3b80d8
Use @rpath as LC_ID_DYLIB for ASan dylib on OS X

Change the LC_ID_DYLIB of ASan's dynamic libraries on OS X to be set to "@rpath/libclang_rt.asan_osx_dynamic.dylib" and similarly for iossim. Clang driver then sets the "-rpath" to be the real path to where clang currently has the dylib (because clang uses the relative path to its current executable). This means if you move the compiler or install the binary release, -fsanitize=address will link to the proper library.

Reviewed at http://reviews.llvm.org/D6018




git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@221278 91177308-0d34-0410-b5e6-96231b3b80d8
Merge branch 'master', remote-tracking branch 'trunk/master'