Skip to content

Conversation

@mikeash
Copy link
Contributor

@mikeash mikeash commented Oct 30, 2025

Instead of using weak definitions of swift_retain_preservemost and swift_release_preservemost, use weak references and explicitly check them for NULL.

Embedded Swift uses weak definitions for its runtime symbols. If swiftCore is able to override the weak definitions of the _preservemost functions, it will also override the Embedded symbols. They are not compatible, so this ends poorly.

Note: this includes the commit from #85192, fixing the ABI tests. Once that merges, we'll be left with just the commit for this change in this PR.

The client retain/release changes introduced new symbols which need to be added to these tests.

rdar://163578648
Instead of using weak definitions of swift_retain_preservemost and swift_release_preservemost, use weak references and explicitly check them for NULL.

Embedded Swift uses weak definitions for its runtime symbols. If swiftCore is able to override the weak definitions of the _preservemost functions, it will also override the Embedded symbols. They are not compatible, so this ends poorly.
@mikeash mikeash requested a review from al45tair October 30, 2025 19:21
@mikeash mikeash requested a review from a team as a code owner October 30, 2025 19:21
@mikeash
Copy link
Contributor Author

mikeash commented Oct 30, 2025

@swift-ci please test

Copy link
Member

@DougGregor DougGregor left a comment

Choose a reason for hiding this comment

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

This looks pragmatic and good to me, thank you

@mikeash
Copy link
Contributor Author

mikeash commented Oct 31, 2025

@swift-ci please test macos platform

@mikeash
Copy link
Contributor Author

mikeash commented Oct 31, 2025

@swift-ci please test windows platform

@mikeash mikeash enabled auto-merge October 31, 2025 21:23
@mikeash mikeash merged commit b01436d into swiftlang:main Nov 1, 2025
4 of 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