Evgeniy Stepanov
a0aa0f41d1
[sanitizer] Require that options end with '='.
...
llvm-svn: 209814
2014-05-29 14:32:32 +00:00
Dmitry Vyukov
65dce1e4f7
tsan: write memory profile in one line (which is much more readable)
...
e.g.:
RSS 420 MB: shadow:35 meta:231 file:2 mmap:129 trace:19 heap:0 other:0 nthr=1/31
RSS 365 MB: shadow:3 meta:231 file:2 mmap:106 trace:19 heap:0 other:0 nthr=1/31
RSS 429 MB: shadow:23 meta:234 file:2 mmap:143 trace:19 heap:6 other:0 nthr=1/31
RSS 509 MB: shadow:78 meta:241 file:2 mmap:147 trace:19 heap:19 other:0 nthr=1/31
llvm-svn: 209813
2014-05-29 14:11:38 +00:00
Dmitry Vyukov
ef5f26bf19
tsan: allow to write memory profile to stdout/stderr
...
llvm-svn: 209811
2014-05-29 14:02:06 +00:00
Dmitry Vyukov
bde4c9c773
tsan: refactor storage of meta information for heap blocks and sync objects
...
The new storage (MetaMap) is based on direct shadow (instead of a hashmap + per-block lists).
This solves a number of problems:
- eliminates quadratic behaviour in SyncTab::GetAndLock (https://code.google.com/p/thread-sanitizer/issues/detail?id=26 )
- eliminates contention in SyncTab
- eliminates contention in internal allocator during allocation of sync objects
- removes a bunch of ad-hoc code in java interface
- reduces java shadow from 2x to 1/2x
- allows to memorize heap block meta info for Java and Go
- allows to cleanup sync object meta info for Go
- which in turn enabled deadlock detector for Go
llvm-svn: 209810
2014-05-29 13:50:54 +00:00
Viktor Kutuzov
9cd9b4ce0c
Support getting executable's name for sanitizers needs on FreeBSD
...
llvm-svn: 209805
2014-05-29 12:12:42 +00:00
Viktor Kutuzov
76d35f47d3
Fix building 32-bit common sanitizer tests on FreeBSD 9.2
...
llvm-svn: 209804
2014-05-29 11:35:05 +00:00
Joerg Sonnenberger
fee19280b8
Add __extenddftf2 and __extendsftf2 for IEEE quad precision.
...
Patch by: GuanHong Liu
Differential Revision: http://reviews.llvm.org/D2802
llvm-svn: 209783
2014-05-29 01:00:39 +00:00
Joerg Sonnenberger
5038cb2963
Implement __trunctfdf2 and __trunctfsf2 for IEEE quad precision.
...
Patch by: GuanHong Liu
Differential Revision: http://reviews.llvm.org/D2803
llvm-svn: 209782
2014-05-29 00:58:27 +00:00
Joerg Sonnenberger
7610e8c822
Refactor extendsfdf2.
...
Patch by: GuanHong Liu
Differential Revision: http://reviews.llvm.org/D3887
llvm-svn: 209781
2014-05-29 00:54:26 +00:00
Joerg Sonnenberger
304a36b5fc
Refactor truncdfsf2.
...
Patch by: GuanHong Liu
Differential Revision: http://reviews.llvm.org/D3888
llvm-svn: 209779
2014-05-29 00:49:57 +00:00
Greg Fitzgerald
cd1a131c61
Moved the builtins documentation to lib/builtins/
...
And fixed typos in the ASan readme.
Differential Revision: http://reviews.llvm.org/D3927
llvm-svn: 209778
2014-05-28 23:09:45 +00:00
Alexey Samsonov
5bcd1d8a8f
[Sanitizer] Always prefer cached contents of /proc/self/exe if it's available
...
llvm-svn: 209773
2014-05-28 21:23:53 +00:00
Dmitry Vyukov
a43e98cc74
tsan: refactor suppressions machinery
...
The refactoring makes suppressions more flexible
and allow to suppress based on arbitrary number of stacks.
In particular it fixes:
https://code.google.com/p/thread-sanitizer/issues/detail?id=64
"Make it possible to suppress deadlock reports by any stack (not just first)"
llvm-svn: 209757
2014-05-28 18:03:32 +00:00
Dmitry Vyukov
5864ac39ee
tsan: do not use 64-bit atomics in allocator code
...
64-bit atomics make porting of asan to 32-bits platforms problematic.
llvm-svn: 209744
2014-05-28 15:22:12 +00:00
Joerg Sonnenberger
6269913bdd
Refactor muldf3 and mulsf3.
...
Patch from: GuanHong Liu
Differential Revision: http://reviews.llvm.org/D3886
llvm-svn: 209741
2014-05-28 15:08:05 +00:00
Joerg Sonnenberger
d21cd147d0
Refactor addsf3.c and adddf3.c.
...
Differential Revision: http://reviews.llvm.org/D3885
llvm-svn: 209740
2014-05-28 15:06:25 +00:00
Timur Iskhodzhanov
82ee0433da
[ASan/Win] Use clang rather than clang-cl by default for lit tests. Make Windows-only tests explicitly use clang-cl.
...
Reviewed at http://reviews.llvm.org/D3893
llvm-svn: 209719
2014-05-28 08:38:13 +00:00
Evgeniy Stepanov
d74bdccafe
[asan] Add a dll thunk for __sanitizer_cov_module_init.
...
llvm-svn: 209718
2014-05-28 08:34:53 +00:00
Evgeniy Stepanov
a00ff194b7
[asan] Add a few stubs to fix windows build.
...
llvm-svn: 209717
2014-05-28 08:26:24 +00:00
Evgeniy Stepanov
de9467593a
[tsan] Fix tsango build.
...
llvm-svn: 209658
2014-05-27 14:18:43 +00:00
Evgeniy Stepanov
360c911872
[asan] Disable dlopen interceptor on Android.
...
It can not work, as libdl is always first in the lookup order,
even ahead of LD_PRELOAD-ed libraries.
llvm-svn: 209657
2014-05-27 14:14:03 +00:00
Evgeniy Stepanov
567e516015
[asancov] Write coverage directly to a memory-mapped file.
...
This way does not require a __sanitizer_cov_dump() call. That's
important on Android, where apps can be killed at arbitrary time.
We write raw PCs to disk instead of module offsets; we also write
memory layout to a separate file. This increases dump size by the
factor of 2 on 64-bit systems.
llvm-svn: 209653
2014-05-27 12:37:52 +00:00
Greg Fitzgerald
7b15cf8884
On AArch64, use clone() instead of fork()
...
Patch by Gideon Billings.
Differential Revision: http://reviews.llvm.org/D3903
llvm-svn: 209641
2014-05-26 23:44:55 +00:00
Sergey Matveev
a531058d2b
[MSan] Implement __sanitizer_print_stack_trace().
...
llvm-svn: 209625
2014-05-26 13:08:08 +00:00
Sergey Matveev
2be4a28297
[sanitizer] Make stack traces from dlclose()'d modules more meaningful.
...
Previously, they silently omitted PCs belonging to unknown modules. Now we print
(<unknown module>) instead.
llvm-svn: 209522
2014-05-23 16:04:41 +00:00
Kostya Serebryany
a72efdff9e
[ubsan] handle long double in 32-bit mode; part of the patch by Marek Polacek
...
llvm-svn: 209516
2014-05-23 14:45:13 +00:00
Kostya Serebryany
e1e9a4e2ec
[asan] fix a test following r209508
...
llvm-svn: 209509
2014-05-23 11:52:38 +00:00
Alexey Samsonov
958a59b777
[TSan] ifdef out certain functions if 128-bit ints are not supported.
...
llvm-svn: 209476
2014-05-22 22:02:38 +00:00
Alexey Samsonov
00997e29e5
Unify the name of compiler-rt builtins library on Linux.
...
Call it "libclang_rt.builtins-<arch>.a" to be consistent
with sanitizers/profile libraries naming. Modify Makefile
and CMake build systems and Clang driver accordingly.
Fixes PR19822.
llvm-svn: 209473
2014-05-22 21:12:43 +00:00
Kostya Serebryany
e31d5b6a2c
[asan] relax the test for long double
...
llvm-svn: 209445
2014-05-22 14:50:14 +00:00
Timur Iskhodzhanov
b2eb3131f4
[ASan/Win] Make sure the list of wrappers exported by the main module and imported by the DLL thunk always matches
...
llvm-svn: 209444
2014-05-22 14:49:56 +00:00
Timur Iskhodzhanov
8ff177ede3
[ASan/Win] Thread more library functions from the DLL thunk to the main module
...
llvm-svn: 209441
2014-05-22 13:57:22 +00:00
Timur Iskhodzhanov
0c7c78f1d1
[ASan/Win] Use the new function interception approach to handle function wrappers too; wrap strlen() in DLLs
...
Reviewed at http://reviews.llvm.org/D3871
llvm-svn: 209427
2014-05-22 12:03:40 +00:00
Timur Iskhodzhanov
94ffc5bc12
[ASan/Win] Don't use INTERCEPTOR_ATTRIBUTE for operator new/delete on Windows
...
Reviewed at http://reviews.llvm.org/D3870
llvm-svn: 209416
2014-05-22 11:31:21 +00:00
Timur Iskhodzhanov
818b2e8f71
[ASan/Win] Add a comment about DCL-using-static vs threads
...
llvm-svn: 209414
2014-05-22 10:24:48 +00:00
Sergey Matveev
83f91e786c
[sanitizer] Add __sanitizer_maybe_open_cov_file().
...
Summary: Add a new interface function required for coverage sandboxing support.
llvm-svn: 209298
2014-05-21 13:43:52 +00:00
Evgeniy Stepanov
bce21acf25
[msan] Implement MSAN_OPTIONS=print_stats=1.
...
llvm-svn: 209287
2014-05-21 09:56:28 +00:00
Evgeniy Stepanov
f77f2ece71
[tsan] Fix gotsan build.
...
llvm-svn: 209286
2014-05-21 09:42:56 +00:00
Evgeniy Stepanov
208aae8ee0
[msan] Chained origins re-design.
...
Generalize StackDepot and create a new specialized instance of it to
efficiently (i.e. without duplicating stack trace data) store the
origin history tree.
This reduces memory usage for chained origins roughly by an order of
magnitude.
Most importantly, this new design allows us to put two limits on
stored history data (exposed in MSAN_OPTIONS) that help avoid
exponential growth in used memory on certain workloads.
See comments in lib/msan/msan_origin.h for more details.
llvm-svn: 209284
2014-05-21 09:02:13 +00:00
Kostya Serebryany
e88161626f
[lsan] disable lsan if wordsize is not 64
...
llvm-svn: 209283
2014-05-21 08:30:18 +00:00
Evgeniy Stepanov
687933f55d
[asan] Fix x86 asm instrumentation to preserve flags.
...
This change also enables asm instrumentation in asan tests that was
accidentally disabled yearlier, and adds a sanity test for that.
Patch by Yuri Gorshenin.
llvm-svn: 209282
2014-05-21 08:21:14 +00:00
Kostya Serebryany
b9aa538db1
[sanitizer] fix linux_dirent for SANITIZER_X32; based on patch by H.J. Lu
...
llvm-svn: 209281
2014-05-21 08:21:13 +00:00
Kostya Serebryany
b4e24fccd1
[sanitizer] define SANITIZER_X32 and use it in ThreadDescriptorSize; partially based on patch by H.J. Lu
...
llvm-svn: 209279
2014-05-21 08:01:44 +00:00
Kostya Serebryany
84019ff7e5
Cast pointers to uptr when calling internal_syscall
...
For Linux/x86-64, pointers passed to internal_syscall should be casted
to uptr first. Otherwise, they won't be properly extended to 64-bit for
x32.
Patch by H.J. Lu
llvm-svn: 209278
2014-05-21 07:49:03 +00:00
Kostya Serebryany
6c9eacb384
Use 64-bit pointer to unwind stack for x86-64
...
X32 uses ILP32 data model in 64-bit hardware mode. This patch always
uses 64-bit pointer to unwind stack for x86-64.
Patch by H.J. Lu
llvm-svn: 209277
2014-05-21 07:34:03 +00:00
Joerg Sonnenberger
b1cc6d5603
Go via uintptr_t when casting away constness, otherwise GCC will warn
...
when using -Wcast-qual.
llvm-svn: 209214
2014-05-20 16:37:07 +00:00
Timur Iskhodzhanov
e7894f3b14
[ASan Win] Simplify and improve the way we forward ASan interface calls from DLLs
...
Reviewed at http://reviews.llvm.org/D3848
llvm-svn: 209210
2014-05-20 14:26:19 +00:00
Sergey Matveev
6d8b9a747c
[sanitizer] Fix go build following r209121.
...
llvm-svn: 209136
2014-05-19 16:08:53 +00:00
Joerg Sonnenberger
5c29582d53
Revert use of 128bit support on 32bit PPC, it breaks build at least with
...
GCC and that doesn't expose any *ti* functions either.
llvm-svn: 209133
2014-05-19 15:48:46 +00:00
Sergey Matveev
6cb47a083b
[sanitizer] Support sandboxing in sanitizer coverage.
...
Summary:
Sandboxed code may now pass additional arguments to
__sanitizer_sandbox_on_notify() to force all coverage data to be dumped to a
single file (the default is one file per module). The user may supply a file or
socket to write to. The latter option can be used to broker out the file writing
functionality. If -1 is passed, we pre-open a file.
llvm-svn: 209121
2014-05-19 12:53:03 +00:00