Commit Graph

3731 Commits

Author SHA1 Message Date
Kostya Serebryany 8ecd7a2171 [sanitizer] fully implement racy fast path in bitset-based deadlock detector
llvm-svn: 203910
2014-03-14 09:22:01 +00:00
Kostya Serebryany 61a0f1c564 [sanitizer] partially implement racy fast path in bitset-based deadlock detector
llvm-svn: 203904
2014-03-14 08:06:15 +00:00
Kostya Serebryany c067864b6f [sanitizer] in bitset-based deadlock detector collect edge's stack trace when an edge is added to the graph (in following CLs these stack traces will be added to the report)
llvm-svn: 203902
2014-03-14 07:09:01 +00:00
Alexey Samsonov cbc68521b3 [CMake] More fixes for Windows build
llvm-svn: 203798
2014-03-13 13:37:07 +00:00
Kostya Serebryany 65dbf46950 [sanitizer] in bitvector-based deadlock detector split onLock into onLockBefore and onLockAfter hooks
llvm-svn: 203796
2014-03-13 13:21:30 +00:00
Evgeniy Stepanov 9fa9a49853 [msan] Test for aggregates passing through ellipsis.
llvm-svn: 203795
2014-03-13 13:18:15 +00:00
Alexey Samsonov 13f21af177 [TSan] Hide message about re-execing under verbosity flag
llvm-svn: 203793
2014-03-13 13:14:19 +00:00
Alexey Samsonov f97f07b1b8 [CMake] Attempt to fix standalone compiler-rt build on Windows
llvm-svn: 203789
2014-03-13 11:55:27 +00:00
Alexey Samsonov fe7e28c41f [CMake] Use /W3 instead of -Wall on Windows. Remove add_definitions abuse.
llvm-svn: 203786
2014-03-13 11:31:10 +00:00
Dmitry Vyukov a02fac7bec tsan: update the test since the bug is fixed
http://llvm.org/bugs/show_bug.cgi?id=19113 is fixed, so enable the better CHECK

llvm-svn: 203784
2014-03-13 10:54:16 +00:00
Timur Iskhodzhanov 28bc2f7a14 Work around PR19125: -Wconstant-logical-operand false positive
llvm-svn: 203782
2014-03-13 10:43:02 +00:00
Kostya Serebryany de3f20cf4b [sanitizer] support recursive rwlocks in bitset-based deadlock detector
llvm-svn: 203779
2014-03-13 10:26:03 +00:00
Timur Iskhodzhanov 5c40cc3549 Disable fast shadow zero'ing on Windows
llvm-svn: 203778
2014-03-13 10:15:10 +00:00
Timur Iskhodzhanov e8bd672d31 FastPoisonShadow: check for MmapFixedNoReserve failures
llvm-svn: 203776
2014-03-13 10:08:45 +00:00
Alexey Samsonov 32956d651a [CMake] Make append_if semantics similar to those used in LLVM
llvm-svn: 203773
2014-03-13 09:31:36 +00:00
Joerg Sonnenberger 361a553ace Preserve constness for intermediate pointers.
llvm-svn: 203743
2014-03-13 00:44:37 +00:00
Justin Bogner 8b77f351a8 Revert "profile: Use a simple binary format for profiling"
This will break without the corresponding change in clang, which I've
reverted until I figure out how to get it to link properly.

This reverts commit r203710.

llvm-svn: 203713
2014-03-12 21:07:26 +00:00
Justin Bogner ac7c599254 profile: Use a simple binary format for profiling
llvm-svn: 203710
2014-03-12 20:52:34 +00:00
Daniel Sanders f90e78a48d Implement Android versions of __clear_cache for arm32 & mips.
The MIPS version was reviewed by myself. The ARM version was reviewed by JF
Bastien.

Patch by Narayan Kamath <narayan@google.com>.

llvm-svn: 203674
2014-03-12 16:38:27 +00:00
Dmitry Vyukov 22196e777c tsan: fix deadlock in deadlock detector
forget to unlock a mutex on one of the paths

llvm-svn: 203663
2014-03-12 14:55:20 +00:00
Timur Iskhodzhanov c3687e7bf3 Fix MSVS warnings in the sanitizers RTL
llvm-svn: 203661
2014-03-12 14:09:25 +00:00
Viktor Kutuzov ebb00e1553 Add FreeBSD 9.2 support to asan_linux.cc
llvm-svn: 203658
2014-03-12 12:44:36 +00:00
Dmitry Vyukov 8c0f86e307 tsan: fix handling of pthread_cond_wait in presence of pthread_cancel
if the thread is cancelled in pthread_cond_wait, it locks the mutex before
processing pthread_cleanup stack
but tsan was missing that, thus reporting false double-lock/wrong-unlock errors
see the test for details

llvm-svn: 203648
2014-03-12 09:48:14 +00:00
Dmitry Vyukov 4076b3481a tsan: add interceptors for fopen64, freopen64, tmpfile, tmpfile64
llvm-svn: 203647
2014-03-12 08:26:43 +00:00
Dmitry Vyukov 47fd6179b1 tsan: add disabled test for http://llvm.org/bugs/show_bug.cgi?id=19113
llvm-svn: 203646
2014-03-12 08:24:49 +00:00
Hans Wennborg 9f74f15682 Revert "[asan] Make __cxa_demangle non-weak symbol on Android."
stlport doesn't include __cxa_demangle.

This reverts r201545.

llvm-svn: 203601
2014-03-11 20:23:59 +00:00
Alexander Potapenko a0c5a6763a [ASan] Don't build the ASan runtime with -undefined dynamic_lookup, which isn't necessary anymore.
Fixes https://code.google.com/p/address-sanitizer/issues/detail?id=266.

llvm-svn: 203572
2014-03-11 14:04:09 +00:00
Evgeniy Stepanov 14cd8e900f [sanitizer] Fix a typo.
llvm-svn: 203568
2014-03-11 13:35:41 +00:00
Viktor Kutuzov f31e53661f A fix for platform-dependent types in sanitizers' profiling support lib on x64 FreeBSD in 32-bit mode
llvm-svn: 203470
2014-03-10 16:50:53 +00:00
Tim Northover 65fe9377f0 ARM: fix file's header comment
llvm-svn: 203247
2014-03-07 14:56:29 +00:00
Alexey Samsonov 18adbc361a Remove sanitizer_linux_libcdep.cc from TSan-Go build
llvm-svn: 203238
2014-03-07 13:17:32 +00:00
Alexey Samsonov f3f3b9e5b6 [FreeBSD] Add support for sanitizer_linux_libcdep.cc
Patch by Viktor Kutuzov!

llvm-svn: 203235
2014-03-07 11:47:32 +00:00
Alexey Samsonov 78a6d2073f [FreeBSD] Port sanitizers' syscalls.
Patch by Viktor Kutuzov!

llvm-svn: 203227
2014-03-07 10:03:54 +00:00
Dmitry Vyukov f852f08fb1 tsan: fix pthread_cond_destroy interceptor on android
llvm-svn: 203226
2014-03-07 10:01:16 +00:00
Alexey Samsonov fefeecc7b0 [ASan] Better way to disable tests for functions unavailable on certain platforms
llvm-svn: 203224
2014-03-07 09:39:01 +00:00
Dmitry Vyukov dd419aee00 tsan: update Go windows build script
llvm-svn: 203121
2014-03-06 14:49:21 +00:00
Evgeniy Stepanov 72a9d25060 [sanitizer] Simplify interceptors with user callbacks.
Get rid of the context argument in UNPOISON_PARAM and INITIALIZE_RANGE.
Get rid of all the thread-local contexts in interceptors.

llvm-svn: 203119
2014-03-06 13:26:09 +00:00
Dmitry Vyukov 350e7ddd34 tsan: update interface for Go
this is required to fix:
https://code.google.com/p/go/issues/detail?id=7460

llvm-svn: 203116
2014-03-06 13:17:28 +00:00
Alexey Samsonov 4a7e96e642 [CMake] Build compiler-rt libraries with -Wall
llvm-svn: 203113
2014-03-06 12:25:02 +00:00
Dmitry Vyukov 2516974e83 tsan: weaken concurrency guarantees in deadlock detector mutex hashmap
read locking on every access is too expensive

llvm-svn: 203112
2014-03-06 12:04:26 +00:00
Dmitry Vyukov 119aa0ea7c tsan: add -ftls-model=initial-exec to deadlock detector flags
one way or another it must present in the process from the beginning

llvm-svn: 203111
2014-03-06 12:03:39 +00:00
Dmitry Vyukov 69bd9ca91c tsan: better error message wording in deadlock reports
llvm-svn: 203109
2014-03-06 12:02:17 +00:00
Alexey Samsonov 5ec35b75ef [FreeBSD] Provide FreeBSD-specific things for ASan.
Patch by Viktor Kutuzov!

llvm-svn: 203100
2014-03-06 09:05:52 +00:00
Alexey Samsonov d52b9ba38d [FreeBSD] Enable procmaps on FreeBSD.
This is not the final patch for procmaps, but it's enough for building
sanitizers and tests on FreeBSD.

Patch by Viktor Kutuzov!

llvm-svn: 203099
2014-03-06 08:58:24 +00:00
Alexey Samsonov 921f5a529e asan_symbolize.py: use llvm-symbolizer results even if it returned function name w/o file/line info
llvm-svn: 202983
2014-03-05 15:18:50 +00:00
Alexey Samsonov 8ad7a05bb4 Improve llvm-symbolizer discovery in asan_symbolize.py
llvm-svn: 202982
2014-03-05 15:00:36 +00:00
Alexey Samsonov e062e4c7eb Enable memrchr interceptor only on Linux
llvm-svn: 202981
2014-03-05 14:07:19 +00:00
Dmitry Vyukov 792d4b1559 tsan: add missing header file to sanitizer_common cmake file
llvm-svn: 202979
2014-03-05 13:55:32 +00:00
Dmitry Vyukov e73e0a04d7 tsan: fix deadlock detector build for SANITIZER_DEADLOCK_DETECTOR_VERSION=2
llvm-svn: 202977
2014-03-05 13:53:29 +00:00
Dmitry Vyukov 9b410fb627 tsan: implement new version of standalong deadlock detector
intercept pthread_cond (it is required to properly track state of mutexes)
detect cycles in mutex graph

llvm-svn: 202975
2014-03-05 13:41:21 +00:00