summaryrefslogtreecommitdiff
path: root/lib/sanitizer_common/sanitizer_symbolizer_internal.h
AgeCommit message (Collapse)Author
2017-07-22[sanitizer_common] Move filesystem-related code out of sanitizer_common.ccVitaly Buka
Summary: This is a pure refactoring change. It just moves code that is related to filesystem operations from sanitizer_common.{cc,h} to sanitizer_file.{cc,h}. This makes it cleaner to disable the filesystem-related code for a new port that doesn't want it. Submitted on behalf of Roland McGrath. Reviewers: kcc, eugenis, alekseyshl Reviewed By: alekseyshl Subscribers: vitalybuka, llvm-commits, kubamracek, mgorny, phosek Tags: #sanitizers Differential Revision: https://reviews.llvm.org/D35591 git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@308819 91177308-0d34-0410-b5e6-96231b3b80d8
2017-07-20Revert "[sanitizer_common] Move filesystem-related code out of ↵Vitaly Buka
sanitizer_common.cc" Breaks Windows build. This reverts commit r308640. git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@308648 91177308-0d34-0410-b5e6-96231b3b80d8
2017-07-20[sanitizer_common] Move filesystem-related code out of sanitizer_common.ccAlex Shlyapnikov
This is a pure refactoring change. It just moves code that is related to filesystem operations from sanitizer_common.{cc,h} to sanitizer_file.{cc,h}. This makes it cleaner to disable the filesystem-related code for a new port that doesn't want it. Commiting for mcgrathr. Reviewers: alekseyshl Subscribers: llvm-commits Differential Revision: https://reviews.llvm.org/D35591 git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@308640 91177308-0d34-0410-b5e6-96231b3b80d8
2017-01-06[sanitizer] Use architecture/slice information when symbolizing fat Mach-O ↵Kuba Mracek
files on Darwin This patch starts passing architecture information about a module to llvm-symbolizer and into text reports. This fixes the longstanding x86_64/x86_64h mismatch issue on Darwin. Differential Revision: https://reviews.llvm.org/D27390 git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@291287 91177308-0d34-0410-b5e6-96231b3b80d8
2016-04-15[sanitizers] Teach the internal demangler about Swift namesAnna Zaks
Add support for Swift names when symbolicating sanitizer traces. This is now relevant since TSan and ASan support have been added to Swift on OS X. Differential Revision: http://reviews.llvm.org/D19135 git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@266494 91177308-0d34-0410-b5e6-96231b3b80d8
2015-09-14Support inline functions symbolization in Addr2Line symbolizer.Alexey Samsonov
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
2015-08-11[Windows] Use llvm-symbolizer before using dbghelpReid Kleckner
Summary: llvm-symbolizer understands both PDBs and DWARF, so it's a better bet if it's available. It prints out the function parameter types and column numbers, so I needed to churn the expected test output a bit. This makes most of the llvm-symbolizer subprocessing code target-independent. Pipes on all platforms use fd_t, and we can use the portable ReadFromFile / WriteToFile wrappers in symbolizer_sanitizer.cc. Only the pipe creation and process spawning is Windows-specific. Please check that the libcdep layering is still correct. I don't know how to reproduce the build configuration that relies on that. Reviewers: samsonov Subscribers: llvm-commits Differential Revision: http://reviews.llvm.org/D11791 git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@244616 91177308-0d34-0410-b5e6-96231b3b80d8
2015-08-11[sanitizers] Use portable file read/write wrappers on process pipesReid Kleckner
This fixes a minor error checking bug around calling internal_read/write, and makes the code more portable for D11791. git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@244546 91177308-0d34-0410-b5e6-96231b3b80d8
2015-03-22Demangling for DlAddrSymbolizerKuba Brecka
On OS X, dladdr() provides mangled names only, so we need need to demangle in DlAddrSymbolizer::SymbolizePC. Reviewed at http://reviews.llvm.org/D8291 git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@232910 91177308-0d34-0410-b5e6-96231b3b80d8
2015-03-12Adding the implementation of atos and dladdr symbolizers for OS X.Kuba Brecka
They are currently still *not* used, "llvm-symbolizer" is still the default symbolizer on OS X. Reviewed at http://reviews.llvm.org/D6588 git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@232026 91177308-0d34-0410-b5e6-96231b3b80d8
2015-03-09Symbolizer refactoring: Merge common parts of POSIXSymbolizer and WinSymbolizerKuba Brecka
Reviewed at http://reviews.llvm.org/D8105 git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@231680 91177308-0d34-0410-b5e6-96231b3b80d8
2015-03-06Symbolizer refactoring: Make WinSymbolizer use SymbolizerTool interfaceKuba Brecka
Reviewed at http://reviews.llvm.org/D8089 git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@231478 91177308-0d34-0410-b5e6-96231b3b80d8
2015-03-05Symbolizer refactoring: Link symbolizer tools into a fallback chainKuba Brecka
Reviewed at http://reviews.llvm.org/D8049 git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@231361 91177308-0d34-0410-b5e6-96231b3b80d8
2015-03-03Symbolizer refactoring: Unify access to symbolizer tools from POSIXSymbolizerKuba Brecka
Reviewed at http://reviews.llvm.org/D8029 git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@231162 91177308-0d34-0410-b5e6-96231b3b80d8
2015-03-02Symbolizer refactoring: ExtractToken and friendsKuba Brecka
Reviewed at http://reviews.llvm.org/D7867 git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@231027 91177308-0d34-0410-b5e6-96231b3b80d8
2015-03-02Symbolizer refactoring: Move internals to separate filesKuba Brecka
Reviewed at http://reviews.llvm.org/D7972 git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@231014 91177308-0d34-0410-b5e6-96231b3b80d8