Skip to content

Commit

Permalink
Add missing call to __sanitizer::InitializePlatformEarly() in UBSan…
Browse files Browse the repository at this point in the history
…'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
  • Loading branch information
delcypher committed Apr 22, 2020
1 parent 564530e commit da820f4
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions compiler-rt/lib/ubsan/ubsan_init.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down

0 comments on commit da820f4

Please sign in to comment.