Commit Graph

16 Commits

Author SHA1 Message Date
Kuba Brecka 656e184f6c Adding the implementation of atos and dladdr symbolizers for OS X.
They are currently still *not* used, "llvm-symbolizer" is still the default symbolizer on OS X.

Reviewed at http://reviews.llvm.org/D6588

llvm-svn: 232026
2015-03-12 10:53:18 +00:00
Kuba Brecka ae219d3d3c Symbolizer refactoring: Merge common parts of POSIXSymbolizer and WinSymbolizer
Reviewed at http://reviews.llvm.org/D8105

llvm-svn: 231680
2015-03-09 18:36:28 +00:00
Kuba Brecka 59e8c3b342 Symbolizer refactoring: ExtractToken and friends
Reviewed at http://reviews.llvm.org/D7867

llvm-svn: 231027
2015-03-02 22:15:14 +00:00
Kuba Brecka 898270513d Symbolizer refactoring: Move internals to separate files
Reviewed at http://reviews.llvm.org/D7972

llvm-svn: 231014
2015-03-02 21:15:09 +00:00
Nick Lewycky 1f30f5aef7 Satisfy -Wparentheses.
llvm-svn: 214017
2014-07-26 05:07:41 +00:00
Alexey Samsonov 1440105338 [Sanitizer] Simplify Symbolizer creation interface.
Get rid of Symbolizer::Init(path_to_external) in favor of
thread-safe Symbolizer::GetOrInit(), and use the latter version
everywhere. Implicitly depend on the value of external_symbolizer_path
runtime flag instead of passing it around manually.

No functionality change.

llvm-svn: 214005
2014-07-26 01:37:23 +00:00
Alexey Samsonov 78928c1d2a [Sanitizer] Use SpinMutex for Symbolizer initialization (per dvyukov's suggestion)
llvm-svn: 193697
2013-10-30 17:05:37 +00:00
Alexey Samsonov 590fe110f9 [Sanitizer] Revert r193501 and properly fix r193448
llvm-svn: 193522
2013-10-28 16:31:39 +00:00
Peter Collingbourne 791e65dcfb 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

llvm-svn: 193448
2013-10-25 23:03:29 +00:00
Alexey Samsonov 7a36e6126b [Sanitizer] Refactor symbolization interface: use class instead of several functions. Move some code around to get rid of extra source files
llvm-svn: 190410
2013-09-10 14:36:16 +00:00
Alexey Samsonov 5b5c99d219 ASan, LSan, MSan: try to find llvm-symbolizer binary in PATH if it is not provided. Now we don't need to explicitly set the location of llvm-symbolizer in lit test configs.
llvm-svn: 189801
2013-09-03 13:22:51 +00:00
Timur Iskhodzhanov eee13914e2 Define SANITIZER_INTERFACE_ATTRIBUTE on Windows and fix all the places where SANITIZER_INTERFACE_ATTRIBUTE or SANITIZER_ATTRIBUTE_WEAK are used
llvm-svn: 188261
2013-08-13 11:42:45 +00:00
Alexey Samsonov 7a1ad5e605 Change __sanitizer_symbolize_demangle hook return type to 'int'
llvm-svn: 185326
2013-07-01 11:20:56 +00:00
Alexey Samsonov 6a5b0758ec Demangle names using pluggable internal symbolizer if possible
llvm-svn: 185146
2013-06-28 12:30:24 +00:00
Alexey Samsonov c30e2d6b3a Make InternalAlloc/InternalFree in sanitizer runtimes libc-free by switching to a custom allocator.
llvm-svn: 182836
2013-05-29 09:15:39 +00:00
Peter Collingbourne c787d42f40 [nolibc] Move symbolizer to RTSanitizerCommonLibc, and make it optional using a weak symbol.
llvm-svn: 182372
2013-05-21 12:08:37 +00:00