This is an archive of the discontinued LLVM Phabricator instance.

Support corefiles that put the uuid of their binary in a fixed address in low memory; load that binary
ClosedPublic

Authored by jasonmolenda on Aug 11 2023, 1:52 PM.

Details

Summary

There are some Mach-O corefiles that store the UUID of the main binary at a list of fixed addresses in low memory, prefixed with the characters 'uuid' 16 bytes before the 16-byte uuid itself. This patch adds check in ProcessMachCore for this situation if we haven't found more authoritative metadata about the binary to load, tries to find the binary for that UUID and loads it in to the target with a slide of 0. It's uncommon, but it would be nice if it was handled automatically and it's easy to drop in to ProcessMachCore at this point given the work I've been doing recently.

Diff Detail

Event Timeline

jasonmolenda created this revision.Aug 11 2023, 1:52 PM
Herald added a project: Restricted Project. · View Herald TranscriptAug 11 2023, 1:52 PM
jasonmolenda requested review of this revision.Aug 11 2023, 1:52 PM

Fix size check when making sure there's enough data.

jingham accepted this revision.Aug 14 2023, 2:29 PM

LGTM

This revision is now accepted and ready to land.Aug 14 2023, 2:29 PM