Skip to content

Set the expected align for byval arguments #38870

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

Closed
wants to merge 1 commit into from

Conversation

nagisa
Copy link
Member

@nagisa nagisa commented Jan 6, 2017

The alignment expected by the sysv ABI for i128 (16 bytes) does not match the alignment expected by
rustc (8 bytes). Anything containing i128, then, when passed across the ABI boundary may result
in stack/memory being trashed by the callee.

Note that this does not actually fix the relevant issue, only works around it in a very specific case. Annotating alignment of byval params seems like a good idea overall anyway.

r? @eddyb

The alignment expected by the sysv ABI for i128 (16 bytes) does not match the alignment expected by
rustc (8 bytes). Anything containing `i128`, then, when passed across the ABI boundary may result
in stack/memory being trashed by the callee.
@eddyb
Copy link
Member

eddyb commented Jan 6, 2017

How would this have any visible effect? You seem to be setting the alignment of the type, without ever increasing it (unless I'm missing something preexisting?), and this is the default that LLVM uses anyway.

@bors
Copy link
Collaborator

bors commented Jan 17, 2017

☔ The latest upstream changes (presumably #39095) made this pull request unmergeable. Please resolve the merge conflicts.

@nagisa nagisa closed this Jan 19, 2017
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.

3 participants