[PATCH] D44243: [asan] Make ScopedInErrorReport::current_error_ linker-initialized
Kuba (Brecka) Mracek via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Wed Mar 7 19:23:59 PST 2018
kubamracek created this revision.
kubamracek added reviewers: kcc, eugenis, filcab, fjricci, delcypher, george.karpenkov.
kubamracek added a project: Sanitizers.
Herald added a subscriber: Sanitizers.
Repository:
rCRT Compiler Runtime
https://reviews.llvm.org/D44243
Files:
lib/asan/asan_errors.h
lib/asan/asan_report.cc
Index: lib/asan/asan_report.cc
===================================================================
--- lib/asan/asan_report.cc
+++ lib/asan/asan_report.cc
@@ -202,7 +202,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);
Index: lib/asan/asan_errors.h
===================================================================
--- lib/asan/asan_errors.h
+++ lib/asan/asan_errors.h
@@ -334,6 +334,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; }
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D44243.137534.patch
Type: text/x-patch
Size: 860 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20180308/a97505ee/attachment.bin>
More information about the llvm-commits
mailing list