Uh oh!
There was an error while loading. Please reload this page.
Fix transmute::<T, U> where T requires a bigger alignment than U - #33233
Closed
dotdash wants to merge 1 commit into
Closed
Fix transmute::<T, U> where T requires a bigger alignment than U#33233dotdash wants to merge 1 commit into
dotdash wants to merge 1 commit into
Conversation
For types that are not bitcast-compatible, transmute tries to avoid generating a temporary by translating its source expression directly into its destination, but when the source type has a bigger alignment requirement than the destination, this can lead to code that breaks due to misaligned stores. So in that case we need to generate a temporary for the source expression and then copy that into the destination, setting the proper alignment information on the memcpy/store. Fixesrust-lang#32947
rust-highfive
commented
Apr 27, 2016
Contributor
r? @jroesch (rust_highfive has picked a reviewer for you, use r? to override) |
eddyb
commented
Apr 27, 2016
Contributor
@bors r+ |
bors
commented
Apr 27, 2016
Collaborator
📌 Commit ab0de54 has been approved by |
Manishearth
commented
Apr 27, 2016
Member
bors added a commit
that referenced
this pull request
Apr 27, 2016
eddyb
commented
Apr 27, 2016
Contributor
Ah, right, the MIR implementation of |
bors
commented
Apr 29, 2016
Collaborator
⌛ Testing commit ab0de54 with merge 619f57e... |
bors
commented
Apr 29, 2016
Collaborator
⛄ The build was interrupted to prioritize another pull request. |
dotdash
commented
Apr 29, 2016
ContributorAuthor
@bors r- |
alexcrichton
commented
Jul 19, 2016
Member
ping @dotdash, any update on this? |
bors
commented
Aug 25, 2016
Collaborator
☔ The latest upstream changes (presumably #35764) made this pull request unmergeable. Please resolve the merge conflicts. |
alexcrichton
commented
Aug 29, 2016
Member
Closing due to inactivity, but feel free to resubmit with a rebase! |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for freeto join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
For types that are not bitcast-compatible, transmute tries to avoid
generating a temporary by translating its source expression directly
into its destination, but when the source type has a bigger alignment
requirement than the destination, this can lead to code that breaks due
to misaligned stores. So in that case we need to generate a temporary
for the source expression and then copy that into the destination,
setting the proper alignment information on the memcpy/store.
Fixes#32947