Alexey Samsonov
cad2e4e6c2
temporary include stdlib.h in symbolizer to fix Mac/Win build
...
llvm-svn: 157808
2012-06-01 07:41:47 +00:00
Kostya Serebryany
02845c1dd4
[asan] fix gcc build
...
llvm-svn: 157807
2012-06-01 07:41:04 +00:00
Alexey Samsonov
6f596767c3
Stub files for common symbolizer for AddressSanitizer and ThreadSanitizer tools.
...
It is an analogue of addr2line utility and should allow to map instruction address to a location
in source code at run-time. It should use debug information (in DWARF) in a binary, and hopefully
it would be possible to re-use code from llvm/DebugInfo/DIContext.h
llvm-svn: 157806
2012-06-01 06:11:13 +00:00
Dmitry Vyukov
95a5c5ca4c
tsan: intercept longjmp() but die in it, greatly simplifies problem diagnostic
...
llvm-svn: 157760
2012-05-31 18:03:59 +00:00
Kostya Serebryany
8a66b71c8f
[asan] partial fix for windows build
...
llvm-svn: 157750
2012-05-31 16:06:05 +00:00
Kostya Serebryany
f8c5a5bcbc
[asan] partial fix for windows build
...
llvm-svn: 157748
2012-05-31 15:44:05 +00:00
Kostya Serebryany
1d35d155fd
[asan] more renaming
...
llvm-svn: 157747
2012-05-31 15:02:07 +00:00
Kostya Serebryany
8d03204204
[asan] more renaming
...
llvm-svn: 157746
2012-05-31 14:35:53 +00:00
Dmitry Vyukov
6f448700e4
tsan: fix a typo
...
llvm-svn: 157744
2012-05-31 14:24:10 +00:00
Kostya Serebryany
1b71207f48
[asan,tsan] introduce sanitizer_common/sanitizer_defs.h and perform some renaming in asan rt. More to come.
...
llvm-svn: 157743
2012-05-31 14:11:07 +00:00
Alexander Potapenko
a39c2fec46
Fix the wildcards for two output tests on Darwin.
...
It turns out that atos does not print the symbol names for static C++ functions correctly (one of the two leading underscores is omitted), so they remain mangled.
llvm-svn: 157742
2012-05-31 13:55:40 +00:00
Kostya Serebryany
c5bea20e2e
[asan,tsan] rename files in sanitizer_common to have a common prefix (sanitizer_).
...
llvm-svn: 157740
2012-05-31 13:42:53 +00:00
Dmitry Vyukov
d6ffccd1da
tsan: suppress reports against source file names as well
...
llvm-svn: 157739
2012-05-31 13:18:11 +00:00
Alexander Potapenko
bb50e7f08c
Be more verbose when installing the signals.
...
llvm-svn: 157693
2012-05-30 15:29:11 +00:00
Alexander Potapenko
6e216bea86
Fix a bug in parsing boolean flags: we used to take the first char of the key=value string
...
instead of the first character of the value.
llvm-svn: 157692
2012-05-30 15:28:45 +00:00
Alexander Potapenko
93b2c7d516
Be less verbose when parsing the default options.
...
llvm-svn: 157691
2012-05-30 14:12:20 +00:00
Dmitry Vyukov
92d917d91c
tsan: prevent recursive signal handlers
...
llvm-svn: 157625
2012-05-29 15:51:27 +00:00
Kostya Serebryany
458b4006b2
[asan,tsan] Add a new directory compiler-rt/lib/sanitizer_common
...
which will contain code shared between asan and tsan run-times.
Naming is hard. If you can suggest a better name for the directory -- speak up.
llvm-svn: 157611
2012-05-29 12:18:18 +00:00
Alexey Samsonov
1cbe656d66
Fixing ASan build on Win: don't use __asan_default_options
...
llvm-svn: 157608
2012-05-29 09:39:01 +00:00
Alexander Potapenko
d07b7b529a
Do not define ___asan_default_options on Windows.
...
llvm-svn: 157603
2012-05-29 08:26:18 +00:00
Alexey Samsonov
80bc3b0d2b
Fix atoi stub for linux introduced in r157573. This fixes compiler-rt build on linux.
...
llvm-svn: 157600
2012-05-29 06:55:01 +00:00
Dmitry Vyukov
9bf897e696
tsan: fix compiler warnings
...
llvm-svn: 157585
2012-05-28 17:33:08 +00:00
Dmitry Vyukov
880bb6697f
tsan: fix race during pthread_join/detach
...
llvm-svn: 157584
2012-05-28 17:32:50 +00:00
Alexander Potapenko
0efd915d92
Rework the flags machinery a bit.
...
Clients may define the __asan_default_options char string containing the default options for the tool now.
llvm-svn: 157582
2012-05-28 16:21:19 +00:00
Alexander Potapenko
db892de581
More verbose check in AppendString.
...
llvm-svn: 157580
2012-05-28 15:00:45 +00:00
Dmitry Vyukov
e1bbb2f34a
tsan: pass CFLAGS to tests
...
llvm-svn: 157579
2012-05-28 14:15:39 +00:00
Dmitry Vyukov
ed5bc02740
tsan: be more conservative wrt symbolizer output
...
llvm-svn: 157578
2012-05-28 14:14:53 +00:00
Bill Wendling
aa888a29eb
Add support for the GCOV_PREFIX_STRIP env variable which tries to strip off the first 'n' directories from the filename.
...
llvm-svn: 157574
2012-05-28 10:09:01 +00:00
Bill Wendling
1e039681c5
Add stub for 'atoi'.
...
llvm-svn: 157573
2012-05-28 09:58:27 +00:00
Bill Wendling
65adec933d
Simplify the logic that tries to open the GCDA file at all costs. Basically, if
...
we can't open the file even after creating all of the directories to it, then
just give up.
llvm-svn: 157572
2012-05-28 09:46:43 +00:00
Bill Wendling
bba2a7d46d
* A bit of cleanup of the 'recursive_mkdir'. No functionality change.
...
* Check for absolute paths before using the GCOV_PREFIX.
* Don't add an ending path separator if there's already one.
llvm-svn: 157571
2012-05-28 09:41:48 +00:00
Dmitry Vyukov
d558530754
tsan: increase /proc/self/maps max size (1M is far not enough)
...
llvm-svn: 157570
2012-05-28 09:24:01 +00:00
Dmitry Vyukov
bd310f02a5
asan/tsan: rename interceptors from __xsan_xxx to __interceptor_xxx
...
llvm-svn: 157569
2012-05-28 07:47:35 +00:00
Dmitry Vyukov
ebdf670ae7
tsan: more robust detection of stack of main thread
...
llvm-svn: 157568
2012-05-28 07:46:42 +00:00
Dmitry Vyukov
3de9ca068f
tsan: use DCHECK_GT/LT instead of plain DCHECK (better diagnostics)
...
llvm-svn: 157567
2012-05-28 07:45:35 +00:00
Dmitry Vyukov
2d4e3c140f
tsan: do not clean stack/tls for main thread
...
llvm-svn: 157566
2012-05-28 07:44:34 +00:00
Dmitry Vyukov
9b13e9f3b5
asan: remove static libraries on make clean
...
llvm-svn: 157565
2012-05-28 07:43:36 +00:00
Bill Wendling
f16084723c
Don't use 'strrchr', which isn't implemented here yet.
...
llvm-svn: 157560
2012-05-28 02:50:53 +00:00
Bill Wendling
74f987f3b6
Sync with old GCOV runtime library's file.
...
llvm-svn: 157559
2012-05-28 02:34:34 +00:00
Alexander Potapenko
4e424b85e3
Typo fix.
...
llvm-svn: 157477
2012-05-25 15:56:40 +00:00
Alexander Potapenko
85e93ef612
Factor ParseAsanOptions outside __asan_init
...
llvm-svn: 157473
2012-05-25 15:37:16 +00:00
Alexander Potapenko
442002568c
Introduce the check_malloc_usable_size flag (on by default).
...
When the flag is set to zero, we do not check for errors in malloc_usable_size.
This may be useful to work around a bug in Nvidia drivers prior to 295.*
llvm-svn: 157472
2012-05-25 15:20:13 +00:00
Dmitry Vyukov
7339eb197b
tsan: do not call into libc in symbolizer and in other code (this causes recursion and crashes)
...
llvm-svn: 157466
2012-05-25 11:15:04 +00:00
Dmitry Vyukov
e86497ee1c
tsan: output message about failure to intercept only if verbosity flag is passed
...
llvm-svn: 157465
2012-05-25 09:47:18 +00:00
Dmitry Vyukov
ff25cf5887
asan: fix tests
...
depending on -m32/-m64 addr2line says either e.g. __xsan_strnlen or just strnlen
llvm-svn: 157464
2012-05-25 09:46:33 +00:00
Meador Inge
6fef6e6466
Adding back a right parenthesis that was dropped in r157388.
...
llvm-svn: 157406
2012-05-24 18:16:39 +00:00
Dmitry Vyukov
d1b9521e48
tsan: compilation of tests with newest clang
...
llvm-svn: 157392
2012-05-24 14:55:12 +00:00
Dmitry Vyukov
30c32a8819
tsan: fix compilation with newest clang
...
llvm-svn: 157391
2012-05-24 14:50:33 +00:00
Dmitry Vyukov
7fb7330469
asan/tsan: weak interceptors
...
The idea isthat asan/tsan can survive if user intercepts the same functions. At the same time user has an ability to call back into asan/tsan runtime. See the following tests for examples:
asan/output_tests/interception_failure_test-linux.cc
asan/output_tests/interception_test-linux.cc
asan/output_tests/interception_malloc_test-linux.cc
llvm-svn: 157388
2012-05-24 13:54:31 +00:00
Dmitry Vyukov
65c21a5e6d
tsan: add a flag to control RunningOnValgrind() return value
...
llvm-svn: 157383
2012-05-24 09:24:45 +00:00