This is an archive of the discontinued LLVM Phabricator instance.

[asan] Switch to using dynamic shadow offset on iOS
ClosedPublic

Authored by zaks.anna on Oct 3 2016, 5:29 PM.

Diff Detail

Repository
rL LLVM

Event Timeline

zaks.anna updated this revision to Diff 73379.Oct 3 2016, 5:29 PM
zaks.anna retitled this revision from to [asan] Switch to using dynamic shadow offset on iOS.
zaks.anna updated this object.
zaks.anna added reviewers: kubamracek, etienneb.
zaks.anna added subscribers: kcc, llvm-commits.
kcc accepted this revision.Oct 3 2016, 6:41 PM
kcc added a reviewer: kcc.

LGTM
Does it deserve any kind of test?

lib/sanitizer_common/sanitizer_mac.cc
753 ↗(On Diff #73379)

if() instead of #if, please

This revision is now accepted and ready to land.Oct 3 2016, 6:41 PM

Does it deserve any kind of test?

We have internal buildbots testing a majority of asan tests on iOS. With this patch, dynamic offset will be the default and all tests should still pass. (Unfortunately, our iOS test scripts will not be usable for external developers, so we keep them private.)

Dynamic shadow also works on macOS. However, to test it in CI, we'd need to add an option to TSan runtime that would force to always use dynamic shadow. It would only work on the mac or Windows. Since dynamic shadow is not needed on the mac, so I am not sure it's worth adding the complexity.

This revision was automatically updated to reflect the committed changes.
pcc added a subscriber: pcc.Oct 4 2016, 5:48 PM

Hi Anna,

This change broke one of Chromium's Mac buildbots because the mach_vm.h header is not available.
https://build.chromium.org/p/chromium.fyi/builders/ClangToTMac/builds/11485/steps/gclient%20runhooks/logs/stdio

Do you know what the status of that header is? Is it publically available?