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

[beta] Backports #47943

Merged
merged 5 commits into from
Feb 2, 2018
Merged

[beta] Backports #47943

merged 5 commits into from
Feb 2, 2018

Conversation

MaloJaffre
Copy link
Contributor

cuviper and others added 4 commits February 1, 2018 21:12
We can't use git commands to compute a prerelease version when we're
building from a source tarball, or if git is otherwise unavailable.
We'll just call such builds `x.y.z-beta`, without a prerelease.
MIR's `Const::get_field()` attempts to retrieve the value for a given
field in a constant. In the case of a union constant it was falling
through to a generic `const_get_elt` based on the field index. As union
fields don't have an index this caused an ICE in `llvm_field_index`.

Fix by simply returning the current value when accessing any field in a
union. This works because all union fields start at byte offset 0.

The added test uses `const_fn` it ensure the field is extracted using
MIR's const evaluation. The crash is reproducible without it, however.

Fixes rust-lang#47788
@rust-highfive
Copy link
Contributor

r? @pnkfelix

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

@rust-highfive
Copy link
Contributor

warning Warning warning

  • Pull requests are usually filed against the master branch for this repo, but this one is against beta. Please double check that you specified the right target!

@kennytm kennytm added the S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. label Feb 1, 2018
@Mark-Simulacrum
Copy link
Member

@bors r+ p=10

@bors
Copy link
Collaborator

bors commented Feb 1, 2018

📌 Commit 06e74a9 has been approved by Mark-Simulacrum

@Mark-Simulacrum Mark-Simulacrum 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 Feb 1, 2018
@alexcrichton
Copy link
Member

I'm gonna sneak a Cargo update in here while I can 🔍

@bors: r=Mark-Simulacrum

@bors
Copy link
Collaborator

bors commented Feb 1, 2018

📌 Commit 0a33981 has been approved by Mark-Simulacrum

@bors
Copy link
Collaborator

bors commented Feb 1, 2018

⌛ Testing commit 0a33981 with merge 7ec5e9b...

bors added a commit that referenced this pull request Feb 1, 2018
@bors
Copy link
Collaborator

bors commented Feb 2, 2018

💔 Test failed - status-appveyor

@kennytm
Copy link
Member

kennytm commented Feb 2, 2018

@bors retry #46903

@bors
Copy link
Collaborator

bors commented Feb 2, 2018

⌛ Testing commit 0a33981 with merge f28b58bc2d4a7adda88e0b9e6ca78e529912084c...

@bors
Copy link
Collaborator

bors commented Feb 2, 2018

💔 Test failed - status-appveyor

@alexcrichton
Copy link
Member

@bors retry #46903

@bors
Copy link
Collaborator

bors commented Feb 2, 2018

⌛ Testing commit 0a33981 with merge 6a6b350...

bors added a commit that referenced this pull request Feb 2, 2018
@bors
Copy link
Collaborator

bors commented Feb 2, 2018

☀️ Test successful - status-appveyor, status-travis
Approved by: Mark-Simulacrum
Pushing 6a6b350 to beta...

@bors bors merged commit 0a33981 into rust-lang:beta Feb 2, 2018
@MaloJaffre MaloJaffre deleted the beta-backport branch February 2, 2018 19:39
@MaloJaffre
Copy link
Contributor Author

It seems that beta-nominated tags were not removed for those 7 beta-backported PRs:
https://github.com/rust-lang/rust/pulls?utf8=%E2%9C%93&q=is%3Apr+label%3Abeta-nominated+label%3Abeta-accepted+is%3Aclosed, could somebody with tag permissions do that, please?

@alexcrichton
Copy link
Member

Can do, thanks so much again @MaloJaffre for the help with the backports!

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.

10 participants