Evgeniy Stepanov
755eb32a39
[sanitizer] Add syscall handlers to ASan and TSan runtimes.
...
ASan checks addressability of syscall arguments. TSan does nothing for now.
llvm-svn: 179380
2013-04-12 14:57:03 +00:00
Evgeniy Stepanov
9fb82357dc
[sanitizer] More syscall handler placeholders.
...
This time it's the full list scavenged from syscalls.h
Fixed return value type.
llvm-svn: 179378
2013-04-12 14:06:40 +00:00
Timur Iskhodzhanov
664ec5d7a8
Finally drop the 'static' from INLINE and ALWAYS_INLINE
...
The ALWAYS_INLINE doesn't have static on POSIX anyways since r178341; the INLINE is only used in .h files, so shouldn't have been 'static' in the first place
llvm-svn: 179371
2013-04-12 09:37:20 +00:00
Alexey Samsonov
e48866969e
[MSan] Demangle function name in description of stack origin
...
llvm-svn: 179368
2013-04-12 07:27:30 +00:00
Alexey Samsonov
1a345ad502
[MSan] don't build tests with -fPIE/-pie, as these flags are implied by -fsanitize=memory now
...
llvm-svn: 179366
2013-04-12 07:14:04 +00:00
Alexey Samsonov
0d725b1408
[TSan] remove -fPIE -pie from TSan lit tests to check that -fsanitize=thread implies them now
...
llvm-svn: 179365
2013-04-12 07:11:00 +00:00
Kostya Serebryany
fd27b83ef2
[asan] inline flags(), up to 1% perf gain on malloc-intensive code
...
llvm-svn: 179307
2013-04-11 18:36:04 +00:00
Kostya Serebryany
bb68f2cd65
[asan] make heavy_uar_test even heavier
...
llvm-svn: 179306
2013-04-11 18:27:02 +00:00
Alexey Samsonov
9f3938e271
Explicitly list all sanitizer headers in CMake build rules. Make sure sanitizer lit_tests depend on fresh headers.
...
llvm-svn: 179293
2013-04-11 15:49:52 +00:00
Kostya Serebryany
1c77de3aeb
[asan] improve the UAR reporting (try harder to find the correct frame), try to make the test more stable
...
llvm-svn: 179292
2013-04-11 15:35:40 +00:00
Evgeniy Stepanov
f5523116e9
[sanitizer] Syscall hooks.
...
Pre- and post- hooks for linux syscalls. Not wired into anything, but exposed
through public interface.
llvm-svn: 179288
2013-04-11 14:37:04 +00:00
Kostya Serebryany
18f0820552
[asan] make heavy_uar_test a bit more heavy and fix he fake stack to pass this test
...
llvm-svn: 179286
2013-04-11 14:07:02 +00:00
Alexey Samsonov
a672ba6e8f
[ASan] test source-based init-order blacklisting added in r179280
...
llvm-svn: 179281
2013-04-11 13:21:41 +00:00
Kostya Serebryany
3fec2f534a
[asan] fix use-after-return functionality (PR15672) and enable the corresponding test. We still don't guarantee anything with regard to use-after-return checking
...
llvm-svn: 179278
2013-04-11 12:49:38 +00:00
Alexey Samsonov
46cc45a291
[ASan] Symbolize correct address when printint error summary
...
llvm-svn: 179274
2013-04-11 11:45:04 +00:00
Kostya Serebryany
4e0a33c8be
[asan] move fake stack into a separate .h file; actually disable a failing test
...
llvm-svn: 179273
2013-04-11 11:39:19 +00:00
Kostya Serebryany
fd7f924016
[asan] add heavy_uar_test (disabled); fix lint
...
llvm-svn: 179271
2013-04-11 11:29:07 +00:00
Alexander Potapenko
227e22de5a
[ASan] Do not check the shadow of NULL argument in the time() interceptor.
...
Add a test for time().
llvm-svn: 179177
2013-04-10 15:13:00 +00:00
Kostya Serebryany
92684efb1d
[asan] implement callbacks for unaligned loads/stores
...
Reviewers: samsonov
Reviewed By: samsonov
CC: samsonov, llvm-commits
Differential Revision: http://llvm-reviews.chandlerc.com/D652
llvm-svn: 179175
2013-04-10 13:59:32 +00:00
Alexey Samsonov
c0443c5d25
[ASan] fix a typo in legend in error report
...
llvm-svn: 179161
2013-04-10 07:00:25 +00:00
Evgeniy Stepanov
460067823b
[sanitizer] Interceptors for wait*.
...
llvm-svn: 179096
2013-04-09 14:34:59 +00:00
Evgeniy Stepanov
69967c2835
[msan] Intercept glob() with tests.
...
llvm-svn: 179091
2013-04-09 11:35:13 +00:00
Alexey Samsonov
7ad129277e
[Sanitizer] fix TSan tests: remove global ctor from sanitizer_common, run load_shared_lib test only in lit
...
llvm-svn: 179090
2013-04-09 07:46:20 +00:00
Kostya Serebryany
9d28efc1ad
[asan] relax Linux/zero-base-shadow.cc to make it pass on newer Ubuntu; fix lint
...
llvm-svn: 179088
2013-04-09 07:08:05 +00:00
Chandler Carruth
2b3c00eec7
Revert r179012: "[msan] Intercept glob()."
...
This was committed without tests and contains obvious bugs. That's not
acceptable. It broke address sanitizer for most programs using glob(3).
llvm-svn: 179054
2013-04-08 20:59:44 +00:00
Alexander Potapenko
32efd25b93
[libsymbolized] If we can't find an address in the list of shared libraries, try to reload it.
...
Add a regression test for the case where such behavior helps TSan:
1. race is reported in the main module
2. new shared library is loaded
3. race is reported in the shared library
llvm-svn: 179032
2013-04-08 17:46:34 +00:00
Evgeniy Stepanov
b4eac2f810
[msan] Interceptors for pipe2 and socketpair.
...
llvm-svn: 179022
2013-04-08 13:45:12 +00:00
Evgeniy Stepanov
8cd707a1a6
[msan] Intercept glob().
...
llvm-svn: 179012
2013-04-08 09:03:00 +00:00
Evgeniy Stepanov
e20c780aaf
[tsan] Fix build.
...
llvm-svn: 179008
2013-04-08 08:46:25 +00:00
Kostya Serebryany
e6459977b8
[sanitizer] Fix boundary condition in LargeMmapAllocator::GetBlockBegin. Patch by Sergey Matveev
...
llvm-svn: 179007
2013-04-08 08:43:22 +00:00
Evgeniy Stepanov
7ba7207f1d
[msan] Intercept time().
...
llvm-svn: 179002
2013-04-08 08:25:22 +00:00
Kostya Serebryany
228ecf46ab
[asan] make huge_negative_hea_oob more meaningful
...
llvm-svn: 178876
2013-04-05 15:16:48 +00:00
Kostya Serebryany
f5407e8d8f
[asan] add a test for huge left oob
...
llvm-svn: 178874
2013-04-05 15:13:23 +00:00
Kostya Serebryany
5b4267f7e7
[sanitizer] found a bug by code inspection: CHECK(a=b) instead of CHECK(a==b). Was puzzled why lint did not catch it. Turns out this check was disabled for asan source. fix all cases and enable the check
...
llvm-svn: 178872
2013-04-05 14:40:25 +00:00
Evgeniy Stepanov
e7a7a9b972
[msan] Fix sigaction interceptor.
...
llvm-svn: 178868
2013-04-05 12:58:07 +00:00
Evgeniy Stepanov
c7af878a01
[msan] Conditionally disable new() and delete() wrappers.
...
To be used with static libstdc++.
llvm-svn: 178866
2013-04-05 12:03:47 +00:00
Evgeniy Stepanov
7948c648bf
[msan] A runtime option to disable wrapping of signal handlers.
...
llvm-svn: 178865
2013-04-05 11:59:16 +00:00
Alexey Samsonov
2a4668557f
[Sanitizer] enquote the module name when passing it to external symbolizer
...
llvm-svn: 178864
2013-04-05 11:54:23 +00:00
Alexey Samsonov
5afe6aa141
[ASan] init-order checker tests: move constexpr test that requires -std=c++11 to a separate test case. Check that structs with no ctor but non-trivial dtor are ignored.
...
llvm-svn: 178857
2013-04-05 07:51:49 +00:00
Alexey Samsonov
46b8665ea4
Remove InternalAlloc/InternalFree calls from StopTheWorld. Patch by Sergey Matveev.
...
llvm-svn: 178855
2013-04-05 07:41:21 +00:00
Alexey Samsonov
734aab4066
[Sanitizer] Use a common mutex to prevent mixing reports from different sanitizers. This fixes PR15516
...
llvm-svn: 178853
2013-04-05 07:30:29 +00:00
Alexey Samsonov
70a9c263d4
[TSan] Make path to FileCheck configurable
...
llvm-svn: 178760
2013-04-04 12:18:12 +00:00
Kostya Serebryany
eef8bd4355
[asan] nuke the old unused allocator code
...
llvm-svn: 178758
2013-04-04 11:32:49 +00:00
Kostya Serebryany
13b07733b1
[asan] fill first 4K of malloc-ed memory with garbage, implement flags max_malloc_fill_size and malloc_fill_byte
...
llvm-svn: 178757
2013-04-04 11:17:14 +00:00
Evgeniy Stepanov
24b2169e07
[sanitizer] Android lacks ucontext_t definition.
...
llvm-svn: 178756
2013-04-04 09:21:48 +00:00
Evgeniy Stepanov
7b0e132551
[sanitizer] Use ucontext_t instead of "struct ucontext".
...
Fixes Mac build.
llvm-svn: 178755
2013-04-04 09:03:56 +00:00
Evgeniy Stepanov
1f8b3538b4
[msan] Unpoison siginfo_t and ucontext_t in signal handlers.
...
Add wrappers for all user signal handlers to unpoison the handler's arguments.
llvm-svn: 178754
2013-04-04 08:22:52 +00:00
Kostya Serebryany
c3525ce6ac
[sanitizer] while doing fast unwinding make sure that the frame pointer is aligned; fix lint
...
llvm-svn: 178747
2013-04-04 06:52:40 +00:00
Alexey Samsonov
87c2a87b50
[Sanitizer] Fix OnPrint weak hook. Disable weak hooks for gotsan.
...
llvm-svn: 178640
2013-04-03 13:22:54 +00:00
Alexey Samsonov
60adc1781e
[Sanitizer] Be more careful with arch-specific defines in StopTheWorld code
...
llvm-svn: 178630
2013-04-03 08:26:03 +00:00