Alexey Samsonov
1ecb96f652
[TSan] fixup for r189791: don't put ; on the newline
...
llvm-svn: 189792
2013-09-03 11:50:48 +00:00
Dmitry Vyukov
ed93fbf93e
tsan: add suppressions for true/false positives in standard libraries
...
llvm-svn: 189791
2013-09-03 11:43:04 +00:00
Alexander Potapenko
94377c337b
[libsanitizer] Remove an unused variable introduced in r189789
...
llvm-svn: 189790
2013-09-03 11:30:07 +00:00
Alexander Potapenko
7e1c51988d
[TSan] Move the /proc/self/maps parsing logic to sanitizer_common
...
Provide a generic way for the tools to generate memory profiles from contents of /proc/self/maps
llvm-svn: 189789
2013-09-03 11:09:16 +00:00
Dmitry Vyukov
e2391f66f9
tsan: fix linking when -ltsan is passed before -lpthread
...
libpthread is weird:
/lib/x86_64-linux-gnu/libpthread.so.0:000000000000b9b0 T pthread_cond_init@@GLIBC_2.3.2
/lib/x86_64-linux-gnu/libpthread.so.0:000000000000c720 T pthread_cond_init@GLIBC_2.2.5
let's do it with @@ for now
we can always introduce more macros parameters later
llvm-svn: 189788
2013-09-03 10:16:44 +00:00
Evgeniy Stepanov
499d480be5
[msan] Another regression test for r189786.
...
llvm-svn: 189787
2013-09-03 10:08:14 +00:00
Evgeniy Stepanov
f9ddb43975
[msan] A regression test for r189785.
...
llvm-svn: 189786
2013-09-03 10:05:45 +00:00
Kostya Serebryany
8d42228e47
fix PR17061 (and pleeease, don't ask me for a test, this is just a minor output formatting issue :)
...
llvm-svn: 189783
2013-09-03 09:44:56 +00:00
Dmitry Vyukov
23b80ab87f
asan: fix android build
...
android does not have dlvsym
llvm-svn: 189781
2013-09-03 07:53:49 +00:00
Dmitry Vyukov
3a6c7cea77
tsan: properly intercept pthread_cond functions
...
llvm-svn: 189767
2013-09-02 18:06:28 +00:00
Evgeniy Stepanov
bbca4903c4
[msan] Update MSanDR build instructions.
...
llvm-svn: 189760
2013-09-02 14:21:12 +00:00
Sergey Matveev
69931c5841
[sanitizer_common] Add internal_clone().
...
Add a wrapper for the clone syscall for use in StopTheWorld. We
implement it only for x86_64, so stop building StopTheWorld for other platforms
(no one uses it outside x86_64 anyway).
See https://code.google.com/p/address-sanitizer/issues/detail?id=214 for why we
can't use the glibc clone() wrapper.
llvm-svn: 189753
2013-09-02 11:36:19 +00:00
Evgeniy Stepanov
e3eaa7bb35
[msan] Intercept memalign, valloc, pvalloc.
...
PR17039
llvm-svn: 189750
2013-09-02 09:24:53 +00:00
Alexey Samsonov
bbd5f46696
[ASan] Make blacklist test more robust
...
llvm-svn: 189748
2013-09-02 09:17:51 +00:00
Alexey Samsonov
d95129060c
[CMake] Don't build sanitizer runtimes if LLVM_USE_SANITIZER is specified
...
llvm-svn: 189745
2013-09-02 08:57:23 +00:00
Alexey Samsonov
4b16885839
Improve collecting malloc stats in ASan
...
Summary:
This change makes races between updates of thread-local stats and
merging all the thread-local stats together less harmful.
Reviewers: kcc
Reviewed By: kcc
CC: dvyukov, llvm-commits
Differential Revision: http://llvm-reviews.chandlerc.com/D1572
llvm-svn: 189744
2013-09-02 08:39:07 +00:00
Peter Collingbourne
de8e3a097c
Conditionalise inclusion of link.h on !SANITIZER_ANDROID.
...
Hopefully fixes the Android build.
Differential Revision: http://llvm-reviews.chandlerc.com/D1551
llvm-svn: 189696
2013-08-30 20:50:12 +00:00
Will Dietz
1b9b9ec464
Avoid compiler-generated memset by using internal_memset.
...
Fixes PR17025.
llvm-svn: 189693
2013-08-30 19:53:55 +00:00
Peter Collingbourne
014328e76c
[dfsan] Add a syms file.
...
llvm-svn: 189620
2013-08-29 22:49:00 +00:00
Alexey Samsonov
5ffab0959a
Minor updates to gen_dynamic_list script suggested by glider
...
llvm-svn: 189588
2013-08-29 15:45:41 +00:00
Alexey Samsonov
06379b3537
[TSan] Add a couple of compiler warnings to TSan runtime compile flags
...
llvm-svn: 189581
2013-08-29 12:08:36 +00:00
Alexey Samsonov
ab7ff52efd
[TSan] Move build rules a bit to ensure correct dependencies of check-tsan command
...
llvm-svn: 189579
2013-08-29 11:53:11 +00:00
Alexey Samsonov
25dc018843
[sanitizer] Parallelize lint checker script
...
llvm-svn: 189578
2013-08-29 11:35:01 +00:00
Alexey Samsonov
5a2f073926
[sanitizer] Refine CMake rules for generating exported symbols and lint checking
...
llvm-svn: 189577
2013-08-29 10:49:04 +00:00
Peter Collingbourne
187a169603
[dfsan] Add custom function for dl_iterate_phdr.
...
Differential Revision: http://llvm-reviews.chandlerc.com/D1505
llvm-svn: 189503
2013-08-28 20:18:25 +00:00
Peter Collingbourne
3e5524d6c5
[dfsan] Add custom function for pthread_create.
...
Differential Revision: http://llvm-reviews.chandlerc.com/D1504
llvm-svn: 189502
2013-08-28 20:18:22 +00:00
Hans Wennborg
f8e56278ed
cmake: Add /Oy- (don't omit frame pointer) to compile flags
...
llvm-svn: 189488
2013-08-28 16:14:59 +00:00
Will Dietz
f967d1f947
sanitizer_common: Use PYTHON_EXECUTABLE to choose appropriate python.
...
Fixes build on systems where 'python' is not python2.
llvm-svn: 189486
2013-08-28 15:53:17 +00:00
Alexey Samsonov
dd1d1b2c79
Make lint checker script more robust
...
llvm-svn: 189479
2013-08-28 12:15:03 +00:00
Alexey Samsonov
d875c39be6
Check code style in check-sanitizer command
...
llvm-svn: 189475
2013-08-28 11:27:31 +00:00
Alexey Samsonov
ef643ce471
[sanitizer] fix code style
...
llvm-svn: 189474
2013-08-28 11:26:09 +00:00
Evgeniy Stepanov
4f961de94e
[msan] Remove extra backup/restore calls.
...
llvm-svn: 189461
2013-08-28 09:17:47 +00:00
Kostya Serebryany
fab9336413
[asan]: fix a CHECK failure in use-after-return mode; enable and fix stack-use-after-return.cc; add a test for UAR mode in asan_noinst_test
...
llvm-svn: 189457
2013-08-28 08:59:23 +00:00
Alexey Samsonov
0803953cea
Generate list of symbols exported from sanitizer runtimes only on 64-bit Unix
...
llvm-svn: 189454
2013-08-28 08:07:04 +00:00
Alexey Samsonov
acab30e927
Properly generate lists of exported symbols for sanitizer runtimes
...
This change adds a Python script that is invoked for
the just-built sanitizer runtime to generate the list of exported symbols
passed to the linker. By default, it contains interceptors and sanitizer
interface functions, but can be extended with tool-specific lists.
llvm-svn: 189356
2013-08-27 15:08:02 +00:00
Evgeniy Stepanov
cb22c67a21
[msan] Save/restore va_arg_overflow_tls in signal handlers.
...
llvm-svn: 189351
2013-08-27 14:08:15 +00:00
Alexey Samsonov
614a5ea990
Revert r189347: it breaks on machines w/o installed debug versions of system libraries
...
llvm-svn: 189350
2013-08-27 14:04:01 +00:00
Alexey Samsonov
ea0ef986e2
LSan: Check that dynamic linker library is properly symbolized
...
llvm-svn: 189347
2013-08-27 13:39:33 +00:00
Evgeniy Stepanov
c41798152f
[msan] Unpoison all TLS shadow when leaving a signal handler.
...
llvm-svn: 189343
2013-08-27 12:59:39 +00:00
Evgeniy Stepanov
bb25af5f7b
[msan] Fix a data race in signal/sigaction interceptors.
...
llvm-svn: 189342
2013-08-27 11:34:05 +00:00
Evgeniy Stepanov
82185980c4
[msan] A test for ppoll() interceptor.
...
llvm-svn: 189339
2013-08-27 11:10:20 +00:00
Evgeniy Stepanov
a40a058ff1
[sanitizer] Simplify sigaction and sigset_t handling.
...
llvm-svn: 189338
2013-08-27 11:10:04 +00:00
Hans Wennborg
67c6e5041b
cmake: fix the compiler-rt build with MSVC
...
This sets flags and excludes things that aren't working with MSVC yet,
allowing us to build the ASan runtime as part of the cmake build.
Differential Revision: http://llvm-reviews.chandlerc.com/D1525
llvm-svn: 189304
2013-08-27 01:24:01 +00:00
Sergey Matveev
9e3e80208f
[sanitizer] Add a fast version of StackDepotGet() for use in LSan.
...
Add a class that holds a snapshot of the StackDepot optimized for querying by
ID. This allows us to speed up LSan dramatically.
llvm-svn: 189217
2013-08-26 13:24:43 +00:00
Sergey Matveev
ef7db73e11
[sanitizer] Handle Die() in StopTheWorld.
...
Handle calls to Die() from the tracer thread. Fixes a bug where a CHECK
could fail in the tracer thread, resulting in a call to AsanDie. The tracer
thread then exited and the parent process continued execution despite its
address space being in an unusable state.
llvm-svn: 189216
2013-08-26 13:20:31 +00:00
Peter Collingbourne
469c056299
[dfsan] Integration test for the equal-labels case
...
llvm-svn: 189134
2013-08-23 18:45:22 +00:00
Evgeniy Stepanov
0d13c707d5
[msan] Extend VAArgTLSOverwrite test.
...
This test now covers LLVM r189104.
llvm-svn: 189105
2013-08-23 12:13:18 +00:00
Alexey Samsonov
903c3250d2
Slightly improve lint checker script and fix a few style issues
...
llvm-svn: 189092
2013-08-23 07:43:56 +00:00
Sergey Matveev
5371e90f7a
[lsan] Add a regression test for building C code.
...
llvm-svn: 189016
2013-08-22 14:48:44 +00:00
Evgeniy Stepanov
251080b0eb
[sanitizer] Fix build when scanf interceptors are enabled, and __isoc99_*scanf are not.
...
Fixes PR16916.
llvm-svn: 189015
2013-08-22 13:59:15 +00:00