Kostya Serebryany
5c0171b811
[sanitizer] a bit more informative deadlock detector report (still lots to improve)
...
llvm-svn: 204115
2014-03-18 05:56:14 +00:00
Duncan P. N. Exon Smith
1373630bc4
Reapply "PGO: Statically generate data structures"
...
Reapply r204079 and r204083, this time with stubs for fputc in
compiler-rt.
llvm-svn: 204091
2014-03-17 23:44:56 +00:00
Duncan P. N. Exon Smith
ffdfaa6908
Revert r204079, r204083 and r204084 "PGO: Statically generate data structures"
...
Buildbots are having trouble finding fputc(), and I can't figure out
why. Reverting to investigate.
llvm-svn: 204088
2014-03-17 23:28:41 +00:00
Duncan P. N. Exon Smith
054f8708b5
Switch from fputc to putc to fix r204079?
...
llvm-svn: 204084
2014-03-17 22:20:58 +00:00
Duncan P. N. Exon Smith
58d2637f2a
Rename __ProfileData to __llvm_pgo_data
...
<rdar://problem/15943240>
llvm-svn: 204083
2014-03-17 22:08:05 +00:00
Duncan P. N. Exon Smith
77a88e3064
PGO: Statically generate data structures
...
In instrumentation-based profiling, we need a set of data structures to
represent the counters. Previously, these were built up during static
initialization. Now, they're shoved into a specially-named section so
that they show up as an array.
As a consequence of the reorganizing symbols, instrumentation data
structures for linkonce functions are now correctly coalesced.
This is the first step in a larger project to minimize runtime overhead
and dependencies in instrumentation-based profilng. The larger picture
includes removing all initialization overhead and making the dependency
on libc optional.
<rdar://problem/15943240>
llvm-svn: 204079
2014-03-17 21:18:24 +00:00
Kostya Serebryany
e7846206e8
[sanitizer] fix the deadlock detector build
...
llvm-svn: 204044
2014-03-17 15:16:25 +00:00
Kostya Serebryany
f01c094cdd
[sanitizer] reverse the order of the stack traces printed for every pair of locks in the deadlock report (first print the 'from' node, then print the 'to' node of the deadlock graph)
...
llvm-svn: 204043
2014-03-17 14:56:04 +00:00
Kostya Serebryany
8976539627
[sanitizer] make the deadlock detector print 2*N stack traces on lock-order-inversion with N locks (i.e. print stack traces for both lock acquisitions in every edge in the graph). More improvements to follow
...
llvm-svn: 204042
2014-03-17 14:41:36 +00:00
Kostya Serebryany
a0eb97a50b
[sanitizer] allow to store the lock context (stack trace id) with all currently held locks in a thread. This will allow the deadlock detector to provide better warnings (more changes to go)
...
llvm-svn: 204039
2014-03-17 12:27:42 +00:00
Kostya Serebryany
bd7563eee2
[tsan] fox the GO build
...
llvm-svn: 204037
2014-03-17 10:37:44 +00:00
Kostya Serebryany
779ccf3b2c
[sanitizer] one more output test for the deadlock detector
...
llvm-svn: 204036
2014-03-17 09:32:48 +00:00
Kostya Serebryany
b9cb473fb8
[sanitizer] fix build warnings; add an output test for the deadlock detecor
...
llvm-svn: 204035
2014-03-17 09:21:41 +00:00
Kostya Serebryany
d674e6bdde
[sanitizer] print more stack traces when reporting a deadlock (even more to come)
...
llvm-svn: 204034
2014-03-17 09:07:24 +00:00
Dmitry Vyukov
3b37e8bf18
tsan: yet another attempt to fix pthread_cond interceptors
...
Make behavior introduced in r202820 conditional (under legacy_pthread_cond flag).
The new issue that we've hit with the satellite pthread_cond_t struct is
that pthread_condattr_getpshared does not work (satellite data is not shared between processes).
The idea is that most processes do not use pthread 2.2.5.
The rare ones that use (2.2.5 is dated by 2002) must specify legacy_pthread_cond=1
on their own risk.
llvm-svn: 204032
2014-03-17 07:51:53 +00:00
Kostya Serebryany
c98564c3aa
[sanitizer] make real_pthread_attr_getstack extern "C"
...
llvm-svn: 204029
2014-03-17 05:00:35 +00:00
Alexander Potapenko
b76ea32834
[ASan] Fix https://code.google.com/p/address-sanitizer/issues/detail?id=274
...
by ignoring globals from __TEXT,__cstring,cstring_literals during instrumenation.
Add a regression test.
llvm-svn: 203916
2014-03-14 10:41:49 +00:00
Alexander Potapenko
9c97e0de24
[ASan] Remove the unneeded ASAN_RUNTIME_LDFLAGS.
...
llvm-svn: 203913
2014-03-14 10:16:59 +00:00
Alexey Samsonov
7a3d806c31
[CMake] Add trailing newline to test source file to make sure -Wnewline-eof doesn't fire
...
llvm-svn: 203911
2014-03-14 09:22:29 +00:00
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