Alexey Samsonov
9a1ffce25a
[CMake] Simplify code for detecting/setting compiler flags
...
llvm-svn: 201543
2014-02-18 07:26:58 +00:00
Kostya Serebryany
6774f2241d
[sanitizer] add tests for DeadlockDetector, minor fix in onLock
...
llvm-svn: 201514
2014-02-17 14:57:49 +00:00
Kostya Serebryany
73325589dc
[sanitizer] implement node removal in Deadlock graph
...
llvm-svn: 201509
2014-02-17 11:21:52 +00:00
Kostya Serebryany
ec68429c5d
[sanitizer] simplify DeadlockDetectorTLS
...
llvm-svn: 201505
2014-02-17 08:47:48 +00:00
Kostya Serebryany
46177baddb
[sanitizer] add one more test for deadlock detection stuff
...
llvm-svn: 201503
2014-02-17 07:39:44 +00:00
Alexey Samsonov
f1b7d05558
LSan: Print warning about dynamic linker only in verbose mode
...
llvm-svn: 201421
2014-02-14 15:12:46 +00:00
Alexey Samsonov
9a70077b47
[ASan] Rename asan_runtime_libraries to asan. Re-enable tests on Android.
...
llvm-svn: 201417
2014-02-14 14:45:13 +00:00
Alexey Samsonov
e6a6183e9b
Move TSan lit-tests under test/tsan
...
llvm-svn: 201414
2014-02-14 14:35:48 +00:00
Alexey Samsonov
9f20d67034
Move ASan lit-tests under test/asan
...
llvm-svn: 201413
2014-02-14 14:06:10 +00:00
Alexey Samsonov
8434e60f7e
Move MSan lit-tests under test/msan
...
llvm-svn: 201412
2014-02-14 13:02:58 +00:00
Evgeniy Stepanov
0de2b9b1e2
[asan] Revert r201402, r201404.
...
Test fails in bootstrap build.
llvm-svn: 201411
2014-02-14 12:37:41 +00:00
Evgeniy Stepanov
a21280307f
[sanitizer] Fix getpwuid_r (and similar) interceptors missing one of the arguments.
...
llvm-svn: 201410
2014-02-14 12:32:15 +00:00
Alexey Samsonov
7eeef85bd4
Move LSan test suite under test/
...
llvm-svn: 201408
2014-02-14 12:26:05 +00:00
Kostya Serebryany
a63632a5c6
[tsan] rudimentary support for deadlock detector in tsan (nothing really works yet except for a single tiny test). Also rename tsan's DeadlockDetector to InternalDeadlockDetector
...
llvm-svn: 201407
2014-02-14 12:20:42 +00:00
Alexey Samsonov
127e93e4dc
Delete LSan unit tests
...
llvm-svn: 201406
2014-02-14 12:13:59 +00:00
Kostya Serebryany
e233d8618d
[sanitizer] add iterators to bit vectors; make bit vector operations use little stack; add common flag 'detect_deadlocks'
...
llvm-svn: 201405
2014-02-14 12:08:23 +00:00
Evgeniy Stepanov
d2821f5af0
[asan] Disable assembly on windows.
...
llvm-svn: 201404
2014-02-14 12:07:22 +00:00
Alexey Samsonov
f6cf6ab53b
Move DFSan test suite under test/
...
llvm-svn: 201403
2014-02-14 12:05:41 +00:00
Evgeniy Stepanov
f335bd9c69
[asan] Added assembly functions for x86/amd64 asan.
...
These are runtime support functions for inline assembly instrumentation.
Patch by Yuri Gorshenin.
llvm-svn: 201402
2014-02-14 11:55:53 +00:00
Alexey Samsonov
ba869e79a0
Move UBSan test suite under test/
...
llvm-svn: 201401
2014-02-14 11:42:22 +00:00
Evgeniy Stepanov
05938a23f5
[sanitizer] Use mmap to zero-fill large shadow regions.
...
This is covered by existing ASan test.
This does not change anything for TSan by default (but provides a flag to
change the threshold size).
Based on a patch by florent.bruneau here:
https://code.google.com/p/address-sanitizer/issues/detail?id=256
llvm-svn: 201400
2014-02-14 11:41:26 +00:00
Alexey Samsonov
81a2b466e9
Move shared configs for lit test suites to test/ and unittests/ directories
...
llvm-svn: 201399
2014-02-14 11:00:07 +00:00
Evgeniy Stepanov
fb74ea80dc
[msan] Replicate mmap-below-shadow check in mmap64 interceptor.
...
llvm-svn: 201397
2014-02-14 09:49:29 +00:00
Alexey Samsonov
8c1441f860
Move tests for BlocksRuntime and builtins to corresponding directories under test/
...
llvm-svn: 201396
2014-02-14 09:47:31 +00:00
Evgeniy Stepanov
aa9d74cc5d
[asan] Android test runner for ASan lit tests.
...
This change replaces 32- and 64- bit config.in-s with a single config template
that is used to generate both 32 and 64 bits configs as well as the new
arm-android config. Arm-android config is special because it can run tests on
a remote device over adb (android debug bridge).
We replace %clang with a script that run the compiler, upload the result to
the device, and replaces it with another script. The second script runs the
binary on the device and delivers stdout/stderr/exitcode back.
llvm-svn: 201394
2014-02-14 09:22:10 +00:00
Alexey Samsonov
a6b264b51d
Move original compiler-rt functions (libgcc replacement) to lib/builtins directory
...
llvm-svn: 201393
2014-02-14 09:20:33 +00:00
Alexander Potapenko
0b28ea9c47
[libsanitizer] Create SanitizerCommonDecorator which provides the Warning() and EndWarning() methods
...
(needed for SEGV handling in sanitizer_common)
llvm-svn: 201392
2014-02-14 08:59:42 +00:00
Alexey Samsonov
b8665226ec
Move BlocksRuntime to lib/ directory
...
llvm-svn: 201390
2014-02-14 08:38:30 +00:00
Kostya Serebryany
efe2f7e2c8
[sanitizer] replace MostSignificantSetBitIndex with LeastSignificantSetBitIndex in bit vector (to iterate bits in increasing order)
...
llvm-svn: 201339
2014-02-13 15:59:00 +00:00
Kostya Serebryany
67d419736a
[sanitizer] optimize TwoLevelBitVector::intersectsWith, extend tests, fix a check
...
llvm-svn: 201338
2014-02-13 15:45:20 +00:00
Evgeniy Stepanov
5cb24b8ca9
[asan] Disable 1 test on Android.
...
llvm-svn: 201332
2014-02-13 14:37:25 +00:00
Evgeniy Stepanov
4e6096b859
[asan] Remove extra clone() arguments in test.
...
Android headers define clone() as a 4-argument function without ellipsis.
llvm-svn: 201331
2014-02-13 14:37:04 +00:00
Evgeniy Stepanov
f79669a323
[asan] Enable signal and sigaction interceptors on Android.
...
Fixes AddressSanitizer.SignalTest breakage.
llvm-svn: 201330
2014-02-13 14:33:24 +00:00
Evgeniy Stepanov
8978389a32
[asan] Enable SEGV handler on Android by default.
...
Seems stable enough.
Fixes null_deref.cc test.
llvm-svn: 201326
2014-02-13 13:43:47 +00:00
Evgeniy Stepanov
3bec7a9c77
[sanitizer] Fix off-by-one-line in SEGV reports on Android.
...
This will be covered by null_deref.cc test (requires one more fix to pass).
llvm-svn: 201325
2014-02-13 13:32:24 +00:00
Evgeniy Stepanov
391f0234eb
[asan] Fix null_deref test with zero base shadow.
...
With zero base shadow, shadow for near-zero access is itself at near-zero
location. As a result, this test crashes on the shadow access, and not on the
app access.
Relax a check to match this behavior.
llvm-svn: 201324
2014-02-13 13:04:39 +00:00
Kostya Serebryany
07526fb4a0
[sanitizer] address some of the dvyukov's comments on previous commits
...
llvm-svn: 201322
2014-02-13 12:39:21 +00:00
Evgeniy Stepanov
788527d9cd
Remove a check from strerror_r test.
...
It's not always true: on Android, strerror_r with invalid errno
prints "Unknown error ..." to the buffer and returns 0.
This test now only checks that strerror_r does not crash.
llvm-svn: 201321
2014-02-13 12:24:10 +00:00
Kostya Serebryany
f6cb35abb4
[sanitizer] findPath for deadlock detector
...
llvm-svn: 201306
2014-02-13 09:52:15 +00:00
Evgeniy Stepanov
14ca0627d5
[asan] Avoid deadlock in CovDump.
...
llvm-svn: 201304
2014-02-13 08:50:36 +00:00
Kostya Serebryany
c98ce28533
[sanitizer] AArch64 sanitizer support; patch by Christophe Lyon and Yvan Roux
...
llvm-svn: 201303
2014-02-13 07:50:20 +00:00
Kostya Serebryany
5e52d48e3a
[sanitizer] more code for deadlock detector, nothing really works yet (except for small unit tests).
...
llvm-svn: 201302
2014-02-13 07:44:51 +00:00
Sergey Matveev
2a01b2f86f
[sanitizer] Intercept capget()/capset().
...
Also, fix incorrect syscall hooks for the corresponding syscalls.
llvm-svn: 201252
2014-02-12 19:29:49 +00:00
Evgeniy Stepanov
8ab205fb74
[asan] Handle OpenFile errors in CovDump.
...
llvm-svn: 201240
2014-02-12 15:29:22 +00:00
Evgeniy Stepanov
254c7636cf
[sanitizer] Fix wait4 interceptor on Android.
...
It's called __wait4 there.
llvm-svn: 201235
2014-02-12 13:05:17 +00:00
Kostya Serebryany
be1d22b631
[sanitizer] added class BVGraph, to be used in a deadlock detector; added more methods to the bit vectors
...
llvm-svn: 201226
2014-02-12 11:28:09 +00:00
Alexey Samsonov
ce9c449a4d
[TSan] Kill tsan_symbolize_addr2line_linux.cc
...
llvm-svn: 201219
2014-02-12 08:37:09 +00:00
Alexey Samsonov
7304b4201f
[Sanitizer] Teach external symbolizer to work with addr2line if llvm-symbolizer is unavailable. Allow this mode in TSan.
...
llvm-svn: 201218
2014-02-12 08:29:42 +00:00
Alexey Samsonov
c34a997669
[UBSan] Parse common runtime flags before using a symbolizer
...
llvm-svn: 201217
2014-02-12 08:21:44 +00:00
Alexey Samsonov
167c15a98f
[Sanitizer] Build sanitizer_common with -Wframe-larger-than=512 flag
...
llvm-svn: 201213
2014-02-12 07:26:40 +00:00