This is an archive of the discontinued LLVM Phabricator instance.

[TSan][Darwin] Fix shadow mapping for iOS simulator on Apple Silicon
ClosedPublic

Authored by yln on Dec 15 2021, 7:43 PM.

Details

Summary

With the introduction of Apple Silicon defined(__aarch64__) is not a
reliable way to check for the platform anymore.

We want to use the "normal" Mapping48AddressSpace mapping everywhere
(including the iOS simulators on AS) except on device.

Relevant revisions:
https://reviews.llvm.org/D35147
https://reviews.llvm.org/D86377
https://reviews.llvm.org/D107743
https://reviews.llvm.org/D107888

Diff Detail

Event Timeline

yln created this revision.Dec 15 2021, 7:43 PM
yln requested review of this revision.Dec 15 2021, 7:43 PM
Herald added a project: Restricted Project. · View Herald TranscriptDec 15 2021, 7:43 PM
Herald added a subscriber: Restricted Project. · View Herald Transcript
yln edited the summary of this revision. (Show Details)Dec 15 2021, 7:44 PM
yln added inline comments.Dec 15 2021, 7:48 PM
compiler-rt/lib/tsan/rtl/tsan_platform.h
588–593

This change is NFC, but I hope it makes things easier to read.

compiler-rt/lib/tsan/rtl/tsan_platform_posix.cpp
113

iOS simulator on AS is now not included here; it will get the default mapping from the #else.

dvyukov accepted this revision.Dec 15 2021, 10:44 PM
This revision is now accepted and ready to land.Dec 15 2021, 10:44 PM
kubamracek accepted this revision.Dec 17 2021, 11:13 AM
delcypher accepted this revision.Dec 17 2021, 11:59 AM

LGTM

compiler-rt/lib/tsan/rtl/tsan_platform.h
588–593

It's a little hard to read but I think that's because the SANITIZER_MAC name is confusing.

aralisza accepted this revision.Dec 17 2021, 12:50 PM
This revision was landed with ongoing or failed builds.Dec 17 2021, 3:59 PM
This revision was automatically updated to reflect the committed changes.