diff options
author | Alexey Samsonov <vonosmas@gmail.com> | 2015-09-14 23:56:42 +0000 |
---|---|---|
committer | Alexey Samsonov <vonosmas@gmail.com> | 2015-09-14 23:56:42 +0000 |
commit | a1f6419d4f1ae39600c6669564ca179aa18b0d99 (patch) | |
tree | 61e58df7699c3b26640906a48c17a52fc01b14e2 /lib/sanitizer_common/sanitizer_symbolizer_internal.h | |
parent | 0e0eb1961cb2297a653b4af1c806c158e951904c (diff) | |
download | compiler-rt-a1f6419d4f1ae39600c6669564ca179aa18b0d99.tar.gz |
Support inline functions symbolization in Addr2Line symbolizer.
Patch by Maxim Ostapenko!
Summary:
Right now, Addr2Line symbolizer in asan_symbolize.py doesn't support inline functions symbolization. This might be a useful feature for using ASan on embedded systems.
Test results:
$ cat test.c
static inline void FooBarBaz() {
__sanitizer_print_stack_trace();
}
int main() {
FooBarBaz();
return 0;
}
$ clang test.c -fsanitize=address -g -O2 -o test.x && ./test.x &> /tmp/test.log
$ ./projects/compiler-rt/lib/asan/scripts/asan_symbolize.py -l /tmp/test.log
#0 0x42095e in __sanitizer_print_stack_trace _asan_rtl_
#1 0x4cec07 in FooBarBaz /home/max/build/llvm/asan/test.c:4
#2 0x4cec07 in main /home/max/build/llvm/asan/test.c:8
#3 0x7f89f0891ec4 in __libc_start_main /build/buildd/eglibc-2.19/csu/libc-start.c:287
Reviewers: glider, samsonov
Subscribers: jevinskie, llvm-commits, ygribov
Differential Revision: http://reviews.llvm.org/D12153
git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@247642 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/sanitizer_common/sanitizer_symbolizer_internal.h')
-rw-r--r-- | lib/sanitizer_common/sanitizer_symbolizer_internal.h | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/lib/sanitizer_common/sanitizer_symbolizer_internal.h b/lib/sanitizer_common/sanitizer_symbolizer_internal.h index ac9a5e4a7..12c70b602 100644 --- a/lib/sanitizer_common/sanitizer_symbolizer_internal.h +++ b/lib/sanitizer_common/sanitizer_symbolizer_internal.h @@ -88,10 +88,11 @@ class SymbolizerProcess { UNIMPLEMENTED(); } + virtual bool ReadFromSymbolizer(char *buffer, uptr max_length); + private: bool Restart(); const char *SendCommandImpl(const char *command); - bool ReadFromSymbolizer(char *buffer, uptr max_length); bool WriteToSymbolizer(const char *buffer, uptr length); bool StartSymbolizerSubprocess(); |