Skip to content

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

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

@felipepiovezan felipepiovezan commented Mar 29, 2025

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.

rdar://148164938

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.
@felipepiovezan felipepiovezan requested a review from a team as a code owner March 29, 2025 14:23
@felipepiovezan
Copy link
Author

@swift-ci test

Copy link

@jasonmolenda jasonmolenda left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM.

@felipepiovezan felipepiovezan merged commit c3429d5 into swiftlang:stable/20240723 Mar 29, 2025
3 checks passed
@felipepiovezan felipepiovezan deleted the felipe/call_fix_code_address branch March 29, 2025 21:57
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