Skip to content

Conversation

nnabeyang
Copy link
Contributor

This PR addresses an infinite loop issue that occurred when force casting NSError to CocoaError. The problem arose because _forceBridgeFromObjectiveC was calling _unconditionallyBridgeFromObjectiveC, and in turn, _unconditionallyBridgeFromObjectiveC was calling _forceBridgeFromObjectiveC, causing a recursive loop.

@nnabeyang nnabeyang force-pushed the fix-core_error-cast-infinit-loop branch from 0b3b469 to 8a3d11e Compare October 17, 2024 23:23
@parkera
Copy link
Contributor

parkera commented Oct 18, 2024

@swift-ci test

@parkera
Copy link
Contributor

parkera commented Oct 18, 2024

Thanks for this fix. We are strangely inconsistent about which bridging function is 'primary' for these types; sometimes it funnels to conditionally, sometimes unconditionally, sometimes none of the above.

@parkera parkera merged commit bf7369a into swiftlang:main Oct 18, 2024
2 of 3 checks passed
parkera pushed a commit to parkera/swift-corelibs-foundation that referenced this pull request Oct 18, 2024
@nnabeyang nnabeyang deleted the fix-core_error-cast-infinit-loop branch October 18, 2024 23:22
parkera added a commit that referenced this pull request Oct 22, 2024
parkera pushed a commit to parkera/swift-corelibs-foundation that referenced this pull request Oct 22, 2024
parkera added a commit that referenced this pull request Oct 22, 2024
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