Kostya Serebryany
e91930a7e6
[asan] implement an experimental detector of ODR violations. Not tested yet outside of a tiny test, may need tuning.
...
llvm-svn: 207210
2014-04-25 08:58:28 +00:00
Kostya Serebryany
7afc6b2c72
[asan] enable use_sigaltstack by default (this will provide verbose reports on stack-overflow instead of silently crashing with SEGV)
...
llvm-svn: 207099
2014-04-24 11:55:17 +00:00
Kostya Serebryany
8cd3d27879
[asan] disable lsan back. :( -- It appears that quite a few lit tests have leaks and they were not covered by out buildbot
...
llvm-svn: 206955
2014-04-23 08:15:16 +00:00
Kostya Serebryany
c9db838267
[asan] enable LeakSanitizer (LSan) by default in asan. This only affects Linux x86_64. LSan has been used in various projects for more than half a year and we now consider it quite stable to be on by default.
...
llvm-svn: 206896
2014-04-22 13:56:56 +00:00
Alexander Potapenko
6e647c13e4
[ASan] Fixed the expectation for Darwin memset test.
...
Added a comment about keeping the Linux/Darwin test versions in sync.
llvm-svn: 206881
2014-04-22 10:53:57 +00:00
Kostya Serebryany
26c4e96455
[sanitizer] enable check_printf by default for asan and tsan. We've been using this flag for a while and it seems to be stable enough for the rest of the world.
...
llvm-svn: 206872
2014-04-22 09:17:08 +00:00
Kostya Serebryany
38bb53b2c5
[asan] add a run-time flag detect_container_overflow=true/false
...
llvm-svn: 206753
2014-04-21 14:18:45 +00:00
Kostya Serebryany
632751539e
[asan] add __asan_memset and friends
...
llvm-svn: 206748
2014-04-21 11:58:25 +00:00
Kostya Serebryany
498b18a01e
[asan] try to harden __tls_get_addr interceptor against signals (no good test still); update the comment in a test.
...
llvm-svn: 206367
2014-04-16 09:07:27 +00:00
Alexander Potapenko
65a6c57013
[ASan] Replace a CHECK for mmap_limit_mb with a RAW_CHECK.
...
In the case of a CHECK failure the program tries to fork and launch llvm-symbolizer,
but hangs in mz_force_lock because one of the allocator locks is already acquired.
llvm-svn: 206274
2014-04-15 11:36:18 +00:00
Kostya Serebryany
b1232474b2
[asan] try fixing the mmap_limit_mb failure on buildbot (tests pass locally)
...
llvm-svn: 206262
2014-04-15 08:35:43 +00:00
Evgeniy Stepanov
81d80f7578
[asan] Fix mmap_limit_mb test to not use C++11.
...
llvm-svn: 206182
2014-04-14 15:37:02 +00:00
Evgeniy Stepanov
681016b2ea
[asan] Do not use lambda in sanitizer lit tests.
...
We may be building with a very old C++ library.
llvm-svn: 206180
2014-04-14 15:19:07 +00:00
Kostya Serebryany
bcfbea6d4e
[asan] added internal flag mmap_limit_mb
...
llvm-svn: 206178
2014-04-14 14:51:01 +00:00
Kostya Serebryany
90527cb324
[asan] don't use bool in public interface, make sure the interface headers are usable in plain C
...
llvm-svn: 206160
2014-04-14 11:16:53 +00:00
Kostya Serebryany
f694ab1f18
[asan] provide better reports for cases where memcpy/etc get negative size parameter. Also fix a typo found by Tetsuo Kiso
...
llvm-svn: 206158
2014-04-14 09:50:52 +00:00
Alexey Samsonov
7dc3c0fb2b
[ASan] Explicitly specify -ldl/-lpthread in RUN-lines where needed
...
llvm-svn: 205623
2014-04-04 12:24:46 +00:00
Kostya Serebryany
9f20c9b17c
[asan] fix a leak in __tls_get_addr handler; introduce a run-time flag to disable this handler completely; remove a workaround for a bug fixed in glibc
...
llvm-svn: 205617
2014-04-04 09:10:58 +00:00
Alexey Samsonov
56b6ee9833
[ASan] Optional support for dynamic ASan runtime on Linux.
...
Based on http://llvm-reviews.chandlerc.com/D3042 by Yuri Gribov!
llvm-svn: 205308
2014-04-01 13:16:30 +00:00
Evgeniy Stepanov
a6eb1bb59e
[sanitizer] Intercept __bzero on Mac.
...
This should make memset_test pass on Mac.
llvm-svn: 204929
2014-03-27 14:20:34 +00:00
Kostya Serebryany
d093b5ac43
[asan] add a test case for r204897.
...
llvm-svn: 204903
2014-03-27 08:51:32 +00:00
Kostya Serebryany
88d0eac412
[asan] Do not sanitize kernel area on 32-bit targets, patch by Yuri Gribov
...
llvm-svn: 204897
2014-03-27 07:36:26 +00:00
Evgeniy Stepanov
16d89fc356
[sanitizer] Intercept __aeabi_mem(set|cpy|move).
...
llvm-svn: 204800
2014-03-26 12:14:34 +00:00
Alexey Samsonov
6c3f7fcb8a
Mark this test as 64-bit specific
...
llvm-svn: 204319
2014-03-20 07:37:45 +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
Alexey Samsonov
8ad7a05bb4
Improve llvm-symbolizer discovery in asan_symbolize.py
...
llvm-svn: 202982
2014-03-05 15:00:36 +00:00
Alexey Samsonov
3d9adc0a73
[ASan] Speed up stack trace unwinding for stacks of size 2.
...
Summary:
We don't need to do any work in this case - just take
the current PC and caller PC.
Reviewers: eugenis, ygribov
Reviewed By: eugenis
CC: llvm-commits
Differential Revision: http://llvm-reviews.chandlerc.com/D2936
llvm-svn: 202845
2014-03-04 13:12:25 +00:00
Dmitry Vyukov
d8c2fbd57f
tsan: another attempt to fix the tls_get_addr crash
...
llvm-svn: 202405
2014-02-27 15:07:45 +00:00
Alexander Potapenko
4b1a7fe33a
[ASan] Split interception-in-shared-lib-test.cc into two tests with platform-specific RUN commands.
...
Get rid of a TestCases/SharedLibs/shared-lib-test-so.cc dependency in these tests.
llvm-svn: 202267
2014-02-26 14:05:57 +00:00
Evgeniy Stepanov
6697dc6aa3
[asan] Remove extra sonames from libraries in tests.
...
llvm-svn: 202156
2014-02-25 15:25:37 +00:00
Evgeniy Stepanov
e4d8577c69
[asan] Reenable waitid test on Android.
...
waitid() is present since API level 9 (Android 2.3). That's old enough.
llvm-svn: 202149
2014-02-25 13:24:42 +00:00
Evgeniy Stepanov
4bf7a268e0
[asan] Add a test for interceptors in shared libraries.
...
llvm-svn: 202037
2014-02-24 14:31:28 +00:00
Evgeniy Stepanov
c0ae3dfc3a
[asan] A test was reverted, but not "svn rm"-ed in r202016.
...
llvm-svn: 202025
2014-02-24 11:43:47 +00:00
Evgeniy Stepanov
4c32d16c76
Revert r202014.
...
Failing on the bots for an unknown reason.
llvm-svn: 202016
2014-02-24 10:21:44 +00:00
Evgeniy Stepanov
567e0eef4c
[asan] Add a test for interceptors in shared libraries.
...
llvm-svn: 202014
2014-02-24 10:04:42 +00:00
Evgeniy Stepanov
d512234d7e
[asan] Avoid hardcoding library path in test binary.
...
llvm-svn: 202013
2014-02-24 10:03:33 +00:00
Alexey Samsonov
5e6d83258e
[CMake] lit tests shouldn't depend on runtimes in standalone build
...
llvm-svn: 201771
2014-02-20 09:47:18 +00:00
Alexey Samsonov
31043152d3
Add rudimentary support for running compiler-rt lit tests with GCC
...
llvm-svn: 201680
2014-02-19 15:13:14 +00:00
Evgeniy Stepanov
cc8e58bc46
[asan] Ensure that stack is limited before attempting to overflow it.
...
Very bad things happen otherwise.
llvm-svn: 201670
2014-02-19 12:43:27 +00:00
Alexey Samsonov
cd8535a96d
[CMake] Introduce COMPILER_RT_INCLUDE_TESTS option
...
llvm-svn: 201666
2014-02-19 11:18:47 +00:00
Evgeniy Stepanov
2274ba7716
[asan] Improve stack overflow detection.
...
There are more cases when those manifest as an access below SP.
llvm-svn: 201664
2014-02-19 11:02:46 +00:00
Evgeniy Stepanov
b036778bdb
[asan] Relax stack-overflow test.
...
llvm-svn: 201571
2014-02-18 13:11:40 +00:00
Evgeniy Stepanov
a50abe6656
[asan] Disable stack-overflow test on main thread.
...
Failing on some bots.
llvm-svn: 201567
2014-02-18 12:29:39 +00:00
Evgeniy Stepanov
65b959afad
[asan] Stack overflow detection.
...
Report segmentation faults near or below stack bottom as stack-overflow
(not stack-buffer-overflow!).
llvm-svn: 201565
2014-02-18 11:49:52 +00:00
Evgeniy Stepanov
1b16a9d3b0
[asan] Fix one test on OSX.
...
llvm-svn: 201564
2014-02-18 11:32:24 +00:00
Alexey Samsonov
eb6ef12203
Drop test/asan/GenericConfig directory
...
llvm-svn: 201552
2014-02-18 08:24:28 +00:00
Evgeniy Stepanov
77d9ae6c0f
[asan] Replace rand_r with rand in test.
...
llvm-svn: 201548
2014-02-18 08:03:44 +00:00
Alexey Samsonov
1c9b9bcb5c
Simplify defining Clang compile flags in lit configs
...
llvm-svn: 201513
2014-02-17 13:08:10 +00:00
Evgeniy Stepanov
9e629abf1e
[asan] Add a test for stack unwinding in new and delete.
...
llvm-svn: 201511
2014-02-17 11:52:29 +00:00
Evgeniy Stepanov
6c34935292
[asan] Replace posix_memalign with memalign in test.
...
Android does not provide posix_memalign.
llvm-svn: 201420
2014-02-14 15:02:36 +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
Evgeniy Stepanov
cbb2d5eee4
[asan] Disabled one more test on Android.
...
llvm-svn: 201416
2014-02-14 14:37:13 +00:00
Evgeniy Stepanov
44f5d8a49f
[asan] Change stack uar test to not use ulimit.
...
Because of how Android test runner is implemented, ulimit in RUN: line
gets executed on the host machine and does not affect the test.
llvm-svn: 201415
2014-02-14 14:36:42 +00:00
Alexey Samsonov
9f20d67034
Move ASan lit-tests under test/asan
...
llvm-svn: 201413
2014-02-14 14:06:10 +00:00