Skip to content

Add deinit to SwiftTLSHandshakeAndRecordManager for release linkage - #21

Merged
kpodosin merged 1 commit into
mainfrom
kpodosin/addDeinit
Sep 24, 2026
Merged

kpodosin merged 1 commit into
mainfrom
kpodosin/addDeinit

Conversation

@kpodosin

Copy link
Copy Markdown
Contributor

SwiftTLSHandshakeAndRecordManager is a public ~Copyable struct whose storage is all internal types (TLSRecordHandler, TLSRecordProtector, TLSHandshakeStateMachine, EncryptionLevel). Without a deinit, an optimized client destroys it member-wise and references those types' metadata accessors, which have hidden linkage. SwiftNetwork failed to link in release with undefined symbols. Declaring one keeps destruction in module.

@kpodosin
kpodosin merged commit e1d5953 into main Sep 24, 2026
22 checks passed
Comment on lines +786 to +787
// Keeps destruction in-module; without it, optimized clients fail to link.
deinit {}

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Is there a swiftlang issue for this?

@rnro rnro added the 🔨 semver/patch No public API change. label Oct 5, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

🔨 semver/patch No public API change.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants