Evgeniy Stepanov
f9a7aba34a
[msan] Simplify test code.
...
llvm-svn: 173155
2013-01-22 12:33:11 +00:00
Evgeniy Stepanov
2b65c0d1cf
[msan] Test handling of volatile bitfields.
...
llvm-svn: 173154
2013-01-22 12:31:39 +00:00
Evgeniy Stepanov
ef68259d26
[msan] Stop using volatile assignments as undef checks in MSan tests.
...
A runtime call is used instead.
MSan will stop adding shadow checks on volatile stores soon.
llvm-svn: 173152
2013-01-22 12:29:00 +00:00
Alexander Potapenko
81f0b331dc
[ASan] Disable the new/delete implementations for OSX
...
See https://code.google.com/p/address-sanitizer/issues/detail?id=131
llvm-svn: 173149
2013-01-22 11:39:28 +00:00
Alexey Samsonov
1e63b08575
ASan: add output test for -fsanitize-address-zero-based-shadow option on Linux
...
llvm-svn: 173146
2013-01-22 10:45:20 +00:00
Alexander Potapenko
dc00c44d46
[ASan] Remove the declarations of pthread_workqueue_t and pthread_workitem_handle_t, which are used no more.
...
Kudos to Jeremy Huddleston Sequoia <jeremyhu@apple.com>
llvm-svn: 173143
2013-01-22 10:32:06 +00:00
Alexey Samsonov
d7b901d581
ASan: use Clang -fsanitize-blacklist flag in unit tests (instead of -mllvm)
...
llvm-svn: 173142
2013-01-22 10:30:17 +00:00
Alexander Potapenko
0c92557fcb
[ASan] Fix the path to ASan interface in interface_symbols_linux.c
...
llvm-svn: 173140
2013-01-22 10:13:37 +00:00
Alexander Potapenko
5ef0f677ae
[ASan] Moved interface_symbols.c to lit_tests/Linux.
...
We already have Darwin-specific version of this test.
llvm-svn: 173136
2013-01-22 09:22:10 +00:00
Alexander Potapenko
cae42d23a6
[ASan] Use dylib interposition to hook memory allocation in the dynamic runtime.
...
This CL drastically simplifies the way we're hooking the memory allocation routines in ASan on Mac by using dylib interposition to replace the main malloc_zone_* functions. This allows us to avoid replacing the default CFAllocator and drop the CF dependency at all.
Committing this patch will result in the static runtime being broken. A follow-up CL will switch ASan to use the dynamic runtime library.
llvm-svn: 173134
2013-01-22 09:14:54 +00:00
Alexey Samsonov
a168f30073
ASan: simplify build rules for unit tests
...
llvm-svn: 173133
2013-01-22 07:31:28 +00:00
Alexey Samsonov
2f20275730
ASan: disable flexible mapping and offset on Android. It doesn't work for dynamic ASan runtime there
...
llvm-svn: 173132
2013-01-22 07:21:24 +00:00
Kostya Serebryany
56fc958506
[asan] split asan_test.cc even more
...
llvm-svn: 173131
2013-01-22 07:01:47 +00:00
Kostya Serebryany
81e916893d
[asan] split asan_test.cc more
...
llvm-svn: 173130
2013-01-22 06:50:42 +00:00
Kostya Serebryany
4184b64094
[asan] split asan_test.cc to speedup parallel build (most important if building with a debug clang, which takes a couple of minutes on this large file with templates). More splits to follow
...
llvm-svn: 173129
2013-01-22 06:39:20 +00:00
Kostya Serebryany
031b69d8df
[asan] fix linux build
...
llvm-svn: 173049
2013-01-21 15:04:36 +00:00
Alexander Potapenko
c21aa5cb39
[ASan] Move Mac-specific tests to asan_mac_test.cc
...
llvm-svn: 173048
2013-01-21 14:49:55 +00:00
Alexey Samsonov
b670018c9f
CMake: generalize checking for target availability and add initial support for PowerPC native arch. With this patch, building LLVM on PowerPC native arch produces a working ASan runtime.
...
llvm-svn: 173044
2013-01-21 14:31:45 +00:00
Evgeniy Stepanov
5f37c82154
[sanitizer] Disable scanf interceptor on windows.
...
llvm-svn: 173037
2013-01-21 13:30:08 +00:00
Alexey Samsonov
362286f34c
Fixup for r173021: build tests with zero-based shadow on Android only, fix condition in checking for shadow gap in asan_mapping.h
...
llvm-svn: 173026
2013-01-21 11:36:38 +00:00
Evgeniy Stepanov
5e7936f646
[sanitizer] Define va_copy on win32.
...
llvm-svn: 173025
2013-01-21 11:32:50 +00:00
Kostya Serebryany
9b46312c87
[tsan] fix thread_name.cc test to work with older versions of libc
...
llvm-svn: 173023
2013-01-21 11:20:49 +00:00
Alexey Samsonov
6ad1d7809d
ASan: build unit tests with -fsanitize-address-zero-base-shadow on Linux and Android
...
llvm-svn: 173021
2013-01-21 10:51:18 +00:00
Evgeniy Stepanov
f940b2e381
[asan] Move *scanf declarations out of mac-only section.
...
llvm-svn: 173020
2013-01-21 10:33:14 +00:00
Alexey Samsonov
3fd1260155
ASan: build runtime flexible mapping and offset in configure+make build as well
...
llvm-svn: 173016
2013-01-21 09:13:10 +00:00
Alexey Samsonov
a58bcf70a1
ASan: use dynamic lookup when building dynamic ASan runtime on Mac, because shadow mapping and offset are defined in the instrumented modules instead of runtime
...
llvm-svn: 173015
2013-01-21 09:07:01 +00:00
Alexey Samsonov
b52d1a56f0
ASan: build runtime library with ASAN_FLEXIBLE_MAPPING_AND_OFFSET=1 as shadow mapping/offset are always emitted by the LLVM backend now
...
llvm-svn: 173013
2013-01-21 08:24:19 +00:00
Alexey Samsonov
b399118cad
CMake: add functions creating universal runtime libraries for several architectures on OS X and use them in ASan and UBSan build rules
...
llvm-svn: 173011
2013-01-21 08:12:20 +00:00
Alexey Samsonov
4e50333684
CMake: Add add_compiler_rt_osx_object_library to create universal libraries on Mac
...
llvm-svn: 172979
2013-01-20 14:36:12 +00:00
Alexey Samsonov
d0522c73b5
CMake: use add_compiler_rt_static_runtime to build TSan and MSan runtimes. No functionality change.
...
llvm-svn: 172978
2013-01-20 14:14:13 +00:00
Alexey Samsonov
8c2cd862b6
CMake: Add add_compiler_rt_static_runtime function and use it to build generic compiler-rt libraries
...
llvm-svn: 172977
2013-01-20 13:58:10 +00:00
Alexey Samsonov
3292fde911
Temporary disable test added in r172828 as it seems to be flaky on the buildbots
...
llvm-svn: 172976
2013-01-20 13:41:26 +00:00
Alexey Samsonov
2d04812a45
Fixup for r172828: use InternalScopedBuffer in favor of large stack buffers
...
llvm-svn: 172975
2013-01-20 13:22:06 +00:00
Alexey Samsonov
67c8e14760
Fix a typo from r172289
...
llvm-svn: 172830
2013-01-18 17:03:47 +00:00
Alexey Samsonov
b068483d4d
CMake: Generalize build rules for different arches for sanitizer_common, asan, ubsan
...
llvm-svn: 172829
2013-01-18 16:51:07 +00:00
Alexander Potapenko
b4ba995366
[ASan] Fix the log_path option to use different log files for parent and child processes after fork().
...
llvm-svn: 172828
2013-01-18 16:44:27 +00:00
Evgeniy Stepanov
8a3666f63c
[sanitizer] Workaround broken mktemp on certain platforms.
...
llvm-svn: 172827
2013-01-18 16:24:50 +00:00
Alexey Samsonov
163ab9d0a5
CMake: create AddCompilerRT module and implement convenience add_compiler_rt_object_library function
...
llvm-svn: 172826
2013-01-18 16:05:21 +00:00
Evgeniy Stepanov
c8cde8d736
[sanitizer] Enable cpplint for .inc files.
...
llvm-svn: 172825
2013-01-18 15:53:43 +00:00
Evgeniy Stepanov
01671c33ff
[sanitizer] lint
...
llvm-svn: 172817
2013-01-18 13:12:56 +00:00
Alexey Samsonov
4b0ee8ecd5
CMake: start to generalize rules for non-x86 architectures
...
llvm-svn: 172816
2013-01-18 13:10:42 +00:00
Kostya Serebryany
84c7e47b5c
[asan] kill some dead code
...
llvm-svn: 172815
2013-01-18 13:01:44 +00:00
Evgeniy Stepanov
a6c4a387ee
[sanitizer] Rename 2 files *.h->*.inc as appropriate.
...
Also add a missing include.
llvm-svn: 172814
2013-01-18 13:01:18 +00:00
Alexey Samsonov
193b45f4fe
CMake variables renaming: X86_64->x86_64 I386->i386
...
llvm-svn: 172812
2013-01-18 12:45:44 +00:00
Evgeniy Stepanov
518a135ffe
[sanitizer] Remove an unused variable.
...
llvm-svn: 172811
2013-01-18 12:32:02 +00:00
Alexander Potapenko
a6d40f638e
[ASan] Fix compilation on Mac.
...
llvm-svn: 172810
2013-01-18 12:31:16 +00:00
Evgeniy Stepanov
91181eaa59
[sanitizer] Fix Mac build.
...
llvm-svn: 172809
2013-01-18 11:38:23 +00:00
Kostya Serebryany
63c36bbe5e
[asan] fix two off-by-one errors that seem to affect only PowerPC because only there the stack top may be equal to the address space top. Noted by Andreas Schwab in http://gcc.gnu.org/bugzilla/show_bug.cgi?id=55975#c11 . Also make swapcontext interceptor a bit more robust
...
llvm-svn: 172807
2013-01-18 11:30:36 +00:00
Evgeniy Stepanov
222076e972
[sanitizer] Common *scanf interceptors.
...
llvm-svn: 172805
2013-01-18 11:17:23 +00:00
Alexander Potapenko
51794a390f
Remove references to pthread_workqueue_additem_np(), which isn't in the official libdispatch API.
...
llvm-svn: 172802
2013-01-18 10:27:31 +00:00