Skip to content

TypeLowering: assume that C unions can contain a pointer #78221

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
Dec 17, 2024

Conversation

eeckstein
Copy link
Contributor

C unions are imported as opaque types. Therefore we have to assume that a union contains a pointer. This is important for alias analysis to catch escaping pointers via C unions.

Fixes a miscompile.
rdar://141555290

C unions are imported as opaque types. Therefore we have to assume that a union contains a pointer.
This is important for alias analysis to catch escaping pointers via C unions.

Fixes a miscompile.
rdar://141555290
@eeckstein eeckstein requested a review from jckarter as a code owner December 16, 2024 18:39
@eeckstein
Copy link
Contributor Author

@swift-ci test

@eeckstein eeckstein merged commit 22b31dc into swiftlang:main Dec 17, 2024
5 checks passed
@eeckstein eeckstein deleted the pointers_in_c_unions branch December 17, 2024 05:59
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