Skip to content

Commit 564530e

Browse files
committed
Add missing call to Symbolizer::LateInitialize() in UBSan's standalone init.
Summary: This fixes symbolization in Standalone UBSan mode for the Darwin simulators. 861b69f (rdar://problem/58789439) tried to fix symbolization for all sanitizers on Darwin simulators but unfortunately it only fixed the problem for TSan. For UBSan in standalone mode the fix wasn't sufficient because UBSan's standalone init doesn't call `Symbolizer::LateInitialize()` like ASan and TSan do. This meant that `AtosSymbolizerProcess::LateInitialize()` was never being called before `AtosSymbolizerProcess::StartSymbolizerSubprocess()` which breaks an invariant we expect to hold. The missing call to `Symbolizer::LateInitialize()` during UBSan's standalone init seems like an accidently omission so this patch simply adds it. rdar://problem/62083617 Reviewers: vitalybuka, kubamracek, yln, samsonov Subscribers: #sanitizers, llvm-commits Tags: #sanitizers Differential Revision: https://reviews.llvm.org/D78530
1 parent 4ca2cad commit 564530e

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

Diff for: compiler-rt/lib/ubsan/ubsan_init.cpp

+1
Original file line numberDiff line numberDiff line change
@@ -41,6 +41,7 @@ static void CommonStandaloneInit() {
4141
AndroidLogInit();
4242
InitializeCoverage(common_flags()->coverage, common_flags()->coverage_dir);
4343
CommonInit();
44+
Symbolizer::LateInitialize();
4445
}
4546

4647
void __ubsan::InitAsStandalone() {

0 commit comments

Comments
 (0)