Skip to content

IRGen: Weak-link references to swift_getExtendedExistentialTypeMetadata() [5.9] #69462

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

Conversation

slavapestov
Copy link
Contributor

@slavapestov slavapestov commented Oct 27, 2023

  • main PR: IRGen: Weak-link references to swift_getExtendedExistentialTypeMetadata() #69459

  • Description: The type checker guards certain dynamic uses of constrained existential types SE-0353 behind an availability check, because the runtime entry point to instantiate extended existential metadata is only available on newer OSes. However, even if the metadata instantiation was dynamically unreachable at runtime, we forgot to weak link the symbol. This caused missing symbol errors at runtime.

  • Scope of the issue: Affects framework authors attempting backward deployment of conditionally-available code that requires extended existential metadata.

  • Origination: This scenario never worked.

  • Risk: Very low as this just changes the linkage of a symbol when the deployment target is sufficiently old.

  • Tested: New test case added.

  • Reviewed by: @tshortli on main

  • Radar: rdar://117530421.

@slavapestov slavapestov requested a review from a team as a code owner October 27, 2023 19:08
@slavapestov slavapestov changed the title IRGen: Weak-link references to swift_getExtendedExistentialTypeMetadata() IRGen: Weak-link references to swift_getExtendedExistentialTypeMetadata() [5.9] Oct 27, 2023
@slavapestov slavapestov force-pushed the fix-extended-existential-metadata-weak-5.9 branch from 836fe8d to 04ebd16 Compare October 27, 2023 19:19
@slavapestov
Copy link
Contributor Author

@swift-ci Please test

@slavapestov slavapestov merged commit 7f85215 into swiftlang:release/5.9 Oct 28, 2023
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