Dmitry Vyukov
318f77749e
tsan: add "as if synchronized via sleep" feature
...
llvm-svn: 163006
2012-08-31 17:27:49 +00:00
Dmitry Vyukov
179e5ddae1
tsan: fix windows build (2)
...
llvm-svn: 162997
2012-08-31 14:11:33 +00:00
Dmitry Vyukov
fa90fa357e
tsan: fix windows build (1)
...
llvm-svn: 162996
2012-08-31 14:01:33 +00:00
Dmitry Vyukov
bead8f1e3f
tsan: slightly optimize mutex unlock
...
llvm-svn: 162995
2012-08-31 13:42:28 +00:00
Dmitry Vyukov
6f6ba43271
tsan: more precise handling of atomic_store(memory_order_release)
...
llvm-svn: 162994
2012-08-31 13:22:13 +00:00
Dmitry Vyukov
ef8d1944b8
tsan: improve stack depot
...
llvm-svn: 162993
2012-08-31 12:47:44 +00:00
Kostya Serebryany
d19c8cb2cc
[tsan] locate the auxilary space for tsan's Allocator64 after the main region, not before. This simplifies the shadow mappings
...
llvm-svn: 162991
2012-08-31 12:41:00 +00:00
Alexey Samsonov
3222dad6e3
[Sanitizer] fix overloaded operator error
...
llvm-svn: 162990
2012-08-31 11:43:01 +00:00
Alexey Samsonov
fd0a6e6030
[compiler-rt] fixup for r162988 - remove accidentally commited file
...
llvm-svn: 162989
2012-08-31 11:13:38 +00:00
Alexey Samsonov
704f71616d
[compiler-rt] Move draft code for llvm-symbolizer to compiler-rt/utils/llvm-symbolizer after chandlerc's suggestion
...
llvm-svn: 162988
2012-08-31 11:12:10 +00:00
Alexey Samsonov
e70ed73d1f
[Sanitizer] Remove some calls to libc malloc from symbolizer
...
llvm-svn: 162987
2012-08-31 11:07:52 +00:00
Alexey Samsonov
329eae86ef
[Sanitizer] Resolve fixme: break dependency of sanitizer_common tests on TSan RTL
...
llvm-svn: 162984
2012-08-31 10:15:44 +00:00
Alexey Samsonov
79b36285ca
[Sanitizer] Make lint checking a standalone script in sanitizer_common
...
llvm-svn: 162982
2012-08-31 08:36:36 +00:00
Alexey Samsonov
de827cb42b
[Sanitizer] Remove lint checkers from our old makefiles in favor of buildbot
...
llvm-svn: 162981
2012-08-31 08:10:28 +00:00
Alexey Samsonov
66ca36a564
[TSan] Fix style warinings in output test
...
llvm-svn: 162980
2012-08-31 08:00:37 +00:00
Alexey Samsonov
c3a8119a41
Whitespace/lint
...
llvm-svn: 162909
2012-08-30 14:22:21 +00:00
Dmitry Vyukov
b244c46c66
tsan: speed up allocator64 GetBlockBegin()
...
llvm-svn: 162908
2012-08-30 13:55:43 +00:00
Dmitry Vyukov
7af8a3a83d
tsan: simplify TSAN_HISTORY_SIZE code
...
llvm-svn: 162905
2012-08-30 13:29:11 +00:00
Dmitry Vyukov
191f2f7cdb
tsan: use stack depot to describe heap blocks
...
llvm-svn: 162902
2012-08-30 13:02:30 +00:00
Dmitry Vyukov
f4792878c4
asan/tsan: first version of "stack depot"
...
llvm-svn: 162897
2012-08-30 10:02:48 +00:00
Alexey Samsonov
608a4b5def
[ASan] fix flakiness of Linux-specific clone_test: waitpid should better be provided with __WCLONE option, otherwise it didn't wait for the subprocess, returned -1, and we went crushing the subprocess stack
...
llvm-svn: 162842
2012-08-29 15:48:14 +00:00
Alexander Potapenko
5a9b616d6b
For invalid pointers passed to free_common check whether they are actually skewed to hold an additional CFAllocatorRef.
...
If so, fix the pointer and pass it to asan_free.
See http://code.google.com/p/address-sanitizer/issues/detail?id=70 for more background.
llvm-svn: 162839
2012-08-29 12:36:24 +00:00
Kostya Serebryany
d0d96bfb86
[asan/tsan] use InternalScopedBuffer instead of stack arrays. Use mmap inseted of InternalAlloc in InternalScopedBuffer
...
llvm-svn: 162834
2012-08-29 08:40:36 +00:00
Kostya Serebryany
4310fe35ea
[tsan] fix tsan's Makefile.old -- our build bot still uses it (hopefully, will soon migrate to cmake completely)
...
llvm-svn: 162832
2012-08-29 08:21:09 +00:00
Kostya Serebryany
e4d9c7b940
[asan] fix asan's Makefile.old -- our build bot still uses it (hopefully, will soon migrate to cmake completely)
...
llvm-svn: 162831
2012-08-29 08:06:27 +00:00
Chandler Carruth
1aa4fef601
Relocate the external headers provided by ASan and the common sanitizer
...
library.
These headers are intended to be available to user code when built with
AddressSanitizer (or one of the other sanitizer's in the future) to
interface with the runtime library. As such, they form stable external
C interfaces, and the headers shouldn't be located within the
implementation.
I've pulled them out into what seem like fairly obvious locations and
names, but I'm wide open to further bikeshedding of these names and
locations.
I've updated the code and the build system to cope with the new
locations, both CMake and Makefile. Please let me know if this breaks
anyone's build.
The eventual goal is to install these headers along side the Clang
builtin headers when we build the ASan runtime and install it. My
current thinking is to locate them at:
<prefix>/lib/clang/X.Y/include/sanitizer/common_interface_defs.h
<prefix>/lib/clang/X.Y/include/sanitizer/asan_interface.h
<prefix>/lib/clang/X.Y/include/sanitizer/...
But maybe others have different suggestions?
Fixing the style of the #include between these headers at least unblocks
experimentation with installing them as they now should work when
installed in these locations.
llvm-svn: 162822
2012-08-29 02:27:54 +00:00
Chandler Carruth
c1c9d5818f
Some flag cleanup for the sanitizer runtimes.
...
This hoists most of the CFLAGS into a common variable. It also adds
detection for -Wno-c99-extensions and uses it to silence a pile of
warnings.
Finally, it switches to the proper flag -rdynamic.
With this, the cmake build is warning free on my bootstrap Linux build.
llvm-svn: 162809
2012-08-29 00:13:11 +00:00
Kostya Serebryany
66a37f3aef
[asan] one more fix for windows build
...
llvm-svn: 162762
2012-08-28 15:25:07 +00:00
Kostya Serebryany
3a6af66a0e
[asan] fix the cmake build (hopefully)
...
llvm-svn: 162760
2012-08-28 14:48:28 +00:00
Kostya Serebryany
327d0a5666
[asan] actually doing 'svn add' helps
...
llvm-svn: 162759
2012-08-28 14:27:06 +00:00
Kostya Serebryany
27dcb2379f
[asan] fix Windows build
...
llvm-svn: 162758
2012-08-28 14:14:30 +00:00
Kostya Serebryany
7575968aa4
[asan] actually move StackTrace to sanitizer_common
...
llvm-svn: 162757
2012-08-28 14:11:57 +00:00
Kostya Serebryany
a57b4e823a
[asan] even more refactoring to move StackTrace to sanitizer_common
...
llvm-svn: 162754
2012-08-28 13:49:49 +00:00
Kostya Serebryany
ee92877f17
[asan] more refactoring to move StackTrace to sanitizer_common
...
llvm-svn: 162752
2012-08-28 13:25:55 +00:00
Alexey Samsonov
50e8a6a7df
[ASan] CMake build: share more compile flags between instrumented and non-instrumented tests
...
llvm-svn: 162750
2012-08-28 12:38:17 +00:00
Kostya Serebryany
ccc470c499
[asan] some renaming before we move StackTrace into sanitizer_common (part 2)
...
llvm-svn: 162748
2012-08-28 11:54:51 +00:00
Kostya Serebryany
6b0d775229
[asan] some renaming before we move StackTrace into sanitizer_common
...
llvm-svn: 162747
2012-08-28 11:54:30 +00:00
Kostya Serebryany
bb6f165952
[asan] get rid of AsanPrintf in favor of Printf from sanitizer_common
...
llvm-svn: 162746
2012-08-28 11:34:40 +00:00
Kostya Serebryany
4bfe954d14
[asan] improve SetErrorReportCallbackTest to actually catch missing functionality in __asan_set_error_report_callback
...
llvm-svn: 162745
2012-08-28 11:21:01 +00:00
Alexey Samsonov
384de7c9c9
[Sanitizer] Allow to create stub MemoryMappingLayout on Windows
...
llvm-svn: 162742
2012-08-28 08:27:08 +00:00
Alexey Samsonov
cae486c063
[Sanitizer] One more method stub for Windows
...
llvm-svn: 162739
2012-08-28 07:22:24 +00:00
Alexey Samsonov
d1d1a814b7
[Sanitizer] align allocation sizes in low level allocator
...
llvm-svn: 162676
2012-08-27 14:51:36 +00:00
Evgeniy Stepanov
f72f08affc
CMake build rules for ASan/Android runtime.
...
llvm-svn: 162675
2012-08-27 14:28:27 +00:00
Alexey Samsonov
28d8be2d86
[Sanitizer] One more try to fix Windows build
...
llvm-svn: 162674
2012-08-27 14:08:53 +00:00
Alexey Samsonov
e67a5dd8e1
[Sanitizer] Use low-level allocator in flag parsing to avoid calling malloc() before ASan/TSan initialization is done
...
llvm-svn: 162673
2012-08-27 14:04:54 +00:00
Alexey Samsonov
cc62211fbf
[Sanitizer] Rename ProcessMaps to MemoryMappingLayout and fix Windows build by providing stub implementation
...
llvm-svn: 162671
2012-08-27 13:48:48 +00:00
Alexey Samsonov
c74289db2b
[ASan] add missing build dependency on sanitizer_common headers
...
llvm-svn: 162670
2012-08-27 13:47:28 +00:00
Evgeniy Stepanov
be01398612
A few tweaks for building ASanRT against Android NDK.
...
llvm-svn: 162666
2012-08-27 11:15:55 +00:00
Alexey Samsonov
dc8d1f1039
[Sanitizer] move low-level (mmap-based) allocator to sanitizer_common
...
llvm-svn: 162663
2012-08-27 09:30:58 +00:00
Dmitry Vyukov
7d3d94454c
tsan: improve memory allocator a bit
...
llvm-svn: 162561
2012-08-24 15:53:14 +00:00