From 6bd601b5267bff1c7ce5f69815cd59d0a4cd0576 Mon Sep 17 00:00:00 2001 From: Alexey Samsonov Date: Tue, 17 Dec 2013 11:15:39 +0000 Subject: [Sanitizer] Always initialize a Symbolizer (even if 'symbolize' is false). If 'symbolize' flag is not set, we still want to transform virtual address to module+offset pair in the call to Symbolizer::SymbolizeCode(). See https://code.google.com/p/address-sanitizer/issues/detail?id=251 for more details. git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@197491 91177308-0d34-0410-b5e6-96231b3b80d8 --- lib/sanitizer_common/sanitizer_symbolizer.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'lib/sanitizer_common/sanitizer_symbolizer.h') diff --git a/lib/sanitizer_common/sanitizer_symbolizer.h b/lib/sanitizer_common/sanitizer_symbolizer.h index 886fed20d..f2e8f4475 100644 --- a/lib/sanitizer_common/sanitizer_symbolizer.h +++ b/lib/sanitizer_common/sanitizer_symbolizer.h @@ -79,8 +79,6 @@ class Symbolizer { /// reasons as this function will check $PATH for an external symbolizer. Not /// thread safe. static Symbolizer *Init(const char* path_to_external = 0); - /// Initialize the symbolizer in a disabled state. Not thread safe. - static Symbolizer *Disable(); // Fills at most "max_frames" elements of "frames" with descriptions // for a given address (in all inlined functions). Returns the number // of descriptions actually filled. @@ -121,6 +119,8 @@ class Symbolizer { /// Create a symbolizer and store it to symbolizer_ without checking if one /// already exists. Not thread safe. static Symbolizer *CreateAndStore(const char *path_to_external); + /// Initialize the symbolizer in a disabled state. Not thread safe. + static Symbolizer *Disable(); static Symbolizer *symbolizer_; static StaticSpinMutex init_mu_; -- cgit v1.2.3