Skip to content

[lldb] [Mach-O] ProcessMachCore needs to strip TBI data from addrs (#84998) #8399

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

Darwin AArch64 application processors are run with Top Byte Ignore mode enabled so metadata may be stored in the top byte, it needs to be ignored when reading/writing memory. David Spickett handled this already in the base class Process::ReadMemory but ProcessMachCore overrides that method (to avoid the memory cache) and did not pick up the same change. I add a test case that creates a pointer with metadata in the top byte and dereferences it with a live process and with a corefile.

rdar://123784501
(cherry picked from commit 52557bc)

…lvm#84998)

Darwin AArch64 application processors are run with Top Byte Ignore mode
enabled so metadata may be stored in the top byte, it needs to be
ignored when reading/writing memory. David Spickett handled this already
in the base class Process::ReadMemory but ProcessMachCore overrides that
method (to avoid the memory cache) and did not pick up the same change.
I add a test case that creates a pointer with metadata in the top byte
and dereferences it with a live process and with a corefile.

rdar://123784501
(cherry picked from commit 52557bc)
@jasonmolenda
Copy link
Author

@swift-ci test

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

@swift-ci test

@jasonmolenda
Copy link
Author

@swift-ci test windows

@jasonmolenda jasonmolenda merged commit f508fcc into swiftlang:stable/20230725 Mar 15, 2024
@jasonmolenda jasonmolenda deleted the cp/strip-tbi-data-from-macho-corefiles branch March 15, 2024 04: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.

2 participants