Uh oh!
There was an error while loading. Please reload this page.
rustc: ensure optimized enums have a properly aligned size. - #46808
Merged
Conversation
rust-highfive
commented
Dec 18, 2017
Contributor
r? @estebank (rust_highfive has picked a reviewer for you, use r? to override) |
eddyb
commented
Dec 18, 2017
ContributorAuthor
eddybforce-pushed
the
issue-46769-quick
branch
from
December 18, 2017 16:33
eb5a474 to
b67bf2eComparearielb1
commented
Dec 18, 2017
Contributor
@bors r+ |
bors
commented
Dec 18, 2017
Collaborator
📌 Commit b67bf2e has been approved by |
eddybforce-pushed
the
issue-46769-quick
branch
from
December 18, 2017 19:32
b67bf2e to
087f1c2Compareeddyb
commented
Dec 18, 2017
ContributorAuthor
I've redone the test such that it fails (on beta & nightly) even without the ICE from #46623. |
arielb1
commented
Dec 18, 2017
Contributor
@bors r+ |
bors
commented
Dec 18, 2017
Collaborator
📌 Commit 087f1c2 has been approved by |
arielb1
commented
Dec 18, 2017
Contributor
@bors p=1 This needs to get into beta |
bors
commented
Dec 18, 2017
Collaborator
bors added a commit
that referenced
this pull request
Dec 18, 2017
rustc: ensure optimized enums have a properly aligned size. Fixes#46769 by padding the optimized enums wrapping packed data as necessary. Note that this is not the only way to solve this - on nightly, #46436 makes it easier to fix without adding new padding because of the replacement of `packed` flags with a non-redundant scheme. But because it can't be backported, the optimal fix will be in a separate nightly-only PR (#46809).
bors
commented
Dec 18, 2017
Collaborator
☀️ Test successful - status-appveyor, status-travis |
kennytm added a commit
to kennytm/rust
that referenced
this pull request
Dec 21, 2017
rustc: do not raise the alignment of optimized enums to the niche's alignment. This is the improved fix for rust-lang#46769 that does not increase the size of any types (see also rust-lang#46808).
alexcrichton
commented
Jan 10, 2018
Member
Looks like we forgot to backport for 1.23.0 (sorry about that!) so removing the beta tags. |
eddyb
commented
Jan 10, 2018
ContributorAuthor
@alexcrichton#45225 was backed out from that beta (IIUC) so there wasn't anything to backport. |
alexcrichton
commented
Jan 10, 2018
Member
Ah ok, great! |
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.
Fixes#46769 by padding the optimized enums wrapping packed data as necessary.
Note that this is not the only way to solve this - on nightly, #46436 makes it easier to fix without adding new padding because of the replacement of
packedflags with a non-redundant scheme.But because it can't be backported, the optimal fix will be in a separate nightly-only PR (#46809).