This is an archive of the discontinued LLVM Phabricator instance.

Add missing call to `__sanitizer::InitializePlatformEarly()` in UBSan's standalone init.
ClosedPublic

Authored by delcypher on Apr 20 2020, 6:56 PM.

Details

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.

Diff Detail

Event Timeline

delcypher created this revision.Apr 20 2020, 6:56 PM
Herald added a project: Restricted Project. · View Herald TranscriptApr 20 2020, 6:56 PM
Herald added a subscriber: Restricted Project. · View Herald Transcript
yln added a comment.Apr 21 2020, 9:59 AM

So technically this is not necessary (standalone UBSan does not mmap memory), but good for consistency in case it stops being a noop?

vsk accepted this revision.Apr 21 2020, 10:38 AM
In D78532#1994909, @yln wrote:

So technically this is not necessary (standalone UBSan does not mmap memory), but good for consistency in case it stops being a noop?

That sounds right to me.

This revision is now accepted and ready to land.Apr 21 2020, 10:38 AM
This revision was automatically updated to reflect the committed changes.