[PATCH] D48141: [ASan] Linker-initialize static ScopedInErrorReport::current_error_.

Aleksey Shlyapnikov via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Jun 14 11:26:50 PDT 2018


This revision was automatically updated to reflect the committed changes.
Closed by commit rL334748: [ASan] Linker-initialize static ScopedInErrorReport::current_error_. (authored by alekseyshl, committed by ).

Repository:
  rL LLVM

https://reviews.llvm.org/D48141

Files:
  compiler-rt/trunk/lib/asan/asan_errors.h
  compiler-rt/trunk/lib/asan/asan_report.cc


Index: compiler-rt/trunk/lib/asan/asan_errors.h
===================================================================
--- compiler-rt/trunk/lib/asan/asan_errors.h
+++ compiler-rt/trunk/lib/asan/asan_errors.h
@@ -414,6 +414,7 @@
   };
 
   ErrorDescription() { internal_memset(this, 0, sizeof(*this)); }
+  explicit ErrorDescription(LinkerInitialized) {}
   ASAN_FOR_EACH_ERROR_KIND(ASAN_ERROR_DESCRIPTION_CONSTRUCTOR)
 
   bool IsValid() { return kind != kErrorKindInvalid; }
Index: compiler-rt/trunk/lib/asan/asan_report.cc
===================================================================
--- compiler-rt/trunk/lib/asan/asan_report.cc
+++ compiler-rt/trunk/lib/asan/asan_report.cc
@@ -206,7 +206,7 @@
   bool halt_on_error_;
 };
 
-ErrorDescription ScopedInErrorReport::current_error_;
+ErrorDescription ScopedInErrorReport::current_error_(LINKER_INITIALIZED);
 
 void ReportDeadlySignal(const SignalContext &sig) {
   ScopedInErrorReport in_report(/*fatal*/ true);


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D48141.151383.patch
Type: text/x-patch
Size: 968 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20180614/a0b7dd6f/attachment.bin>


More information about the llvm-commits mailing list