History log of /external/compiler-rt/lib/sanitizer_common/sanitizer_symbolizer.cc
Revision Date Author Comments (<<< Hide modified files) (Show modified files >>>)
66d91e3356a0c4d7aff3beaaaff3e87bbaec805c 31-Oct-2013 Alexey Samsonov <samsonov@google.com> [Sanitizer] Add Symbolizer::AddHooks() and use it in TSan and MSan.

Summary:
TSan and MSan need to know if interceptor was called by the
user code or by the symbolizer and use pre- and post-symbolization hooks
for that. Make Symbolizer class responsible for calling these hooks instead.
This would ensure the hooks are only called when necessary (during
in-process symbolization, they are not needed for out-of-process) and
save specific sanitizers from tracing all places in the code where symbolization
will be performed.

Reviewers: eugenis, dvyukov

Reviewed By: eugenis

CC: llvm-commits

Differential Revision: http://llvm-reviews.chandlerc.com/D2067

git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@193807 91177308-0d34-0410-b5e6-96231b3b80d8
/external/compiler-rt/lib/sanitizer_common/sanitizer_symbolizer.cc
e00495aa0f3b114c7b764769d9450e5d2efb8e64 30-Oct-2013 Alexey Samsonov <samsonov@google.com> [Sanitizer] Use SpinMutex for Symbolizer initialization (per dvyukov's suggestion)

git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@193697 91177308-0d34-0410-b5e6-96231b3b80d8
/external/compiler-rt/lib/sanitizer_common/sanitizer_symbolizer.cc
f456018a324dc48668a57060f5ac9c838dfd9f32 28-Oct-2013 Alexey Samsonov <samsonov@google.com> [Sanitizer] Revert r193501 and properly fix r193448

git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@193522 91177308-0d34-0410-b5e6-96231b3b80d8
/external/compiler-rt/lib/sanitizer_common/sanitizer_symbolizer.cc
c1a1ed62228288155459d39194995a36aca4a8a6 26-Oct-2013 Peter Collingbourne <peter@pcc.me.uk> Overhaul the symbolizer interface.

This moves away from creating the symbolizer object and initializing the
external symbolizer as separate steps. Those steps now always take place
together.

Sanitizers with a legacy requirement to specify their own symbolizer path
should use InitSymbolizer to initialize the symbolizer with the desired
path, and GetSymbolizer to access the symbolizer. Sanitizers with no
such requirement (e.g. UBSan) can use GetOrInitSymbolizer with no need for
initialization.

The symbolizer interface has been made thread-safe (as far as I can
tell) by protecting its member functions with mutexes.

Finally, the symbolizer interface no longer relies on weak externals, the
introduction of which was probably a mistake on my part.

Differential Revision: http://llvm-reviews.chandlerc.com/D1985

git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@193448 91177308-0d34-0410-b5e6-96231b3b80d8
/external/compiler-rt/lib/sanitizer_common/sanitizer_symbolizer.cc
8b3af3a0e9426e9e0b2986b97360bd820ef05c7f 21-May-2013 Peter Collingbourne <peter@pcc.me.uk> [nolibc] Move symbolizer to RTSanitizerCommonLibc, and make it optional using a weak symbol.

git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@182372 91177308-0d34-0410-b5e6-96231b3b80d8
/external/compiler-rt/lib/sanitizer_common/sanitizer_symbolizer.cc
d1470cbaab10715511c83b91dfdefe59d98fa595 14-May-2013 Sergey Matveev <earthdok@google.com> [sanitizer] Filtering in GetListOfModules.

git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@181791 91177308-0d34-0410-b5e6-96231b3b80d8
/external/compiler-rt/lib/sanitizer_common/sanitizer_symbolizer.cc
c9b626e27dc7555d649aae19c8caf4ddd21ea3a7 09-Apr-2013 Alexey Samsonov <samsonov@google.com> [Sanitizer] fix TSan tests: remove global ctor from sanitizer_common, run load_shared_lib test only in lit

git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@179090 91177308-0d34-0410-b5e6-96231b3b80d8
/external/compiler-rt/lib/sanitizer_common/sanitizer_symbolizer.cc
8a6cac57625f46e9e9a8977a518e8b92499d612f 09-Apr-2013 Kostya Serebryany <kcc@google.com> [asan] relax Linux/zero-base-shadow.cc to make it pass on newer Ubuntu; fix lint

git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@179088 91177308-0d34-0410-b5e6-96231b3b80d8
/external/compiler-rt/lib/sanitizer_common/sanitizer_symbolizer.cc
c8feb2fee6dba5cbd1751ded5758910e230d9262 08-Apr-2013 Alexander Potapenko <glider@google.com> [libsymbolized] If we can't find an address in the list of shared libraries, try to reload it.

Add a regression test for the case where such behavior helps TSan:
1. race is reported in the main module
2. new shared library is loaded
3. race is reported in the shared library



git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@179032 91177308-0d34-0410-b5e6-96231b3b80d8
/external/compiler-rt/lib/sanitizer_common/sanitizer_symbolizer.cc
48cab523ef7a35ec8417b3fef8d41cfd581590b3 05-Apr-2013 Alexey Samsonov <samsonov@google.com> [Sanitizer] enquote the module name when passing it to external symbolizer

git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@178864 91177308-0d34-0410-b5e6-96231b3b80d8
/external/compiler-rt/lib/sanitizer_common/sanitizer_symbolizer.cc
3347dcbe78953a40462d5b5351137a8df4d9f993 19-Mar-2013 Dmitry Vyukov <dvyukov@google.com> tsan: fix build



git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@177395 91177308-0d34-0410-b5e6-96231b3b80d8
/external/compiler-rt/lib/sanitizer_common/sanitizer_symbolizer.cc
7fac284c9d3aab4c28b422315731b12a5af9fc4e 19-Mar-2013 Dmitry Vyukov <dvyukov@google.com> tsan: symbolizer "flush caches" functinality



git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@177388 91177308-0d34-0410-b5e6-96231b3b80d8
/external/compiler-rt/lib/sanitizer_common/sanitizer_symbolizer.cc
405056ccecb28f0c1babf23596d6b822d2b544ee 26-Feb-2013 Alexey Samsonov <samsonov@google.com> [Sanitizer] Don't die if external symbolizer is used on Mac, where it's not implemented yet

git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@176091 91177308-0d34-0410-b5e6-96231b3b80d8
/external/compiler-rt/lib/sanitizer_common/sanitizer_symbolizer.cc
90a2467c0a0722dcc9443229b8805f0a878ccb56 29-Jan-2013 Dmitry Vyukov <dvyukov@google.com> tsan: add IsSymbolizerAvailable() function for querying for presence of internal/external symbolizer


git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@173783 91177308-0d34-0410-b5e6-96231b3b80d8
/external/compiler-rt/lib/sanitizer_common/sanitizer_symbolizer.cc
7885514bf3321b6a027178ff60ac96122c8f7640 24-Jan-2013 Alexey Samsonov <samsonov@google.com> [Sanitizer] use stub InternalSymbolizer on platforms where we don't have weak hooks

git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@173347 91177308-0d34-0410-b5e6-96231b3b80d8
/external/compiler-rt/lib/sanitizer_common/sanitizer_symbolizer.cc
110081903bc75de62cf2af9fdf742e7e4b778734 24-Jan-2013 Alexey Samsonov <samsonov@google.com> [Sanitizer] Add skeleton for InternalSymbolizer that can be used by providing callbacks __sanitizer_symbolize_{code,data}

git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@173344 91177308-0d34-0410-b5e6-96231b3b80d8
/external/compiler-rt/lib/sanitizer_common/sanitizer_symbolizer.cc
5a1f23310cc4a1debae8741653defe620518e612 11-Jan-2013 Dmitry Vyukov <dvyukov@google.com> tsan: symbolize global variables


git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@172181 91177308-0d34-0410-b5e6-96231b3b80d8
/external/compiler-rt/lib/sanitizer_common/sanitizer_symbolizer.cc
433c219f8772c35dc4e6bd32bb4131dbc07fdfd6 03-Dec-2012 Dmitry Vyukov <dvyukov@google.com> tsan: describe global vars (module+offset for now)


git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@169122 91177308-0d34-0410-b5e6-96231b3b80d8
/external/compiler-rt/lib/sanitizer_common/sanitizer_symbolizer.cc
e98723f73d2a09b7305b7848238c64df56439cfb 17-Oct-2012 Alexey Samsonov <samsonov@google.com> [Sanitizer] symbolizer: increase the maximal number of shared libraries to 16K

git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@166098 91177308-0d34-0410-b5e6-96231b3b80d8
/external/compiler-rt/lib/sanitizer_common/sanitizer_symbolizer.cc
03e699f8c6ae2edab70c9db0b0c1e1d40025fa71 06-Sep-2012 Alexey Samsonov <samsonov@google.com> [Sanitizer] remove unused field

git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@163296 91177308-0d34-0410-b5e6-96231b3b80d8
/external/compiler-rt/lib/sanitizer_common/sanitizer_symbolizer.cc
1dc4cf7e253aefa3ce3bd4a1d349a13647e8b2ea 05-Sep-2012 Alexey Samsonov <samsonov@google.com> [Sanitizer] Remove implicit conversion of InternalScopedBuffer<T> to T*

git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@163197 91177308-0d34-0410-b5e6-96231b3b80d8
/external/compiler-rt/lib/sanitizer_common/sanitizer_symbolizer.cc
38e853db8353285da16416885da42219fee701c4 04-Sep-2012 Alexey Samsonov <samsonov@google.com> [Sanitizer] Support for reading inlined frames from llvm-symbolizer

git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@163140 91177308-0d34-0410-b5e6-96231b3b80d8
/external/compiler-rt/lib/sanitizer_common/sanitizer_symbolizer.cc
98ea50788e8167dcd779ad43fc65103c52e0aa5c 31-Aug-2012 Alexey Samsonov <samsonov@google.com> [Sanitizer] fix overloaded operator error

git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@162990 91177308-0d34-0410-b5e6-96231b3b80d8
/external/compiler-rt/lib/sanitizer_common/sanitizer_symbolizer.cc
2acf5562bfd787c1667297c593ddfc0e35b91489 31-Aug-2012 Alexey Samsonov <samsonov@google.com> [Sanitizer] Remove some calls to libc malloc from symbolizer

git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@162987 91177308-0d34-0410-b5e6-96231b3b80d8
/external/compiler-rt/lib/sanitizer_common/sanitizer_symbolizer.cc
9c6e5303fa025a73a09cee0766ae403909b1bb8b 23-Aug-2012 Alexey Samsonov <samsonov@google.com> [Sanitizer] Switch the symbolization strategy that would be used by sanitizer tools family: as compiling in-process symbolizer into runtime involves certain difficulties, we may instead launch an external symbolizer program (fork + execl) in a subprocess and communicate with it via pipe.

git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@162437 91177308-0d34-0410-b5e6-96231b3b80d8
/external/compiler-rt/lib/sanitizer_common/sanitizer_symbolizer.cc
41df5652a12b45998111ca2aca09fc0c63674684 31-Jul-2012 Alexey Samsonov <samsonov@google.com> [Sanitizer] Wrapper around llvm::DIContext from LLVM DebugInfo library. If a macro SANITIZER_USES_LLVM_LIBS is defined (by default it is not), then sanitizer runtime includes llvm headers and tries to use LLVM libs for in-process symbolization. To make it functional, we have to link with these LLVM libs - either pass them to linker from Clang driver, or link them into static ASan runtime when we build it.

git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@161045 91177308-0d34-0410-b5e6-96231b3b80d8
/external/compiler-rt/lib/sanitizer_common/sanitizer_symbolizer.cc
75983dd851e39e5ba70edeeda19cfaedbd114cb3 19-Jul-2012 Alexey Samsonov <samsonov@google.com> [Sanitizer] When obtaining the data for loaded modules, add address ranges of loadable segments only. Looks like address range of PT_TLS segment may intersect with loadable segments of other modules.

git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@160498 91177308-0d34-0410-b5e6-96231b3b80d8
/external/compiler-rt/lib/sanitizer_common/sanitizer_symbolizer.cc
a68633fb76208137ccb807914df52758ee5ca6f0 03-Jul-2012 Alexey Samsonov <samsonov@google.com> [Sanitizer] Extend a symbolizer code. Implemented for Linux only. Use dl_iterate_phdr to get virtual addresses of mapped module sections. To symbolize an address from a module, map this module to memory and obtain pointers to debug info sections. Later these pointers can be passed to constructor of DWARF context-in-memory from LLVM DebugInfo lib.

git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@159652 91177308-0d34-0410-b5e6-96231b3b80d8
/external/compiler-rt/lib/sanitizer_common/sanitizer_symbolizer.cc
fa82b0887fd558b77a856730a0656460d5bf078d 15-Jun-2012 Alexey Samsonov <samsonov@google.com> [Sanitizer] Use ProcessMaps in symbolizer to get module name and offset for instruction address

git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@158522 91177308-0d34-0410-b5e6-96231b3b80d8
/external/compiler-rt/lib/sanitizer_common/sanitizer_symbolizer.cc
6e0c3a447307091ff5340c302f828ea9632709ca 07-Jun-2012 Alexey Samsonov <samsonov@google.com> [Sanitizer] Allocator for internal runtime purposes. Currently it calls libcmalloc, but we might have to make it more low-level in future

git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@158142 91177308-0d34-0410-b5e6-96231b3b80d8
/external/compiler-rt/lib/sanitizer_common/sanitizer_symbolizer.cc
603c4be006d8c53905d736bf1f19a49f5ce98276 04-Jun-2012 Alexey Samsonov <samsonov@google.com> Remove file-type tags in .cc files in tsan/ and sanitizer_common/

git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@157928 91177308-0d34-0410-b5e6-96231b3b80d8
/external/compiler-rt/lib/sanitizer_common/sanitizer_symbolizer.cc
4e6c6c75a241644c52fd6e62ff3ad7aef7f5c523 04-Jun-2012 Alexey Samsonov <samsonov@google.com> [Sanitizer_common] fix filenames in comments

git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@157919 91177308-0d34-0410-b5e6-96231b3b80d8
/external/compiler-rt/lib/sanitizer_common/sanitizer_symbolizer.cc
ab5dbccab635b05598cc707ac7680edfe8ebdcd5 01-Jun-2012 Alexey Samsonov <samsonov@google.com> temporary include stdlib.h in symbolizer to fix Mac/Win build

git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@157808 91177308-0d34-0410-b5e6-96231b3b80d8
/external/compiler-rt/lib/sanitizer_common/sanitizer_symbolizer.cc
2f7d82687c99d468aa845ed68d88910710cc51ec 01-Jun-2012 Alexey Samsonov <samsonov@google.com> 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

git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@157806 91177308-0d34-0410-b5e6-96231b3b80d8
/external/compiler-rt/lib/sanitizer_common/sanitizer_symbolizer.cc