Skip to content

[Caching] Fix stack-use-after-scope in CachedDiagnostics #72192

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
Mar 9, 2024

Conversation

cachemeifyoucan
Copy link
Contributor

Fix a stack-use-after-scope in the CachedDiagnostics when the DiagnosticInfo entry that is getting deserialized has ChildDiagnostics.

There are some fields in the DiagnosticInfo are not owned by the DiagnosticsInfo itself. While the callback during the deserialization ensures those fields are still alive for the top level DiagnosticInfo when it gets used, it is not true for any child diagnostics info inside.

rdar://123846525

Fix a stack-use-after-scope in the CachedDiagnostics when the
DiagnosticInfo entry that is getting deserialized has ChildDiagnostics.

There are some fields in the DiagnosticInfo are not owned by the
DiagnosticsInfo itself. While the callback during the deserialization
ensures those fields are still alive for the top level DiagnosticInfo
when it gets used, it is not true for any child diagnostics info inside.

rdar://123846525
@cachemeifyoucan
Copy link
Contributor Author

@swift-ci please smoke test

@cachemeifyoucan cachemeifyoucan merged commit 463d8e1 into swiftlang:main Mar 9, 2024
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