Skip to content

[6.3] OriginallyDefinedIn: always use 1.0 as the starting platform version for $ld$previous directives#87194

Open
nkcsgexi wants to merge 2 commits intoswiftlang:release/6.3from
nkcsgexi:170243529
Open

[6.3] OriginallyDefinedIn: always use 1.0 as the starting platform version for $ld$previous directives#87194
nkcsgexi wants to merge 2 commits intoswiftlang:release/6.3from
nkcsgexi:170243529

Conversation

@nkcsgexi
Copy link
Contributor

@nkcsgexi nkcsgexi commented Feb 12, 2026

  • Explanation: Before this change, we were sometimes using introductory platform version as the starting version where a symbol is considered belonging to the original binary. However, this is insufficient because backdeploying to a platform version prior to a symbol's introductory version can happen. When it happens, we should expect the moved symbol to be found in the moved-from library, not the moved-to one. Expecting the symbol to be found in the moved-to library can lead to crasher.

  • Main branch PR: OriginallyDefinedIn: always use 1.0 as the starting platform version for $ld$previous directives #85600

  • Reviewed by: Mike Ash

  • Risks: Low

  • Test: Existing tests updated

  • Resolves: rdar://170243529

…for $ld$previous directives

Before this change, we were sometimes using introductory platform version as the starting version where
a symbol is considered belonging to the original binary. However, this is insufficient
because backdeploying to a platform version prior to a symbol's introductory version can happen. When it
happens, we should expect the moved symbol to be found in the moved-from library, not the moved-to one. Expecting
the symbol to be found in the moved-to library can lead to crasher.

Resolves: rdar://159408187
@nkcsgexi nkcsgexi requested a review from a team as a code owner February 12, 2026 20:27
@nkcsgexi
Copy link
Contributor Author

@swift-ci please test

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