forked from OSchip/llvm-project
[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 llvm-svn: 335502
This commit is contained in:
parent
3cc6cb1d35
commit
d42edb28d0
|
|
@ -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);
|
||||
|
|
|
|||
Loading…
Reference in New Issue