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

rustc: ensure optimized enums have a properly aligned size. #46808

Merged
merged 1 commit into from
Dec 18, 2017

Conversation

eddyb
Copy link
Member

@eddyb eddyb commented Dec 18, 2017

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).

@eddyb eddyb added the beta-nominated Nominated for backporting to the compiler in the beta channel. label Dec 18, 2017
@rust-highfive
Copy link
Collaborator

r? @estebank

(rust_highfive has picked a reviewer for you, use r? to override)

@eddyb
Copy link
Member Author

eddyb commented Dec 18, 2017

r? @arielb1 or @nagisa

@rust-highfive rust-highfive assigned arielb1 and unassigned estebank Dec 18, 2017
@kennytm kennytm added the S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. label Dec 18, 2017
@arielb1
Copy link
Contributor

arielb1 commented Dec 18, 2017

@bors r+

@bors
Copy link
Contributor

bors commented Dec 18, 2017

📌 Commit b67bf2e has been approved by arielb1

@kennytm kennytm added S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. and removed S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. labels Dec 18, 2017
@eddyb
Copy link
Member Author

eddyb commented Dec 18, 2017

I've redone the test such that it fails (on beta & nightly) even without the ICE from #46623.

@arielb1
Copy link
Contributor

arielb1 commented Dec 18, 2017

@bors r+

@bors
Copy link
Contributor

bors commented Dec 18, 2017

📌 Commit 087f1c2 has been approved by arielb1

@arielb1
Copy link
Contributor

arielb1 commented Dec 18, 2017

@bors p=1

This needs to get into beta

@bors
Copy link
Contributor

bors commented Dec 18, 2017

⌛ Testing commit 087f1c2 with merge e7db42f...

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
Copy link
Contributor

bors commented Dec 18, 2017

☀️ Test successful - status-appveyor, status-travis
Approved by: arielb1
Pushing e7db42f to master...

@bors bors merged commit 087f1c2 into rust-lang:master Dec 18, 2017
@eddyb eddyb deleted the issue-46769-quick branch December 18, 2017 23:34
@arielb1 arielb1 added the beta-accepted Accepted for backporting to the compiler in the beta channel. label Dec 21, 2017
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
Copy link
Member

Looks like we forgot to backport for 1.23.0 (sorry about that!) so removing the beta tags.

@alexcrichton alexcrichton removed beta-accepted Accepted for backporting to the compiler in the beta channel. beta-nominated Nominated for backporting to the compiler in the beta channel. labels Jan 10, 2018
@eddyb
Copy link
Member Author

eddyb commented Jan 10, 2018

@alexcrichton #45225 was backed out from that beta (IIUC) so there wasn't anything to backport.

@alexcrichton
Copy link
Member

Ah ok, great!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Nightly ICE regression
7 participants