Skip to content

Serialization: Harden recovery from broken deserialization context #72561

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

Merged
merged 3 commits into from
Mar 27, 2024

Conversation

xymus
Copy link
Contributor

@xymus xymus commented Mar 25, 2024

Both SourceKit and LLDB deserialize swiftmodule files and trigger more issues than normal compilation. SourceKit supports swiftmodules with errors and may see more mismatching context, while LLDB force loading more dependencies which may be missing and leading to a different context. Fix a few issues encountered by these tools by passing up any error instead of crashing.

rdar://110026935
rdar://125188407

xymus added 3 commits March 25, 2024 11:33
SourceKit has been known to crash in readInheritedProtocolConformance.
Let's make it more resilient.

rdar://110026935
@xymus
Copy link
Contributor Author

xymus commented Mar 25, 2024

@swift-ci Please smoke test

@xymus xymus requested review from bnbarham and adrian-prantl March 25, 2024 22:40
@xymus xymus requested a review from tshortli March 26, 2024 16:51
@xymus xymus changed the title Serialization: Harden resilience to imperfect context Serialization: Harden recovery from broken deserialization context Mar 26, 2024
Copy link
Contributor

@adrian-prantl adrian-prantl left a comment

Choose a reason for hiding this comment

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

Awesome, thanks!

@xymus xymus merged commit 3c62c74 into swiftlang:main Mar 27, 2024
@xymus xymus deleted the harden-deser branch March 27, 2024 17:17
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