[compiler-rt] r295348 - [sanitizers] DefaultSymbolizer should not be destroyed as as symbolizer
Vitaly Buka via llvm-commits
llvm-commits at lists.llvm.org
Thu Feb 16 10:35:38 PST 2017
Author: vitalybuka
Date: Thu Feb 16 12:35:38 2017
New Revision: 295348
URL: http://llvm.org/viewvc/llvm-project?rev=295348&view=rev
Log:
[sanitizers] DefaultSymbolizer should not be destroyed as as symbolizer
can be accessed after the static destroyed.
Modified:
compiler-rt/trunk/lib/sanitizer_common/symbolizer/sanitizer_symbolize.cc
Modified: compiler-rt/trunk/lib/sanitizer_common/symbolizer/sanitizer_symbolize.cc
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/lib/sanitizer_common/symbolizer/sanitizer_symbolize.cc?rev=295348&r1=295347&r2=295348&view=diff
==============================================================================
--- compiler-rt/trunk/lib/sanitizer_common/symbolizer/sanitizer_symbolize.cc (original)
+++ compiler-rt/trunk/lib/sanitizer_common/symbolizer/sanitizer_symbolize.cc Thu Feb 16 12:35:38 2017
@@ -18,8 +18,9 @@
#include "llvm/DebugInfo/Symbolize/Symbolize.h"
static llvm::symbolize::LLVMSymbolizer *getDefaultSymbolizer() {
- static llvm::symbolize::LLVMSymbolizer DefaultSymbolizer;
- return &DefaultSymbolizer;
+ static llvm::symbolize::LLVMSymbolizer *DefaultSymbolizer =
+ new llvm::symbolize::LLVMSymbolizer();
+ return DefaultSymbolizer;
}
namespace __sanitizer {
More information about the llvm-commits
mailing list