Skip to content

🍒[5.9][Distributed] Fix handling indirect @in convention params in distributed funcs #67240 #67242

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

Conversation

ktoso
Copy link
Contributor

@ktoso ktoso commented Jul 12, 2023

Description: This resolves a crash in some projects where the parameter to a distributed func is passed indirect @in on Linux.

Specifically, the following assertion would trigger due to the argument count mismatch: ssert(NextValue + n <= Values.size()); // 3 + 1 <= 3 -> boom (Values expected to be 4 in this particular case)

Seems we never triggered this codepath before, even though many distributed functions with all kinds of parameters were written, they all ended up @in_guaranteed not triggering the bad codepath. Added test reproducing the issue and showcasing that it is fixed now.

Risk: Low, limited to @in passed parameters to distributed funcs which previously would crash
Review by: @xedin @jckarter
Testing: Added CI exercising this code-path, verified in real project with fixed compiler
Original PR: #67240
Radar: rdar://111887706

@ktoso ktoso requested a review from a team as a code owner July 12, 2023 02:02
@ktoso
Copy link
Contributor Author

ktoso commented Jul 12, 2023

@swift-ci please test

@ktoso
Copy link
Contributor Author

ktoso commented Jul 12, 2023

Added test reproducing the issue and showcasing that it's fixed now.

@ktoso
Copy link
Contributor Author

ktoso commented Jul 12, 2023

@swift-ci please test

@ktoso ktoso added distributed Feature → concurrency: distributed actor 🍒 release cherry pick Flag: Release branch cherry picks swift 5.9 labels Jul 12, 2023
@xedin xedin changed the title 🍒[5.9][Distributed] Fix handling indirect @in convention params in distributed funds #67240 🍒[5.9][Distributed] Fix handling indirect @in convention params in distributed funcs #67240 Jul 12, 2023
@DougGregor DougGregor merged commit e6dc45a into swiftlang:release/5.9 Jul 12, 2023
@ktoso ktoso deleted the pick-fix-indirect_in-handling-in-irgen-dist branch July 12, 2023 19:46
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
distributed Feature → concurrency: distributed actor 🍒 release cherry pick Flag: Release branch cherry picks swift 5.9
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants