[asan] convert a CHECK failure in __sanitizer_annotate_contiguous_container into a proper warning message

git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@197899 91177308-0d34-0410-b5e6-96231b3b80d8
[asan] clean up at the end of the shmget/shmctl test

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



git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@197965 91177308-0d34-0410-b5e6-96231b3b80d8
[lsan] Make the report_objects flag more useful.

Print the list of leaked objects after each leak report. Previously we
printed only a joint list of all leaked objects. As a bonus, suppressed objects
are no longer reported.

git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@197977 91177308-0d34-0410-b5e6-96231b3b80d8
[lsan] Refactor the LeakReport class.

Those methods were too damn bloated.

git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@197978 91177308-0d34-0410-b5e6-96231b3b80d8
tsan: remove in_rtl counter

This is intended to address the following problem.
Episodically we see CHECK-failures when recursive interceptors call back into user code. Effectively we are not "in_rtl" at this point, but it's very complicated and fragile to properly maintain in_rtl property. Instead get rid of it. It was used mostly for sanity CHECKs, which basically never uncover real problems.
Instead introduce ignore_interceptors flag, which is used in very few narrow places to disable recursive interceptors (e.g. during runtime initialization).



git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@197979 91177308-0d34-0410-b5e6-96231b3b80d8
tsan: fix false positive in pthread stack manupulation
pthread uses internal cache, we do not see synchronization in it



git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@197982 91177308-0d34-0410-b5e6-96231b3b80d8
[Sanitizer] Replace Symbolizer::IsAvailable and Symbolizer::IsExternalAvailable with Symbolizer::CanReturnFileLineInfo.
Remove now redundant checks in symbolizer initialization in TSan and MSan.


git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@198000 91177308-0d34-0410-b5e6-96231b3b80d8
[Sanitizer] Move OS-specific code for MemoryMappingLayout into separate source files.

git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@198003 91177308-0d34-0410-b5e6-96231b3b80d8
[Sanitizer] Teach MemoryMappingLayout to dump all loaded modules.

Use this to implement GetListOfModules() on Mac and on Android
(on Linux we use dl_iterate_phdr).


git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@198004 91177308-0d34-0410-b5e6-96231b3b80d8
[TSan] fix Go build

git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@198005 91177308-0d34-0410-b5e6-96231b3b80d8
[Sanitizer] Don't use MemoryMappingLayout in StackTrace::PrintStack - it is now a responsibility of Symbolizer class.

git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@198006 91177308-0d34-0410-b5e6-96231b3b80d8
[Sanitizer] Properly specify linux-only unit test.

git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@198007 91177308-0d34-0410-b5e6-96231b3b80d8
[Sanitizer] Use different MemoryMappingLayout::DumpListOfModules on Linux and Mac.

Make a unit test added in r198004 more robust.


git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@198012 91177308-0d34-0410-b5e6-96231b3b80d8
[Sanitizer] Remove now unused symbolization functionality from MemoryMappingLayout

git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@198014 91177308-0d34-0410-b5e6-96231b3b80d8
[ASan] Make sure none of the __asan_gen_ global strings end up in the symbol table, add a test.

This should fix http://llvm.org/bugs/show_bug.cgi?id=17976
Another test checking for the global variables' locations and prefixes on Darwin will be committed separately.



git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@198017 91177308-0d34-0410-b5e6-96231b3b80d8
[ASan] Fix the test for __asan_gen_ globals and actually fix http://llvm.org/bugs/show_bug.cgi?id=17976
by setting the correct linkage (as stated in the bug).


git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@198018 91177308-0d34-0410-b5e6-96231b3b80d8
[lsan] Minor code health stuff.

- introduce logging macros
- fix incorrect vector construction

git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@198021 91177308-0d34-0410-b5e6-96231b3b80d8
[ASan] Add a test for __asan_gen_ globals labels on Darwin.

Per Nick Kledzik (http://llvm.org/bugs/show_bug.cgi?id=17976):
"""
For MacOSX, the labels in __cstring section should be 'L' labels, and the labels
in the __const section should be non-L or 'l' labels.  The later ('l') will cause
the linker to remove the label in the final executable.
"""

, so we need to ensure that the globals emitted by ASan have appropriate labels.


git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@198022 91177308-0d34-0410-b5e6-96231b3b80d8
[Sanitizer] Add Symbolizer::GetModuleNameAndOffsetForPC() and use it in LSan suppression matching.

This allows us to avoid retrieving file/line info for suppressed modules.


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