Alexey Samsonov
2906117857
[ASan] now we don't need llvm_obj_root to access llvm-symbolizer tool
...
llvm-svn: 167823
2012-11-13 07:55:16 +00:00
Alexey Samsonov
c835b9e4a3
[ASan] test blacklist functionality for global-init-order checker (r167725)
...
llvm-svn: 167727
2012-11-12 14:03:00 +00:00
Alexander Potapenko
9448581d9e
[ASan] Remove llvm-symbolizer from compiler-rt/utils/
...
This is the first (1/2) part of a change that moves llvm-symbolizer to llvm/tools/, which will allow to build it
with both cmake and configure+make.
llvm-svn: 167722
2012-11-12 11:32:42 +00:00
Alexander Potapenko
5066c5d9b7
[ASan] Fix the golden stack for use-after-free.cc.
...
The change has been caused by the switch to llvm-symbolizer, that prints inlined stack frames.
This should fix PR 14251
llvm-svn: 167721
2012-11-12 11:27:24 +00:00
Alexander Potapenko
4b8e32de12
Add a possible underscore before the wrappers to the output expectations for Darwin
...
llvm-svn: 167610
2012-11-09 11:55:33 +00:00
Richard Smith
77930919ad
Update compiler-rt tests to match flag renaming/deprecation in Clang.
...
llvm-svn: 167434
2012-11-06 02:31:42 +00:00
Alexey Samsonov
0c8b755839
Flag -ccc-clang-cxx was removed in r166986, remove it from compiler-rt lit configs
...
llvm-svn: 167010
2012-10-30 10:06:42 +00:00
Chandler Carruth
580916eacb
Re-enable this test now that r166172 has hacked around the terrible
...
limitations of the pass manager stack in the pass manager builder.
llvm-svn: 166173
2012-10-18 08:06:28 +00:00
Kostya Serebryany
9ced62d195
[asan] added a test for a bug in asan at -O0 introduced by r165936 (making asan a FunctionPass). The test is not actually enabled for -O0 yet (since it fails)
...
llvm-svn: 166103
2012-10-17 13:42:04 +00:00
Kostya Serebryany
16205cd4fa
[asan] change the asan output slightly to avoid user confusion: a) add ':' after 'AddressSanitizer' and b) changed 'crashed' to 'SEGV'
...
llvm-svn: 165932
2012-10-15 13:04:58 +00:00
Alexey Samsonov
480477c0e1
[ASan] use llvm-symbolizer for ASan lit-style tests on Mac
...
llvm-svn: 165391
2012-10-08 13:11:18 +00:00
Kostya Serebryany
cb13fff13d
[asan] properly report mmap failure
...
llvm-svn: 165214
2012-10-04 07:21:09 +00:00
Alexey Samsonov
78c340d205
[ASan] Change __asan_set_on_error_callback to weak overridable __asan_on_error, so that ASan would call the latter even if it finds the error early (i.e. during module initialization)
...
llvm-svn: 165008
2012-10-02 14:06:39 +00:00
Alexey Samsonov
e29c6731aa
[Sanitizer/ASan] Simplify the code that prints and symbolizes stack traces. Fall back to module+offset if user-provided symbolizer failed. Use weak function __asan_symbolize instead of __asan_set_symbolize_callback in ASan interface, so that we're able to symbolize reports for errors that happen before the main() is called, for example, during module initialization.
...
llvm-svn: 165000
2012-10-02 12:11:17 +00:00
Alexey Samsonov
2d9899b2ce
[ASan] use llvm-symbolizer (in offline mode) in ASan output tests on Linux
...
llvm-svn: 164819
2012-09-28 11:05:41 +00:00
Kostya Serebryany
45d849c4bd
[asan] add asan option log_path=PATH to let users redirect asan reports to a file PATH.PID instead of stderr
...
llvm-svn: 163872
2012-09-14 04:35:14 +00:00
Alexey Samsonov
f42e860c51
[ASan] hack initialization-bug test so that it stably passes on both Linux and Mac: make the bug appear independent of the translation unit order
...
llvm-svn: 163381
2012-09-07 09:24:29 +00:00
Alexey Samsonov
0f5f1d5bfa
[ASan] add Linux-specific test for initialization order that checks that we find a bug independently of translation units order
...
llvm-svn: 163379
2012-09-07 09:04:31 +00:00
Kostya Serebryany
f9caa28ccf
[asan] increase max stack size to 256 (+test)
...
llvm-svn: 163308
2012-09-06 10:57:03 +00:00
Alexey Samsonov
2947b84743
[ASan] Hack ASan lit config to allow running lit on tests manually
...
llvm-svn: 163209
2012-09-05 10:41:25 +00:00
Kostya Serebryany
4d45b9b784
[asan] added tests for asan-initialization-order, patch by Reid Watson
...
llvm-svn: 163207
2012-09-05 09:07:02 +00:00
Alexey Samsonov
c402cb62fd
[ASan] Add print_full_thread_history runtime option (on by default) that prints all full thread creation paths for threads involved in ASan error report
...
llvm-svn: 163200
2012-09-05 07:37:15 +00:00
Alexey Samsonov
608a4b5def
[ASan] fix flakiness of Linux-specific clone_test: waitpid should better be provided with __WCLONE option, otherwise it didn't wait for the subprocess, returned -1, and we went crushing the subprocess stack
...
llvm-svn: 162842
2012-08-29 15:48:14 +00:00
Chandler Carruth
1aa4fef601
Relocate the external headers provided by ASan and the common sanitizer
...
library.
These headers are intended to be available to user code when built with
AddressSanitizer (or one of the other sanitizer's in the future) to
interface with the runtime library. As such, they form stable external
C interfaces, and the headers shouldn't be located within the
implementation.
I've pulled them out into what seem like fairly obvious locations and
names, but I'm wide open to further bikeshedding of these names and
locations.
I've updated the code and the build system to cope with the new
locations, both CMake and Makefile. Please let me know if this breaks
anyone's build.
The eventual goal is to install these headers along side the Clang
builtin headers when we build the ASan runtime and install it. My
current thinking is to locate them at:
<prefix>/lib/clang/X.Y/include/sanitizer/common_interface_defs.h
<prefix>/lib/clang/X.Y/include/sanitizer/asan_interface.h
<prefix>/lib/clang/X.Y/include/sanitizer/...
But maybe others have different suggestions?
Fixing the style of the #include between these headers at least unblocks
experimentation with installing them as they now should work when
installed in these locations.
llvm-svn: 162822
2012-08-29 02:27:54 +00:00
Alexey Samsonov
4d520640ba
[ASan] use write instead of puts in malloc hooks test for ASan, as puts calls malloc on Mac
...
llvm-svn: 162359
2012-08-22 13:32:37 +00:00
Alexey Samsonov
a85b6b8154
[ASan] get rid of ASAN_USE_EXTERNAL_SYMBOLIZER compiler def in favor of __asan_set_symbolize_callback interface function. Now the user doesn't have to recompile ASan runtime to provide its own symbolizer
...
llvm-svn: 162358
2012-08-22 13:31:37 +00:00
Alexey Samsonov
de17f86655
[ASan] make ASan malloc/free hooks weak interface functions, overridable by user. Now the user can control malloc/free hooks without recompiling ASan runtime
...
llvm-svn: 162355
2012-08-22 10:12:47 +00:00
Alexey Samsonov
5b2c6ea38f
[ASan] lit tests: use nm instead of llvm-nm, until llvm-nm becomes usable on Mac. Port output test change in r161948 to lit
...
llvm-svn: 161951
2012-08-15 14:33:30 +00:00
Alexey Samsonov
9fe914b099
[ASan] Port (the last one) tricky interface_test to lit, and a *huge* chunks of boilerplate to run tests for 32/64 bits and all optimization levels. Alas, lit doesn't support for loops in RUN-lines...
...
llvm-svn: 161941
2012-08-15 11:26:57 +00:00
Alexey Samsonov
0e056762ef
[ASan] use clangxx_asan instead of clang_asan for C++ lit tests
...
llvm-svn: 161936
2012-08-15 08:54:14 +00:00
Alexey Samsonov
6016486a16
[ASan] port remaining output and feature tests to lit. TODO: we should in fact run most of the tests for 32/64 bits and for all optimization levels
...
llvm-svn: 161935
2012-08-15 08:29:17 +00:00
Alexey Samsonov
5717f4c1eb
[ASan] port interception and shared library tests to lit
...
llvm-svn: 161933
2012-08-15 07:13:51 +00:00
Alexey Samsonov
eb39adc9fa
[ASan] make sure __asan_default_options gets default visibility, port corresponding test to lit
...
llvm-svn: 161869
2012-08-14 13:54:28 +00:00
Alexey Samsonov
bf2bfa5aa4
[ASan] support for running OS-specific tests using lit, port clone_test as an example
...
llvm-svn: 161864
2012-08-14 13:22:58 +00:00
Alexey Samsonov
fb844c7eff
[ASan] CMake support for building ASan runtime as a universal binary on Mac
...
llvm-svn: 161665
2012-08-10 14:45:52 +00:00
Alexey Samsonov
0317b8bbc0
[ASan] simplify cmake rules for adding lit testsuites
...
llvm-svn: 161412
2012-08-07 11:09:41 +00:00
Alexey Samsonov
1e6c947a4c
[ASan] add llvm_tools_dir to lit.site.cfg for ASan and add it to PATH
...
llvm-svn: 161411
2012-08-07 11:00:19 +00:00
Alexey Samsonov
59c33c0c9a
[ASan] Add support for running unit tests by lit (as a part of 'make check-asan' command)
...
llvm-svn: 161406
2012-08-07 08:59:15 +00:00
Alexey Samsonov
7b2f36e96a
First tiny move towards integrating AddressSanitizer regressions test into LLVM lit-based testing infrastructure.
...
The goal is to be able to run ASan tests by simply running "make check-asan" command from CMake build tree:
* tests should use fresh clang binary from current build tree.
* tests should use the same RUN-lines syntax as llvm/clang reg tests.
Next steps:
- restricting tests to machines where target is equal to host, i.e. where we can produce working binaries.
- moving AddressSanitizer unit tests to lit as well.
llvm-svn: 161050
2012-07-31 15:43:11 +00:00