Skip to content

[RemoteMirrors] Fix losing the remote address on StaticMirror #82981

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

Merged
merged 1 commit into from
Jul 12, 2025

Conversation

augusto2112
Copy link
Contributor

The Offset field of a DynamicRelocation is either an offset or a remote address, but was being treated only as a remote address on getDynamicSymbol.

@augusto2112 augusto2112 requested review from mikeash and etcwilde July 11, 2025 00:26
@augusto2112 augusto2112 requested a review from slavapestov as a code owner July 11, 2025 00:26
@augusto2112
Copy link
Contributor Author

@swift-ci smoke test

@@ -5,7 +5,6 @@
//
// Temporarily disable on AArch64 Linux (rdar://88451721)
// UNSUPPORTED: OS=linux-gnu && CPU=aarch64
Copy link
Member

Choose a reason for hiding this comment

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

Do we still need this marked as unsupported on Linux?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

That one seems unrelated to this change.

Copy link
Member

@finagolfin finagolfin Jul 11, 2025

Choose a reason for hiding this comment

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

@@ -10,7 +10,6 @@

// FIXME: rdar://127796117
// UNSUPPORTED: OS=linux-gnu && CPU=aarch64
Copy link
Member

Choose a reason for hiding this comment

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

Do we still need this marked as unsupported on Linux?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Same as above.

Copy link
Member

Choose a reason for hiding this comment

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

Same passing claim as above, can probably be checked by enabling them and running the linux AArch64 CI on this pull.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Ok, I removed it, lets see if it works

@augusto2112
Copy link
Contributor Author

@swift-ci smoke test

@drodriguez
Copy link
Contributor

I can confirm applying this locally also fixes those two tests in my setup. Thanks!

@finagolfin
Copy link
Member

@swift-ci please build toolchain Ubuntu 22.04 aarch64

@etcwilde
Copy link
Member

Swift Build Toolchain Ubuntu 22.04 (aarch64) Failure:

[2025-07-11T21:12:57.166Z] FAIL: Swift(linux-aarch64) :: IRGen/availability_custom_domains_clang.swift (3079 of 19821)
[2025-07-11T21:12:57.166Z] ******************** TEST 'Swift(linux-aarch64) :: IRGen/availability_custom_domains_clang.swift' FAILED ********************
[2025-07-11T21:12:57.166Z] Exit Code: 1
[2025-07-11T21:12:57.166Z] 
[2025-07-11T21:12:57.166Z] Command Output (stderr):
[2025-07-11T21:12:57.166Z] --
[2025-07-11T21:12:57.166Z] RUN: at line 1: /home/build-user/build/buildbot_linux/swift-linux-aarch64/bin/swift-frontend -target aarch64-unknown-linux-gnu  -module-cache-path /home/build-user/build/buildbot_linux/swift-linux-aarch64/swift-test-results/aarch64-unknown-linux-gnu/clang-module-cache -swift-version 4  -define-availability 'SwiftStdlib 9999:macOS 9999, iOS 9999, watchOS 9999, tvOS 9999' -define-availability 'StdlibDeploymentTarget 9999:macOS 9999, iOS 9999, watchOS 9999, tvOS 9999' -define-availability 'SwiftStdlib 5.0:macOS 10.14.4, iOS 12.2, watchOS 5.2, tvOS 12.2' -define-availability 'StdlibDeploymentTarget 5.0:macOS 10.14.4, iOS 12.2, watchOS 5.2, tvOS 12.2' -define-availability 'SwiftStdlib 5.1:macOS 10.15, iOS 13.0, watchOS 6.0, tvOS 13.0' -define-availability 'StdlibDeploymentTarget 5.1:macOS 10.15, iOS 13.0, watchOS 6.0, tvOS 13.0' -define-availability 'SwiftStdlib 5.2:macOS 10.15.4, iOS 13.4, watchOS 6.2, tvOS 13.4' -define-availability 'StdlibDeploymentTarget 5.2:macOS 10.15.4, iOS 13.4, watchOS 6.2, tvOS 13.4' -define-availability 'SwiftStdlib 5.3:macOS 11.0, iOS 14.0, watchOS 7.0, tvOS 14.0' -define-availability 'StdlibDeploymentTarget 5.3:macOS 11.0, iOS 14.0, watchOS 7.0, tvOS 14.0' -define-availability 'SwiftStdlib 5.4:macOS 11.3, iOS 14.5, watchOS 7.4, tvOS 14.5' -define-availability 'StdlibDeploymentTarget 5.4:macOS 11.3, iOS 14.5, watchOS 7.4, tvOS 14.5' -define-availability 'SwiftStdlib 5.5:macOS 12.0, iOS 15.0, watchOS 8.0, tvOS 15.0' -define-availability 'StdlibDeploymentTarget 5.5:macOS 12.0, iOS 15.0, watchOS 8.0, tvOS 15.0' -define-availability 'SwiftStdlib 5.6:macOS 12.3, iOS 15.4, watchOS 8.5, tvOS 15.4' -define-availability 'StdlibDeploymentTarget 5.6:macOS 12.3, iOS 15.4, watchOS 8.5, tvOS 15.4' -define-availability 'SwiftStdlib 5.7:macOS 13.0, iOS 16.0, watchOS 9.0, tvOS 16.0' -define-availability 'StdlibDeploymentTarget 5.7:macOS 13.0, iOS 16.0, watchOS 9.0, tvOS 16.0' -define-availability 'SwiftStdlib 5.8:macOS 13.3, iOS 16.4, watchOS 9.4, tvOS 16.4' -define-availability 'StdlibDeploymentTarget 5.8:macOS 13.3, iOS 16.4, watchOS 9.4, tvOS 16.4' -define-availability 'SwiftStdlib 5.9:macOS 14.0, iOS 17.0, watchOS 10.0, tvOS 17.0' -define-availability 'StdlibDeploymentTarget 5.9:macOS 14.0, iOS 17.0, watchOS 10.0, tvOS 17.0' -define-availability 'SwiftStdlib 5.10:macOS 14.4, iOS 17.4, watchOS 10.4, tvOS 17.4, visionOS 1.1' -define-availability 'StdlibDeploymentTarget 5.10:macOS 14.4, iOS 17.4, watchOS 10.4, tvOS 17.4, visionOS 1.1' -define-availability 'SwiftStdlib 6.0:macOS 15.0, iOS 18.0, watchOS 11.0, tvOS 18.0, visionOS 2.0' -define-availability 'StdlibDeploymentTarget 6.0:macOS 15.0, iOS 18.0, watchOS 11.0, tvOS 18.0, visionOS 2.0' -define-availability 'SwiftStdlib 6.1:macOS 15.4, iOS 18.4, watchOS 11.4, tvOS 18.4, visionOS 2.4' -define-availability 'StdlibDeploymentTarget 6.1:macOS 15.4, iOS 18.4, watchOS 11.4, tvOS 18.4, visionOS 2.4' -define-availability 'SwiftStdlib 6.2:macOS 9999, iOS 9999, watchOS 9999, tvOS 9999, visionOS 9999' -define-availability 'StdlibDeploymentTarget 6.2:macOS 9999, iOS 9999, watchOS 9999, tvOS 9999, visionOS 9999' -define-availability 'SwiftStdlib 6.3:macOS 9999, iOS 9999, watchOS 9999, tvOS 9999, visionOS 9999' -define-availability 'StdlibDeploymentTarget 6.3:macOS 9999, iOS 9999, watchOS 9999, tvOS 9999, visionOS 9999' -define-availability 'SwiftCompatibilitySpan 5.0:macOS 10.14.4, iOS 12.2, watchOS 5.2, tvOS 12.2, visionOS 1.0' -define-availability 'SwiftCompatibilitySpan 6.2:macOS 26.0, iOS 26.0, watchOS 26.0, tvOS 26.0, visionOS 26.0'  -typo-correction-limit 10  -emit-irgen -module-name Test /home/build-user/swift/test/IRGen/availability_custom_domains_clang.swift -verify    -enable-experimental-feature CustomAvailability    -import-bridging-header /home/build-user/swift/test/IRGen/Inputs/AvailabilityDomains.h    -Onone | /usr/bin/python3.10 /home/build-user/swift/utils/PathSanitizingFileCheck --allow-unused-prefixes --sanitize BUILD_DIR=/home/build-user/build/buildbot_linux/swift-linux-aarch64 --sanitize SOURCE_DIR=/home/build-user/swift --ignore-runtime-warnings --use-filecheck /home/build-user/build/buildbot_linux/llvm-linux-aarch64/bin/FileCheck   /home/build-user/swift/test/IRGen/availability_custom_domains_clang.swift --check-prefixes=CHECK,CHECK-O-NONE
[2025-07-11T21:12:57.166Z] + /home/build-user/build/buildbot_linux/swift-linux-aarch64/bin/swift-frontend -target aarch64-unknown-linux-gnu -module-cache-path /home/build-user/build/buildbot_linux/swift-linux-aarch64/swift-test-results/aarch64-unknown-linux-gnu/clang-module-cache -swift-version 4 -define-availability 'SwiftStdlib 9999:macOS 9999, iOS 9999, watchOS 9999, tvOS 9999' -define-availability 'StdlibDeploymentTarget 9999:macOS 9999, iOS 9999, watchOS 9999, tvOS 9999' -define-availability 'SwiftStdlib 5.0:macOS 10.14.4, iOS 12.2, watchOS 5.2, tvOS 12.2' -define-availability 'StdlibDeploymentTarget 5.0:macOS 10.14.4, iOS 12.2, watchOS 5.2, tvOS 12.2' -define-availability 'SwiftStdlib 5.1:macOS 10.15, iOS 13.0, watchOS 6.0, tvOS 13.0' -define-availability 'StdlibDeploymentTarget 5.1:macOS 10.15, iOS 13.0, watchOS 6.0, tvOS 13.0' -define-availability 'SwiftStdlib 5.2:macOS 10.15.4, iOS 13.4, watchOS 6.2, tvOS 13.4' -define-availability 'StdlibDeploymentTarget 5.2:macOS 10.15.4, iOS 13.4, watchOS 6.2, tvOS 13.4' -define-availability 'SwiftStdlib 5.3:macOS 11.0, iOS 14.0, watchOS 7.0, tvOS 14.0' -define-availability 'StdlibDeploymentTarget 5.3:macOS 11.0, iOS 14.0, watchOS 7.0, tvOS 14.0' -define-availability 'SwiftStdlib 5.4:macOS 11.3, iOS 14.5, watchOS 7.4, tvOS 14.5' -define-availability 'StdlibDeploymentTarget 5.4:macOS 11.3, iOS 14.5, watchOS 7.4, tvOS 14.5' -define-availability 'SwiftStdlib 5.5:macOS 12.0, iOS 15.0, watchOS 8.0, tvOS 15.0' -define-availability 'StdlibDeploymentTarget 5.5:macOS 12.0, iOS 15.0, watchOS 8.0, tvOS 15.0' -define-availability 'SwiftStdlib 5.6:macOS 12.3, iOS 15.4, watchOS 8.5, tvOS 15.4' -define-availability 'StdlibDeploymentTarget 5.6:macOS 12.3, iOS 15.4, watchOS 8.5, tvOS 15.4' -define-availability 'SwiftStdlib 5.7:macOS 13.0, iOS 16.0, watchOS 9.0, tvOS 16.0' -define-availability 'StdlibDeploymentTarget 5.7:macOS 13.0, iOS 16.0, watchOS 9.0, tvOS 16.0' -define-availability 'SwiftStdlib 5.8:macOS 13.3, iOS 16.4, watchOS 9.4, tvOS 16.4' -define-availability 'StdlibDeploymentTarget 5.8:macOS 13.3, iOS 16.4, watchOS 9.4, tvOS 16.4' -define-availability 'SwiftStdlib 5.9:macOS 14.0, iOS 17.0, watchOS 10.0, tvOS 17.0' -define-availability 'StdlibDeploymentTarget 5.9:macOS 14.0, iOS 17.0, watchOS 10.0, tvOS 17.0' -define-availability 'SwiftStdlib 5.10:macOS 14.4, iOS 17.4, watchOS 10.4, tvOS 17.4, visionOS 1.1' -define-availability 'StdlibDeploymentTarget 5.10:macOS 14.4, iOS 17.4, watchOS 10.4, tvOS 17.4, visionOS 1.1' -define-availability 'SwiftStdlib 6.0:macOS 15.0, iOS 18.0, watchOS 11.0, tvOS 18.0, visionOS 2.0' -define-availability 'StdlibDeploymentTarget 6.0:macOS 15.0, iOS 18.0, watchOS 11.0, tvOS 18.0, visionOS 2.0' -define-availability 'SwiftStdlib 6.1:macOS 15.4, iOS 18.4, watchOS 11.4, tvOS 18.4, visionOS 2.4' -define-availability 'StdlibDeploymentTarget 6.1:macOS 15.4, iOS 18.4, watchOS 11.4, tvOS 18.4, visionOS 2.4' -define-availability 'SwiftStdlib 6.2:macOS 9999, iOS 9999, watchOS 9999, tvOS 9999, visionOS 9999' -define-availability 'StdlibDeploymentTarget 6.2:macOS 9999, iOS 9999, watchOS 9999, tvOS 9999, visionOS 9999' -define-availability 'SwiftStdlib 6.3:macOS 9999, iOS 9999, watchOS 9999, tvOS 9999, visionOS 9999' -define-availability 'StdlibDeploymentTarget 6.3:macOS 9999, iOS 9999, watchOS 9999, tvOS 9999, visionOS 9999' -define-availability 'SwiftCompatibilitySpan 5.0:macOS 10.14.4, iOS 12.2, watchOS 5.2, tvOS 12.2, visionOS 1.0' -define-availability 'SwiftCompatibilitySpan 6.2:macOS 26.0, iOS 26.0, watchOS 26.0, tvOS 26.0, visionOS 26.0' -typo-correction-limit 10 -emit-irgen -module-name Test /home/build-user/swift/test/IRGen/availability_custom_domains_clang.swift -verify -enable-experimental-feature CustomAvailability -import-bridging-header /home/build-user/swift/test/IRGen/Inputs/AvailabilityDomains.h -Onone
[2025-07-11T21:12:57.166Z] + /usr/bin/python3.10 /home/build-user/swift/utils/PathSanitizingFileCheck --allow-unused-prefixes --sanitize BUILD_DIR=/home/build-user/build/buildbot_linux/swift-linux-aarch64 --sanitize SOURCE_DIR=/home/build-user/swift --ignore-runtime-warnings --use-filecheck /home/build-user/build/buildbot_linux/llvm-linux-aarch64/bin/FileCheck /home/build-user/swift/test/IRGen/availability_custom_domains_clang.swift --check-prefixes=CHECK,CHECK-O-NONE
[2025-07-11T21:12:57.166Z] /home/build-user/swift/test/IRGen/availability_custom_domains_clang.swift:54:18: error: CHECK-O-NONE: expected string not found in input
[2025-07-11T21:12:57.166Z] // CHECK-O-NONE: [[CALL:%.*]] = call zeroext i1 @__DynamicDomain_isAvailable()
[2025-07-11T21:12:57.166Z]                  ^
[2025-07-11T21:12:57.166Z] <stdin>:57:7: note: scanning from here
[2025-07-11T21:12:57.166Z] entry:
[2025-07-11T21:12:57.166Z]       ^
[2025-07-11T21:12:57.166Z] <stdin>:58:2: note: possible intended match here
[2025-07-11T21:12:57.166Z]  %0 = call i1 @__DynamicDomain_isAvailable()
[2025-07-11T21:12:57.166Z]  ^
[2025-07-11T21:12:57.166Z] 
[2025-07-11T21:12:57.166Z] Input file: <stdin>
[2025-07-11T21:12:57.166Z] Check file: /home/build-user/swift/test/IRGen/availability_custom_domains_clang.swift
[2025-07-11T21:12:57.166Z] 
[2025-07-11T21:12:57.166Z] -dump-input=help explains the following input dump.
[2025-07-11T21:12:57.166Z] 
[2025-07-11T21:12:57.166Z] Input was:
[2025-07-11T21:12:57.166Z] <<<<<<
[2025-07-11T21:12:57.166Z]             .
[2025-07-11T21:12:57.166Z]             .
[2025-07-11T21:12:57.166Z]             .
[2025-07-11T21:12:57.166Z]            52: 3: ; preds = %1, %2 
[2025-07-11T21:12:57.166Z]            53:  ret void 
[2025-07-11T21:12:57.166Z]            54: } 
[2025-07-11T21:12:57.166Z]            55:  
[2025-07-11T21:12:57.166Z]            56: define linkonce_odr hidden swiftcc i1 @"$sSC33__swift_DynamicDomain_isAvailableBi1_yF"() #0 { 
[2025-07-11T21:12:57.166Z]            57: entry: 
[2025-07-11T21:12:57.166Z] check:54'0           X error: no match found
[2025-07-11T21:12:57.166Z]            58:  %0 = call i1 @__DynamicDomain_isAvailable() 
[2025-07-11T21:12:57.166Z] check:54'0     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
[2025-07-11T21:12:57.166Z] check:54'1      ?                                            possible intended match
[2025-07-11T21:12:57.166Z]            59:  ret i1 %0 
[2025-07-11T21:12:57.166Z] check:54'0     ~~~~~~~~~~~
[2025-07-11T21:12:57.166Z]            60: } 
[2025-07-11T21:12:57.166Z] check:54'0     ~~
[2025-07-11T21:12:57.166Z]            61:  
[2025-07-11T21:12:57.166Z] check:54'0     ~
[2025-07-11T21:12:57.166Z]            62: declare extern_weak void @unavailable_in_dynamic_domain() #0 
[2025-07-11T21:12:57.166Z] check:54'0     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
[2025-07-11T21:12:57.166Z]            63:  
[2025-07-11T21:12:57.166Z] check:54'0     ~
[2025-07-11T21:12:57.166Z]             .
[2025-07-11T21:12:57.166Z]             .
[2025-07-11T21:12:57.166Z]             .
[2025-07-11T21:12:57.166Z] >>>>>>
[2025-07-11T21:12:57.166Z] 
[2025-07-11T21:12:57.166Z] --
[2025-07-11T21:12:57.166Z] 
[2025-07-11T21:12:57.166Z] ********************

@augusto2112
Copy link
Contributor Author

I don't think that failure is related to this change

@etcwilde
Copy link
Member

I don't think that failure is related to this change

I agree. Just had a script watch the PR for failed builds and extract failures for documenting purposes.
One of the radars calls out UBI-9 explicitly, so probably worth running that job too.

@etcwilde
Copy link
Member

@swift-ci please build toolchain UBI9 aarch64

@augusto2112
Copy link
Contributor Author

I don't think that failure is related to this change

I agree. Just had a script watch the PR for failed builds and extract failures for documenting purposes.

That's a useful script!

@augusto2112
Copy link
Contributor Author

please build toolchain UBI9 aarch64

@etcwilde did this work? I don't see it running

@etcwilde
Copy link
Member

Yeah, I'm not sure we have a trigger for aarch64 UBI9. Was worth a try.

The Offset field of a DynamicRelocation is either an offset or a remote
address, but was being treated only as a remote address on
getDynamicSymbol.
@augusto2112
Copy link
Contributor Author

@swift-ci smoke test

@augusto2112
Copy link
Contributor Author

I want to cherry-pick this into 6.2, so to play it safe, I'll keep those tests unsupported in this PR, and open a separate PR reenabling those tests after this is merged.

@augusto2112
Copy link
Contributor Author

@swift-ci smoke test Windows

@finagolfin
Copy link
Member

Yeah, I'm not sure we have a trigger for aarch64 UBI9.

There is a UBI 9 aarch64 CI job, so it would flag the issue once committed, if this still didn't work.

Not sure about manual pre-commit CI triggers though, is there a list somewhere public? The official doc is way behind.

@augusto2112 augusto2112 merged commit 2211d9f into swiftlang:main Jul 12, 2025
3 checks passed
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.

5 participants