Skip to content

When ProcessMachCore has metadata for a binary, don't scan #7203

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Conversation

jasonmolenda
Copy link

When ProcessMachCore has metadata for a binary, don't scan

Mach-O corefiles have several possible types of metadata for the binaries that were running when the corefile was written. ProcessMachCore will try to find these binaries, and load them. When we have a hint, but could not find the binary, this change makes ProcessMachCore not fall back to scanning the corefile looking for ANY binary that it could load. We sometimes have multiple binaries present in the memory in a corefile, but only the correct binary should be loaded, the others are data.

Differential Revision: https://reviews.llvm.org/D157168 rdar://112602508

(cherry picked from commit c5f8110)

Mach-O corefiles have several possible types of metadata for the
binaries that were running when the corefile was written.
ProcessMachCore will try to find these binaries, and load them.
When we have a hint, but could not find the binary, this change
makes ProcessMachCore not fall back to scanning the corefile looking
for ANY binary that it could load.  We sometimes have multiple binaries
present in the memory in a corefile, but only the correct binary
should be loaded, the others are data.

Differential Revision: https://reviews.llvm.org/D157168
rdar://112602508

(cherry picked from commit c5f8110)
@jasonmolenda
Copy link
Author

@swift-ci please test

@jasonmolenda jasonmolenda merged commit f6503d2 into swiftlang:stable/20221013 Aug 11, 2023
@jasonmolenda jasonmolenda deleted the eng/r112602508-dont-scan-corefile-for-binary-if-metadata-failed-to-find-it branch August 11, 2023 00:16
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant