This is an archive of the discontinued LLVM Phabricator instance.

[Sanitizer][Darwin] Lookup dyld image header via shared cache
ClosedPublic

Authored by yln on Jun 30 2022, 12:17 PM.

Details

Summary

On macOS 13+, dyld itself has moved into the shared cache. Looking it
up via vm_region_recurse_64() now causes spins/hangs/crashes. We use a
different set of dyld APIs to find the image header in the shared cache.

rdar://92131949

Diff Detail

Event Timeline

yln created this revision.Jun 30 2022, 12:17 PM
Herald added a project: Restricted Project. · View Herald TranscriptJun 30 2022, 12:17 PM
Herald added a subscriber: Enna1. · View Herald Transcript
yln requested review of this revision.Jun 30 2022, 12:17 PM
Herald added a project: Restricted Project. · View Herald TranscriptJun 30 2022, 12:17 PM
Herald added a subscriber: Restricted Project. · View Herald Transcript
yln updated this revision to Diff 441485.Jun 30 2022, 12:33 PM

Nitpicks: make function naming more consistent, add assert, and update comments.

yln updated this revision to Diff 441488.Jun 30 2022, 12:44 PM

Make fallback GetDyldImageHeaderViaVMRegion() more explicit.

wrotki accepted this revision.Jun 30 2022, 3:18 PM

LGTM

This revision is now accepted and ready to land.Jun 30 2022, 3:18 PM
This revision was automatically updated to reflect the committed changes.