Skip to content

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

Merged
bors merged 1 commit into
rust-lang:masterfrom
eddyb:issue-46769-quick
Dec 18, 2017
Merged

rustc: ensure optimized enums have a properly aligned size.#46808
bors merged 1 commit into
rust-lang:masterfrom
eddyb:issue-46769-quick

Conversation

@eddyb

@eddybeddyb commented Dec 18, 2017

Copy link
Copy Markdown
Contributor

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

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

Copy link
Copy Markdown
Contributor

r? @estebank

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

@eddyb

Copy link
Copy Markdown
ContributorAuthor

r? @arielb1 or @nagisa

@kennytmkennytm added the S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. label Dec 18, 2017
@arielb1

Copy link
Copy Markdown
Contributor

@bors r+

@bors

bors commented Dec 18, 2017

Copy link
Copy Markdown
Collaborator

📌 Commit b67bf2e has been approved by arielb1

@kennytmkennytm 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
Copy Markdown
ContributorAuthor

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

@arielb1

Copy link
Copy Markdown
Contributor

@bors r+

@bors

bors commented Dec 18, 2017

Copy link
Copy Markdown
Collaborator

📌 Commit 087f1c2 has been approved by arielb1

@arielb1

Copy link
Copy Markdown
Contributor

@bors p=1

This needs to get into beta

@bors

bors commented Dec 18, 2017

Copy link
Copy Markdown
Collaborator

⌛ 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

bors commented Dec 18, 2017

Copy link
Copy Markdown
Collaborator

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

@bors
bors merged commit 087f1c2 into rust-lang:masterDec 18, 2017
@eddyb
eddyb deleted the issue-46769-quick branch December 18, 2017 23:34
@arielb1arielb1 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
Copy Markdown
Member

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

@alexcrichtonalexcrichton 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
Copy Markdown
ContributorAuthor

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

@alexcrichton

Copy link
Copy Markdown
Member

Ah ok, great!

Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Labels

S-waiting-on-borsStatus: 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

@eddyb@rust-highfive@arielb1@bors@alexcrichton@kennytm@estebank