Skip to content

Add missing call to Symbolizer::LateInitialize() in UBSan's standalone init. #1104

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Conversation

danliew-apple
Copy link

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

(cherry picked from commit 564530e)

…one 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

(cherry picked from commit 564530e)
@danliew-apple
Copy link
Author

@swift-ci please test

@danliew-apple danliew-apple merged commit 4ee92ef into swiftlang:apple/stable/20200108 Apr 22, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants