Alexey Samsonov
968a358974
[ASan] Add new options for asan_symbolize.py script.
...
The patch adds new features in asan-symbolizer script which are helpful for using ASan on embedded systems:
1) add cross-compile prefix for binutils
2) define path to sysroot with sanitized binaries
Features are enabled by command line options.
The patch also extends command line interface with help option.
Reviewed in http://reviews.llvm.org/D4703 .
Patch by Maria Guseva!
llvm-svn: 215381
2014-08-11 20:02:49 +00:00
Viktor Kutuzov
5f5adb8ed5
Add FreeBSD support to the Asan symbolization script
...
Differential Revision: http://reviews.llvm.org/D4560
llvm-svn: 213370
2014-07-18 12:07:00 +00:00
Alexander Potapenko
9c62a6d8a2
[ASan] Factor out SymbolizationLoop.process_line() function to let Python
...
scripts that import asan_symbolize to symbolize their reports line by line.
llvm-svn: 213136
2014-07-16 11:00:16 +00:00
Evgeniy Stepanov
86c077b3a2
[asan] Remove runtime assembly helpers.
...
Remove helper functions that were used in assembly instrumentation.
Patch by Yuri Gorshenin.
llvm-svn: 212456
2014-07-07 13:59:12 +00:00
Evgeniy Stepanov
57eba53a01
[asan] asan_device_setup: extend search path
...
In standalone build asan-rt is stored in yet another path.
llvm-svn: 210259
2014-06-05 12:49:35 +00:00
Evgeniy Stepanov
687933f55d
[asan] Fix x86 asm instrumentation to preserve flags.
...
This change also enables asm instrumentation in asan tests that was
accidentally disabled yearlier, and adds a sanity test for that.
Patch by Yuri Gorshenin.
llvm-svn: 209282
2014-05-21 08:21:14 +00:00
Kostya Serebryany
6c039b3459
[asan] update asan_symbolize.py to use the new llvm-symbolizer flag syntax
...
llvm-svn: 209116
2014-05-19 08:30:51 +00:00
Alexey Samsonov
921f5a529e
asan_symbolize.py: use llvm-symbolizer results even if it returned function name w/o file/line info
...
llvm-svn: 202983
2014-03-05 15:18:50 +00:00
Alexey Samsonov
8ad7a05bb4
Improve llvm-symbolizer discovery in asan_symbolize.py
...
llvm-svn: 202982
2014-03-05 15:00:36 +00:00
Evgeniy Stepanov
322e89c4e2
[asan] Install asan_device_setup to bin/ when targetting Android.
...
asan_device_setup is a utility that prepares a device to run code built with
ASan. Essentially, it installs ASan runtime library into the system. For this
reason, it has to be at a predictable relative path from the runtime library
itself. We also plan to distribute this utility, packaged with runtime library
and maybe llvm-symbolizer, to the users.
llvm-svn: 202362
2014-02-27 08:41:40 +00:00
Evgeniy Stepanov
3ff723f373
[asan] asan_device_setup: fix a typo in usage text
...
llvm-svn: 202246
2014-02-26 08:12:28 +00:00
Evgeniy Stepanov
84610ed7bf
[asan] Remove .sh extension from asan_device_setup.
...
llvm-svn: 202245
2014-02-26 08:10:03 +00:00
Evgeniy Stepanov
0f56a71859
[asan] Changes to asm instrumentation must be done through the generator script.
...
llvm-svn: 201766
2014-02-20 07:56:58 +00:00
Evgeniy Stepanov
caaaac8c30
[asan] Disable asm instrumentation and tests on Mac.
...
Move asm tests to their own file.
llvm-svn: 201653
2014-02-19 09:14:39 +00:00
Evgeniy Stepanov
2169c6bba4
[asan] Added assembly functions for x86/amd64 asan.
...
These are runtime support functions for inline assembly instrumentation.
This is a re-submit of r201402.
Patch by Yuri Gorshenin.
llvm-svn: 201650
2014-02-19 08:30:39 +00:00
Evgeniy Stepanov
0de2b9b1e2
[asan] Revert r201402, r201404.
...
Test fails in bootstrap build.
llvm-svn: 201411
2014-02-14 12:37:41 +00:00
Evgeniy Stepanov
f335bd9c69
[asan] Added assembly functions for x86/amd64 asan.
...
These are runtime support functions for inline assembly instrumentation.
Patch by Yuri Gorshenin.
llvm-svn: 201402
2014-02-14 11:55:53 +00:00
Evgeniy Stepanov
1fc9e61356
[asan] asan_device_setup.sh: allow overriding adb path.
...
llvm-svn: 200698
2014-02-03 15:12:09 +00:00
Evgeniy Stepanov
422944fdbd
[asan] Fix asan_device_setup.sh failure on userdebug Android.
...
llvm-svn: 200382
2014-01-29 09:16:48 +00:00
Evgeniy Stepanov
aecead9d4f
[asan] Android setup: do "adb root" before "adb remount".
...
llvm-svn: 200199
2014-01-27 08:20:28 +00:00
Evgeniy Stepanov
9504304f2d
[asan] Add an ASan-on-Android installation script.
...
llvm-svn: 200009
2014-01-24 15:24:24 +00:00
Alexander Potapenko
d29853564d
[ASan] Make asan_symbolize.py fall back to ASAN_SYMBOLIZER_PATH (which is used when ASAN_OPTIONS=symbolize=1) if LLVM_SYMBOLIZER_PATH is empty.
...
llvm-svn: 193758
2013-10-31 16:08:09 +00:00
Alexander Potapenko
4f73dea69d
[ASan] Close stderr before launching atos in asan_symbolize.py
...
llvm-svn: 185631
2013-07-04 14:21:49 +00:00
Alexander Potapenko
0fde89f2aa
[ASan] Cache atos processes to make Darwin symbolication faster.
...
Patch by Jesse Ruderman<jruderman@gmail.com>
llvm-svn: 185325
2013-07-01 10:51:31 +00:00
Alexander Potapenko
41cd6102e9
[ASan] Do not buffer stdin in asan_symbolize.py
...
llvm-svn: 183006
2013-05-31 14:55:06 +00:00
Alexander Potapenko
a8b41762e4
[ASan] Minor cleanup: remove a couple of unused variables.
...
llvm-svn: 182915
2013-05-30 07:30:07 +00:00
Kostya Serebryany
15e9c852c0
[asan] added flag -d|--demangle to asan_symbolize.py, makes addr2line/llvm-symbolizer demangle the functions names
...
llvm-svn: 175429
2013-02-18 08:02:16 +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
Alexander Potapenko
77c0ac2336
Do not patch the instruction address when symbolizing the reports.
...
Instead, print the correct address at runtime.
llvm-svn: 165018
2012-10-02 15:42:24 +00:00
Alexander Potapenko
3f6a5c1b2d
Fixed a number of gpylint warnings, added binary names filtering (useful for Chrome), minor fixes.
...
llvm-svn: 164695
2012-09-26 13:16:42 +00:00
Alexander Potapenko
59cc8776c4
Encapsulate the main loop into a class to allow reusing it.
...
llvm-svn: 164694
2012-09-26 12:12:41 +00:00
Alexander Potapenko
fa2a964540
Set --use-symbol-table=true as Alexey has already resolved the FIXME.
...
llvm-svn: 164693
2012-09-26 11:36:14 +00:00
Alexey Samsonov
ea2fb08545
[ASan] make asan_symbolize script work if there is no llvm-symbolizer available
...
llvm-svn: 164214
2012-09-19 11:43:41 +00:00
Alexey Samsonov
52565d5491
[ASan] fix offline python symbolizer script to use llvm-symbolizer if possible
...
llvm-svn: 164209
2012-09-19 08:49:53 +00:00
Alexander Potapenko
1800362758
Pass offset of the frame address within the binary to addr2line instead of the absolute address.
...
Fixes the problem with -PIE binaries.
llvm-svn: 161947
2012-08-15 13:58:24 +00:00
Alexander Potapenko
879b1ffca7
Implement LinuxSymbolizer instead of symbolize_addr2line.
...
llvm-svn: 161181
2012-08-02 14:58:04 +00:00
Alexander Potapenko
be84ac8ff3
Some refactoring for asan_symbolize.py: introduced the Symbolizer class and implemented DarwinSymbolizer for atos-based symbolization, BreakpadSymbolizer for breakpad-based symbolization (files produced by the dump_syms tool, http://code.google.com/p/google-breakpad/source/browse/#svn%2Ftrunk%2Fsrc%2Ftools%2Fmac%2Fdump_syms ) and ChainSymbolizer to allow falling back if a symbolizer hadn't succeeded.
...
Fixed pylint warnings.
llvm-svn: 161176
2012-08-02 13:59:23 +00:00
Alexander Potapenko
8aae9557d6
Factor out the main() function.
...
llvm-svn: 161046
2012-07-31 13:51:26 +00:00
Alexey Samsonov
3735faa108
[ASan] subtract one from PCs in ASan error reports (as they originally contain return addresses). Make output tests stricter.
...
llvm-svn: 160508
2012-07-19 15:07:26 +00:00
Alexander Potapenko
628b349b17
Suppress the stderr output from atos.
...
llvm-svn: 160502
2012-07-19 12:01:07 +00:00
Alexander Potapenko
02a71626e3
More accurate atos execution which depends on the file type (EXECUTE, DYLIB) of the binary.
...
More Linux-like output on Mac (to match more output tests).
llvm-svn: 149064
2012-01-26 17:06:50 +00:00
Alexander Potapenko
1f397fb87f
Tune asan_symbolize.py to symbolize 64-bit binaries correctly.
...
Add the DEBUG flag to test_output.sh
llvm-svn: 148798
2012-01-24 10:44:44 +00:00
Kostya Serebryany
019b76f5fd
AddressSanitizer run-time library. Not yet integrated with the compiler-rt build system, but can be built using the old makefile. See details in README.txt
...
llvm-svn: 145463
2011-11-30 01:07:02 +00:00