Skip to content
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

Wrap the array representation of opaque types in a #[repr(C)] struct #2880

Open
wants to merge 3 commits into
base: main
Choose a base branch
from

Conversation

GKFX
Copy link
Contributor

@GKFX GKFX commented Aug 8, 2024

Fixes #2845. Wrapping the generated array in a struct ensures that it is passed in an FFI-safe way. This does assume that the calling convention for structs is only dependent on size and alignment, but that seems like an improvement on using a type whose calling convention is not considered stable at all. Padding bytes (etc.) have been excluded from this treatment.

@GKFX
Copy link
Contributor Author

GKFX commented Aug 9, 2024

@stevecapperarm does this resolve your issue in #2845?

r? @emilio @pvdrz

@rustbot
Copy link
Collaborator

rustbot commented Aug 9, 2024

Error: The feature assign is not enabled in this repository.
To enable it add its section in the triagebot.toml in the root of the repository.

Please file an issue on GitHub at triagebot if there's a problem with this bot, or reach out on #t-infra on Zulip.

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.

AArch64 Linux va_list not FFI-safe
2 participants