[PATCH] D48551: [HWASan] Initalize shadow earler.
Aleksey Shlyapnikov via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Mon Jun 25 09:52:00 PDT 2018
alekseyshl created this revision.
alekseyshl added a reviewer: eugenis.
Herald added subscribers: Sanitizers, delcypher, kubamracek.
Initialize shadow memory before calling more libc functions to allow
for HWASan-instrumented libc.
Repository:
rCRT Compiler Runtime
https://reviews.llvm.org/D48551
Files:
lib/hwasan/hwasan.cc
Index: lib/hwasan/hwasan.cc
===================================================================
--- lib/hwasan/hwasan.cc
+++ lib/hwasan/hwasan.cc
@@ -177,10 +177,6 @@
__sanitizer_set_report_path(common_flags()->log_path);
- InitializeInterceptors();
- InstallDeadlySignalHandlers(HwasanOnDeadlySignal);
- InstallAtExitHandler(); // Needs __cxa_atexit interceptor.
-
DisableCoreDumperIfNecessary();
if (!InitShadow()) {
Printf("FATAL: HWAddressSanitizer cannot mmap the shadow memory.\n");
@@ -194,6 +190,10 @@
Die();
}
+ InitializeInterceptors();
+ InstallDeadlySignalHandlers(HwasanOnDeadlySignal);
+ InstallAtExitHandler(); // Needs __cxa_atexit interceptor.
+
Symbolizer::GetOrInit()->AddHooks(EnterSymbolizer, ExitSymbolizer);
InitializeCoverage(common_flags()->coverage, common_flags()->coverage_dir);
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D48551.152711.patch
Type: text/x-patch
Size: 849 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20180625/41066d2d/attachment.bin>
More information about the llvm-commits
mailing list