Nothing Special   »   [go: up one dir, main page]

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

Merged
merged 1 commit into from
Dec 2, 2024

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 GKFX force-pushed the opaque_array_struct branch from 95d8d58 to 728a5d3 Compare August 9, 2024 20:41
@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.

@pvdrz pvdrz force-pushed the opaque_array_struct branch from eec64f0 to 59139f0 Compare December 2, 2024 03:23
@pvdrz pvdrz force-pushed the opaque_array_struct branch from 59139f0 to e2d16d0 Compare December 2, 2024 03:43
@pvdrz pvdrz enabled auto-merge December 2, 2024 03:43
@pvdrz pvdrz added this pull request to the merge queue Dec 2, 2024
Merged via the queue into rust-lang:main with commit 0267b0e Dec 2, 2024
28 checks passed
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
3 participants