Skip to content

[lldb][swift] Call FixCodeAddress on code addresses read from memory #10384

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

felipepiovezan
Copy link

In the changed code, we read a code address from memory and then attempt to use that value to create a load address. This fails in targets using high order bits for metadata, as we must first call FixCodeAddress so that the appropriate plugin can clean-up the address.

Unfortunately, there doesn't seem to be any clean way of testing this, but this patch also adds logging in case we fail to resolve the symbol context again.

(cherry picked from commit 0fc719c)

In the changed code, we read a code address from memory and then attempt
to use that value to create a load address. This fails in targets using
high order bits for metadata, as we must first call `FixCodeAddress` so
that the appropriate plugin can clean-up the address.

Unfortunately, there doesn't seem to be any clean way of testing this,
but this patch also adds logging in case we fail to resolve the symbol
context again.

(cherry picked from commit 0fc719c)
@felipepiovezan felipepiovezan merged commit 8274587 into swiftlang:next Mar 31, 2025
@felipepiovezan felipepiovezan deleted the felipe/call_fix_code_address_cherrypick branch March 31, 2025 16:46
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