Skip to content

[stable/20220421][lldb] Update use of swift::ser::validateSerializedAST to new API #4698

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

Conversation

xymus
Copy link

@xymus xymus commented May 18, 2022

The Swift service validateSerializedAST now accepts the name of the client SDK to limit loading only swiftmodules built with a compatible SDK. This prevents loading swiftmodules built with an incompatible SDK where the context is different enough that it can lead to hard compiler crashes.

In this use site, loading the swiftmodule from a binary should be safe as the SDK context will be extracted from that swiftmodule, so there's no need to require a specific SDK. Other imports will use regular loading path and apply the expected SDK restriction.

Swift API change: swiftlang/swift#58935


Cherry-pick of #4692 for rebranch.

The Swift service validateSerializedAST now accepts the name of the
client SDK to limit loading only swiftmodules built with the same SDK.
This prevents loading swiftmodules built with an incompatible SDK where
the context is different enough that it can lead to hard compiler
crashes.

In this use site, loading the swiftmodule from a binary should be safe
as the SDK context will be extracted from that swiftmodule. Other
imports will use regular loading path and apply the expected
restriction.

Swift API change: swiftlang/swift#58935
@xymus xymus requested a review from bnbarham May 18, 2022 22:08
@bnbarham
Copy link

Thanks 🙇 Just merge after you've merged the Swift one 👍

@xymus xymus merged commit 2f57338 into swiftlang:stable/20220421 May 18, 2022
@xymus
Copy link
Author

xymus commented May 18, 2022

Done, thanks!

@xymus xymus deleted the lldb-swiftmodule-per-sdk-20220421 branch May 18, 2022 22:10
@xymus xymus restored the lldb-swiftmodule-per-sdk-20220421 branch May 18, 2022 22:36
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