Skip to content

[6.0] Serialization: Harden recovery from broken deserialization context #72631

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 28, 2024

Conversation

xymus
Copy link
Contributor

@xymus xymus commented Mar 27, 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.

Scope: Affects the deserialization logic shared by the compiler, LLDB and SourceKit.
Issue: rdar://110026935&125188407
Original PR: #72561
Risk: Very low, this change will give a chance to the compiler to keep going where it currently crashes.
Testing: There are no new tests, the services used here are already widely tested.
Reviewer: @adrian-prantl

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

rdar://110026935
@xymus xymus added 🍒 release cherry pick Flag: Release branch cherry picks swift 6.0 labels Mar 27, 2024
@xymus xymus requested a review from nkcsgexi March 27, 2024 18:30
@xymus xymus requested a review from a team as a code owner March 27, 2024 18:30
@xymus
Copy link
Contributor Author

xymus commented Mar 27, 2024

@swift-ci Please test

@xymus xymus merged commit 734ca8c into swiftlang:release/6.0 Mar 28, 2024
@xymus xymus deleted the harden-deser-6.0 branch March 28, 2024 18:33
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
🍒 release cherry pick Flag: Release branch cherry picks swift 6.0
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants