[compiler-rt] r335502 - [HWASan] Initalize shadow earler.
Alex Shlyapnikov via llvm-commits
llvm-commits at lists.llvm.org
Mon Jun 25 10:27:13 PDT 2018
Author: alekseyshl
Date: Mon Jun 25 10:27:13 2018
New Revision: 335502
URL: http://llvm.org/viewvc/llvm-project?rev=335502&view=rev
Log:
[HWASan] Initalize shadow earler.
Summary:
Initialize shadow memory before calling more libc functions to allow
for HWASan-instrumented libc.
Reviewers: eugenis
Subscribers: kubamracek, delcypher, #sanitizers, llvm-commits
Differential Revision: https://reviews.llvm.org/D48551
Modified:
compiler-rt/trunk/lib/hwasan/hwasan.cc
Modified: compiler-rt/trunk/lib/hwasan/hwasan.cc
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/lib/hwasan/hwasan.cc?rev=335502&r1=335501&r2=335502&view=diff
==============================================================================
--- compiler-rt/trunk/lib/hwasan/hwasan.cc (original)
+++ compiler-rt/trunk/lib/hwasan/hwasan.cc Mon Jun 25 10:27:13 2018
@@ -177,10 +177,6 @@ void __hwasan_init() {
__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 @@ void __hwasan_init() {
Die();
}
+ InitializeInterceptors();
+ InstallDeadlySignalHandlers(HwasanOnDeadlySignal);
+ InstallAtExitHandler(); // Needs __cxa_atexit interceptor.
+
Symbolizer::GetOrInit()->AddHooks(EnterSymbolizer, ExitSymbolizer);
InitializeCoverage(common_flags()->coverage, common_flags()->coverage_dir);
More information about the llvm-commits
mailing list