Skip to content

[6.1][Concurrency] Fix start of version ranges in install name magic symbols. #78062

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

Conversation

mikeash
Copy link
Contributor

@mikeash mikeash commented Dec 9, 2024

Cherry-pick #77980 to release/6.1.

The magic symbols specify a version range where clients should reference a @rpath relative path to libswift_Concurrency.dylib instead of the standard absolute path. This version range started at macOS 10.15 and aligned versions, which is the oldest target supported by Concurrency. However, clients that use Concurrency can target earlier OSes as long as they availability-check their use of Concurrency. When targeting something earlier than 10.15, they'd reference the absolute path, then fail to find the back-deployment Concurrency runtime on OS versions that need it.

Fix this by setting the start of the range to macOS 10.9 and aligned, which is the oldest target supported by Swift.

rdar://140476764

@mikeash mikeash requested a review from a team as a code owner December 9, 2024 17:12
@mikeash
Copy link
Contributor Author

mikeash commented Dec 9, 2024

  • Explanation: Correctly availability-guarded Concurrency code crashes on macOS 10.15 (and aligned versions of other OSes) when targeting macOS 10.14 or earlier. The wrong path for the Concurrency runtime is embedded when targeting 10.14 or earlier, and 10.15 is consequently unable to load it.
  • Scope: Affects apps targeting OS versions before Concurrency is supported, with availability-gated Concurrency usage.
  • Issues: rdar://140476764
  • Original PR: [Concurrency] Fix start of version ranges in install name magic symbols. #77980
  • Risk: Low. This changes the version numbers in the magic linker symbols for the Concurrency runtime so that they cover a wide range of versions.
  • Testing: Standard Swift CI testing for general functionality, manual testing to ensure the correct path is embedded.
  • Reviewed by: @ian-twilightcoder

@mikeash
Copy link
Contributor Author

mikeash commented Dec 9, 2024

@swift-ci please test

@mikeash mikeash enabled auto-merge December 9, 2024 18:53
…symbols.

The magic symbols specify a version range where clients should reference a @rpath relative path to libswift_Concurrency.dylib instead of the standard absolute path. This version range started at macOS 10.15 and aligned versions, which is the oldest target supported by Concurrency. However, clients that use Concurrency can target earlier OSes as long as they availability-check their use of Concurrency. When targeting something earlier than 10.15, they'd reference the absolute path, then fail to find the back-deployment Concurrency runtime on OS versions that need it.

Fix this by setting the start of the range to macOS 10.9 and aligned, which is the oldest target supported by Swift.

rdar://140476764
(cherry picked from commit e727252)
@mikeash mikeash force-pushed the concurrency-magic-version-fix-6.1 branch from ce3ccde to 9c88cdd Compare December 9, 2024 20:58
@mikeash
Copy link
Contributor Author

mikeash commented Dec 9, 2024

These symbols show up in the baseline for the ABI tests, need to adjust them too.

@mikeash
Copy link
Contributor Author

mikeash commented Dec 9, 2024

@swift-ci please test

@mikeash
Copy link
Contributor Author

mikeash commented Jan 27, 2025

@swift-ci please test

@mikeash mikeash merged commit e5f514d into swiftlang:release/6.1 Jan 28, 2025
5 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.

3 participants