Skip to content

[IRGen] Apply correct type to conversion for direct values and erorrs… #79369

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
Feb 14, 2025

Conversation

drexin
Copy link
Contributor

@drexin drexin commented Feb 13, 2025

… with typed throws

rdar://144719032

When converting the combined result back to the actual types when directly returning typed errors, in case the error or result value was a single value smaller then pointer size and the combined value was larger, the value was converted to the combined type instead of the actual type, making it a no-op, which caused undefined behavior when writing the value to the coerced alloca.

… with typed throws

rdar://144719032

When converting the combined result back to the actual types when directly returning typed errors, in case
the error or result value was a single value smaller then pointer size and the combined value was larger,
the value was converted to the combined type instead of the actual type, making it a no-op, which caused
undefined behavior when writing the value to the coerced alloca.
@drexin drexin requested a review from aschwaighofer February 13, 2025 20:58
@drexin drexin requested a review from rjmccall as a code owner February 13, 2025 20:58
@drexin
Copy link
Contributor Author

drexin commented Feb 13, 2025

@swift-ci smoke test

Copy link
Contributor

@aschwaighofer aschwaighofer left a comment

Choose a reason for hiding this comment

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

In a follow-up can you refactor this code duplication?

@drexin
Copy link
Contributor Author

drexin commented Feb 14, 2025

@swift-ci smoke test

@drexin drexin merged commit 9a7c9da into swiftlang:main Feb 14, 2025
3 checks passed
@drexin drexin deleted the wip-144719032 branch February 14, 2025 05:20
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