Dmitry Vyukov
0632dd410c
tsan: fix the message (tsan is not asan)
...
llvm-svn: 173784
2013-01-29 09:39:58 +00:00
Dmitry Vyukov
7943b69002
tsan: add IsSymbolizerAvailable() function for querying for presence of internal/external symbolizer
...
llvm-svn: 173783
2013-01-29 09:35:14 +00:00
Timur Iskhodzhanov
6cff9deb16
Use the correct order of NOINLINE vs ret type to fix Windows build
...
llvm-svn: 173694
2013-01-28 17:29:50 +00:00
Alexey Samsonov
5311754b62
[CMake] Fix compiler-rt tests after r173617
...
llvm-svn: 173668
2013-01-28 07:16:22 +00:00
Alexey Samsonov
622a7b2408
[Sanitizer] More fixes to scanf interceptor: stub support for %s, support for %[...] directive
...
llvm-svn: 173451
2013-01-25 15:26:19 +00:00
Kostya Serebryany
c1056f90ae
[sanitizer] improve the calloc overflow check (spotted by samsonov@)
...
llvm-svn: 173443
2013-01-25 12:22:21 +00:00
Kostya Serebryany
fa79cd65e2
[sanitizer] fix calloc overflow in asan/tsan/msan
...
llvm-svn: 173441
2013-01-25 11:46:22 +00:00
Alexey Samsonov
4899fb5cfb
[Sanitizer] fix errors in scanf interceptors: add support for %c and fix cases like %5d
...
llvm-svn: 173440
2013-01-25 11:43:32 +00:00
Alexey Samsonov
971b0cd26f
[Sanitizer] use stub InternalSymbolizer on platforms where we don't have weak hooks
...
llvm-svn: 173347
2013-01-24 14:01:59 +00:00
Alexey Samsonov
8db4077583
[Sanitizer] Add skeleton for InternalSymbolizer that can be used by providing callbacks __sanitizer_symbolize_{code,data}
...
llvm-svn: 173344
2013-01-24 13:42:45 +00:00
Dmitry Vyukov
6e406cda4b
tsan: implement malloc stats querying
...
llvm-svn: 173332
2013-01-24 09:08:03 +00:00
Dmitry Vyukov
0ced85a8c7
asan/tsan: fix pwrite interceptors
...
llvm-svn: 173328
2013-01-24 07:44:21 +00:00
Kostya Serebryany
7206a145dd
[sanitizer] increase the minimal mmap size in allocator to 2^16; fix the asan Mac build
...
llvm-svn: 173261
2013-01-23 14:07:17 +00:00
Dmitry Vyukov
5787924e85
tsan: add missing interceptors
...
llvm-svn: 173253
2013-01-23 11:52:19 +00:00
Evgeniy Stepanov
5f37c82154
[sanitizer] Disable scanf interceptor on windows.
...
llvm-svn: 173037
2013-01-21 13:30:08 +00:00
Evgeniy Stepanov
5e7936f646
[sanitizer] Define va_copy on win32.
...
llvm-svn: 173025
2013-01-21 11:32:50 +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
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
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
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
Evgeniy Stepanov
222076e972
[sanitizer] Common *scanf interceptors.
...
llvm-svn: 172805
2013-01-18 11:17:23 +00:00
Kostya Serebryany
69fe0ba415
[sanitizer] reapply r172719, r172721-172723, r172725, and also fix the warning on Mac.
...
llvm-svn: 172791
2013-01-18 06:43:13 +00:00
Jakob Stoklund Olesen
7956e0094d
Revert r172719, r172721-172723, and r172725.
...
The r172719 patch broke the build on Mac, the others depended on it.
compiler-rt/lib/asan/asan_interceptors.cc:78:13: error: unused function
'SetThreadName' [-Werror,-Wunused-function]
static void SetThreadName(const char *name) {
Orignal headlines:
[asan] attempting to fix the Mac build
[asan] restructure read/pread/pread64 tests
[sanitizer] move write/pwrite/pwrite64 interceptors to common
[msan] start using common interceptors in msan
[tsan] move prctl interceptor from asan to common_interceptors thus enabling it for tsan too
llvm-svn: 172763
2013-01-17 22:51:56 +00:00
Peter Collingbourne
6600516a58
Have ReExec read environment from /proc/self/environ
...
It is possible for ReExec to be called before the C standard library
has initialised itself sufficiently for execv to work properly.
Fix this by parsing the environment ourselves and using execve.
Differential Revision: http://llvm-reviews.chandlerc.com/D304
llvm-svn: 172748
2013-01-17 19:50:42 +00:00
Kostya Serebryany
87eb229241
[asan] attempting to fix the Mac build
...
llvm-svn: 172725
2013-01-17 15:14:20 +00:00
Kostya Serebryany
5cdd91fc43
[sanitizer] move write/pwrite/pwrite64 interceptors to common
...
llvm-svn: 172722
2013-01-17 14:48:03 +00:00
Kostya Serebryany
f7f5566055
[tsan] move prctl interceptor from asan to common_interceptors thus enabling it for tsan too
...
llvm-svn: 172719
2013-01-17 13:38:16 +00:00
Kostya Serebryany
93ebdb5d64
[sanitizer] a bit more unification for interceptors (merge read/pread/pread64 in asan and tsan)
...
llvm-svn: 172713
2013-01-17 13:09:00 +00:00
Dmitry Vyukov
59e5d358db
tsan: fix a bug
...
llvm-svn: 172712
2013-01-17 12:59:10 +00:00
Dmitry Vyukov
e528f67c14
tsan: fix a bug
...
llvm-svn: 172710
2013-01-17 12:13:03 +00:00
Dmitry Vyukov
7f4603200f
asan: fix ARM build
...
llvm-svn: 172613
2013-01-16 14:35:13 +00:00
Dmitry Vyukov
9ab63f68fc
asan: fix standalone malloc implementation
...
llvm-svn: 172529
2013-01-15 12:57:02 +00:00
Kostya Serebryany
c4bb752e3b
[sanitizer] hide PR_SET_NAME under an ifdef (for older kernels)
...
llvm-svn: 172523
2013-01-15 09:03:23 +00:00
Dmitry Vyukov
2854326db6
asan: correct non-temporal prefetch for memory allocator
...
llvm-svn: 172522
2013-01-15 09:03:20 +00:00
Dmitry Vyukov
45a698eb58
asan: faster thead-local cache for memory allocator
...
llvm-svn: 172521
2013-01-15 09:02:20 +00:00
Dmitry Vyukov
1f48c1a9a1
asan: fix lint warnings
...
llvm-svn: 172520
2013-01-15 08:51:10 +00:00
Dmitry Vyukov
74764617d7
asan: fix bugs in the testlib
...
llvm-svn: 172519
2013-01-15 08:33:41 +00:00
Dmitry Vyukov
1e4b54d196
asan: rename the file (it's not 64-bit specific anymore)
...
llvm-svn: 172518
2013-01-15 08:04:27 +00:00
Evgeniy Stepanov
99d91289b6
Move large part of asan_test_utils.h to sanitizer_common.
...
Move my_rand() to the common header.
This lets us avoid the use of rand_r in sanitizer_common tests.
There is no rand_r on Android.
llvm-svn: 172421
2013-01-14 15:12:26 +00:00
Alexey Samsonov
4e958e5ddb
Fix-up copypasto from r172410
...
llvm-svn: 172419
2013-01-14 14:52:35 +00:00
Dmitry Vyukov
ff19809a3d
asan: fix windows build
...
llvm-svn: 172415
2013-01-14 14:28:06 +00:00
Evgeniy Stepanov
cfe3b3b956
Build rules for sanitizer_common tests on Android.
...
llvm-svn: 172410
2013-01-14 14:08:25 +00:00
Evgeniy Stepanov
e375a1f036
Remove thread-locals from sanitizer_common tests.
...
Not supported on Android.
llvm-svn: 172408
2013-01-14 14:06:58 +00:00