[compiler-rt] da820f4 - Add missing call to `__sanitizer::InitializePlatformEarly()` in UBSan's standalone init.
Dan Liew via llvm-commits
llvm-commits at lists.llvm.org
Tue Apr 21 18:44:53 PDT 2020
Author: Dan Liew
Date: 2020-04-21T18:43:43-07:00
New Revision: da820f4f5753062501a14ae4336b1c055535e54f
URL: https://github.com/llvm/llvm-project/commit/da820f4f5753062501a14ae4336b1c055535e54f
DIFF: https://github.com/llvm/llvm-project/commit/da820f4f5753062501a14ae4336b1c055535e54f.diff
LOG: Add missing call to `__sanitizer::InitializePlatformEarly()` in UBSan's standalone init.
Summary:
While working on rdar://problem/62083617 I noticed this call was
missing.
This is a no-op for all platforms except Darwin. For Darwin this
means the `use_xnu_fast_mmap` flag is initialized as it was intended
when using UBSan in standalone mode.
Reviewers: vitalybuka, vsk, kubamracek, yln, samsonov
Subscribers: #sanitizers, llvm-commits
Tags: #sanitizers
Differential Revision: https://reviews.llvm.org/D78532
Added:
Modified:
compiler-rt/lib/ubsan/ubsan_init.cpp
Removed:
################################################################################
diff --git a/compiler-rt/lib/ubsan/ubsan_init.cpp b/compiler-rt/lib/ubsan/ubsan_init.cpp
index 26b6227aa484..e0be5a72ec42 100644
--- a/compiler-rt/lib/ubsan/ubsan_init.cpp
+++ b/compiler-rt/lib/ubsan/ubsan_init.cpp
@@ -37,6 +37,7 @@ static void CommonStandaloneInit() {
SanitizerToolName = GetSanititizerToolName();
CacheBinaryName();
InitializeFlags();
+ __sanitizer::InitializePlatformEarly();
__sanitizer_set_report_path(common_flags()->log_path);
AndroidLogInit();
InitializeCoverage(common_flags()->coverage, common_flags()->coverage_dir);
More information about the llvm-commits
mailing list