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
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
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
Dmitry Vyukov
cd3583a4c7
tsan: include what you use
...
VPrintf uses common_flags()
llvm-svn: 202974
2014-03-05 13:40:05 +00:00
Alexey Samsonov
6dece3c99f
Add common interceptors for memchr/memrchr
...
llvm-svn: 202972
2014-03-05 13:25:32 +00:00
Alexey Samsonov
c8c38dbb18
Increase threshold in StackTrace::LocatePcInTrace
...
llvm-svn: 202950
2014-03-05 08:29:56 +00:00
Dmitry Vyukov
19126f9075
tsan: add interceptors for pthread_spinlock_t and ptread_rwlock_t for deadlock detector
...
llvm-svn: 202947
2014-03-05 08:10:27 +00:00
Dmitry Vyukov
30076b0244
tsan: add another missing windows atomic operation
...
llvm-svn: 202852
2014-03-04 14:21:42 +00:00
Dmitry Vyukov
0a650fe711
tsan: attempt to fix darwin build
...
everything except linux does not need this hackery with pthread_cond
llvm-svn: 202850
2014-03-04 14:16:28 +00:00
Alexey Samsonov
359c105c92
Fix StackTrace::LocatePcInTrace, add more unit tests for generic StackTrace
...
llvm-svn: 202849
2014-03-04 14:06:11 +00:00
Alexey Samsonov
d964e7cd81
[CMake] Test for libdl and libpthread presence
...
llvm-svn: 202847
2014-03-04 13:28:21 +00:00
Alexey Samsonov
3d9adc0a73
[ASan] Speed up stack trace unwinding for stacks of size 2.
...
Summary:
We don't need to do any work in this case - just take
the current PC and caller PC.
Reviewers: eugenis, ygribov
Reviewed By: eugenis
CC: llvm-commits
Differential Revision: http://llvm-reviews.chandlerc.com/D2936
llvm-svn: 202845
2014-03-04 13:12:25 +00:00
Dmitry Vyukov
d1d8653742
tsan: add dynamic library target for standalone deadlock detector
...
it's LD_PRELOAD-able
llvm-svn: 202843
2014-03-04 12:52:20 +00:00
Alexey Samsonov
3e8467b8b9
Avoid doing any work when unwinding stack traces with 0 or 1 frame
...
llvm-svn: 202837
2014-03-04 12:21:28 +00:00
Dmitry Vyukov
9e3a217adb
tsan: fix windows build
...
llvm-svn: 202831
2014-03-04 11:57:25 +00:00