summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--compiler-rt/lib/ubsan/ubsan_diag.cc4
1 files changed, 2 insertions, 2 deletions
diff --git a/compiler-rt/lib/ubsan/ubsan_diag.cc b/compiler-rt/lib/ubsan/ubsan_diag.cc
index 7a1de218751..ba31f4caaae 100644
--- a/compiler-rt/lib/ubsan/ubsan_diag.cc
+++ b/compiler-rt/lib/ubsan/ubsan_diag.cc
@@ -49,7 +49,6 @@ Location __ubsan::getCallerLocation(uptr CallerLoc) {
Location __ubsan::getFunctionLocation(uptr Loc, const char **FName) {
if (!Loc)
return Location();
- // FIXME: We may need to run initialization earlier.
InitializeSanitizerCommon();
AddressInfo Info;
@@ -265,7 +264,8 @@ static void renderMemorySnippet(const __sanitizer::AnsiColorDecorator &Decor,
}
Diag::~Diag() {
- __sanitizer::AnsiColorDecorator Decor(PrintsToTty());
+ InitializeSanitizerCommon();
+ __sanitizer::AnsiColorDecorator Decor(ColorizeReports());
SpinMutexLock l(&CommonSanitizerReportMutex);
Printf(Decor.Bold());
OpenPOWER on IntegriCloud