Skip to content

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

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 1 commit into from
May 18, 2022

Conversation

xymus
Copy link

@xymus xymus commented May 17, 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

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 changed the title [lldb] Update use of swift::ser::validateSerializedAST to new API [stable/20211026][lldb] Update use of swift::ser::validateSerializedAST to new API May 17, 2022
@xymus
Copy link
Author

xymus commented May 17, 2022

@swift-ci please test

swiftlang/swift#58935

@xymus
Copy link
Author

xymus commented May 18, 2022

swiftlang/swift#58935
@swift-ci please test

@xymus
Copy link
Author

xymus commented May 18, 2022

@kastiglione Is there a better branch to target for this change aligned with swift's main?

@xymus xymus requested review from kastiglione and bnbarham May 18, 2022 18:47
@bnbarham
Copy link

bnbarham commented May 18, 2022

stable/20211026 is aligned with main. swift/release/5.7 is aligned with release/5.7 and automerged to stable/20211026. There's also stable/20220421 for rebranch and since main automerges to rebranch we'll need the change there too.

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