Skip to content

[swift/release/5.7][lldb] Update use of swift::ser::validateSerializedAST to new API #4709

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 19, 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#58988


Cherry-pick of #4692.

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
Copy link
Author

xymus commented May 19, 2022

swiftlang/swift#58988

@swift-ci Please test

Copy link

@ghost ghost left a comment

Choose a reason for hiding this comment

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

@xymus xymus merged commit a2dd486 into swiftlang:swift/release/5.7 May 23, 2022
@xymus xymus deleted the lldb-swiftmodule-per-sdk-5.7 branch May 23, 2022 15:09
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