Skip to content

[RemoteInspection] Change RemoteAbsolutePointer (NFC) #82325

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

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

adrian-prantl
Copy link
Contributor

This patch changes RemoteAbsolutePointer to store both the symbol and the resolved address. This allows us to retire some ugly workarounds to deal with non-symbolic addresses and it fixes code paths that would need these workarounds, but haven't implemented them yet (i.e., the pack shape handling in the symbolicReferenceResolver in MetadataReader.

Addresses parts of rdar://146273066.
rdar://153687085

@adrian-prantl
Copy link
Contributor Author

test with swiftlang/llvm-project#10865
@swift-ci test

@@ -1871,7 +1871,7 @@ class TypeRefBuilder {
if (auto symbol = OpaquePointerReader(
remote::RemoteAddress(adjustedProtocolDescriptorTarget),
PointerSize)) {
if (!symbol->getSymbol().empty()) {
if (!symbol->getSymbol().empty() && symbol->getOffset() == 0) {
Copy link
Contributor

Choose a reason for hiding this comment

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

Why must the offset be 0 in this case?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

According to the other comments the combination of Symbol+Offset isn't actually implemented.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I just took this for granted without further investigation, but given that the Offset is never taken here, it seems plausible.

This patch changes RemoteAbsolutePointer to store both the symbol and
the resolved address. This allows us to retire some ugly workarounds
to deal with non-symbolic addresses and it fixes code paths that would
need these workarounds, but haven't implemented them yet (i.e., the
pack shape handling in the symbolicReferenceResolver in MetadatyaReader.

Addresses parts of rdar://146273066.
rdar://153687085
@adrian-prantl
Copy link
Contributor Author

test with swiftlang/llvm-project#10865
@swift-ci test

@adrian-prantl
Copy link
Contributor Author

test with swiftlang/llvm-project#10865
@swift-ci smoke test

@adrian-prantl
Copy link
Contributor Author

test with swiftlang/llvm-project#10865
@swift-ci test windows

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