rustc: ensure optimized enums have a properly aligned size.#46808
Merged
bors merged 1 commit intorust-lang:masterfrom Dec 18, 2017
Merged
rustc: ensure optimized enums have a properly aligned size.#46808bors merged 1 commit intorust-lang:masterfrom
bors merged 1 commit intorust-lang:masterfrom
Conversation
Contributor
|
r? @estebank (rust_highfive has picked a reviewer for you, use r? to override) |
Member
Author
eb5a474 to
b67bf2e
Compare
Contributor
|
@bors r+ |
Collaborator
|
📌 Commit b67bf2e has been approved by |
b67bf2e to
087f1c2
Compare
Member
Author
|
I've redone the test such that it fails (on beta & nightly) even without the ICE from #46623. |
Contributor
|
@bors r+ |
Collaborator
|
📌 Commit 087f1c2 has been approved by |
Contributor
|
@bors p=1 This needs to get into beta |
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).
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).
Member
|
Looks like we forgot to backport for 1.23.0 (sorry about that!) so removing the beta tags. |
Member
Author
|
@alexcrichton #45225 was backed out from that beta (IIUC) so there wasn't anything to backport. |
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 free
to 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).