-
Notifications
You must be signed in to change notification settings - Fork 10.5k
[cxx-interop] C++ class with [[no_unique_address]] member crashes IRGen #80764
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
Labels
bug
A deviation from expected or documented behavior. Also: expected but undesirable behavior.
crash
Bug: A crash, i.e., an abnormal termination of software
triage needed
This issue needs more specific labels
Comments
Thanks for the report! Just to double check, the crash goes away if you remove |
That's correct, without the attribute the code compiles as expected |
Xazax-hun
pushed a commit
that referenced
this issue
Apr 12, 2025
The Swift compiler was not prepared for the case where a field is stored in the padding of the previous field. Fixes #80764
Xazax-hun
pushed a commit
that referenced
this issue
Apr 13, 2025
Swift does not support storing fields in the padding of the previous fields just yet, so let's not import fields like that from C++. Represent them as opaque blobs instead. Fixes #80764
Xazax-hun
pushed a commit
that referenced
this issue
Apr 13, 2025
Swift does not support storing fields in the padding of the previous fields just yet, so let's not import fields like that from C++. Represent them as opaque blobs instead. Fixes #80764
Xazax-hun
pushed a commit
that referenced
this issue
Apr 13, 2025
Swift does not support storing fields in the padding of the previous fields just yet, so let's not import fields like that from C++. Represent them as opaque blobs instead. Fixes #80764
fwiw in my project this can be worked around by use of a |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
bug
A deviation from expected or documented behavior. Also: expected but undesirable behavior.
crash
Bug: A crash, i.e., an abnormal termination of software
triage needed
This issue needs more specific labels
Description
gist.github.com/ADKaster/338e1c4bef075d4ac2feb27336153bd1
Not yet reduced, but @Xazax-hun Mentioned in #80538 (comment) that they have a fix in mind.
Reproduction
Stack dump
Expected behavior
No crash :)
Environment
Swift version 6.2-dev (LLVM fd0517f784635fb, Swift 433ca8e)
Target: x86_64-unknown-linux-gnu
Build config: +assertions
Additional information
No response
The text was updated successfully, but these errors were encountered: