Uh oh!
There was an error while loading. Please reload this page.
trans: always use a memcpy for ABI argument/return casts. - #34141
Conversation
rust-highfive
commented
Jun 7, 2016
r? @nrc (rust_highfive has picked a reviewer for you, use r? to override) |
eddyb
commented
Jun 7, 2016
There was a problem hiding this comment.
shouldn't this be lifetime start?
nikomatsakis
commented
Jun 7, 2016
@bors r+ p=1 |
bors
commented
Jun 7, 2016
📌 Commit 2e68f31 has been approved by |
nikomatsakis
commented
Jun 7, 2016
I'm inclined to beta-accept -- thoughts from @rust-lang/compiler team? |
I’m fine with it. My fix wasn’t supposed to be more than a short-term quick-hack anyway (for certain time-pressing reasons like trains rolling over the next day). EDIT: or rather, please do accept it. |
eddyb
commented
Jun 7, 2016
bors
commented
Jun 7, 2016
📌 Commit 0d145c9 has been approved by |
dotdash
commented
Jun 7, 2016
+1 on the backport |
There was a problem hiding this comment.
I think this needs to be self instead of Lifetime::Start?
There was a problem hiding this comment.
I... wrote this twice. It was fine the first time :/.
dotdash
commented
Jun 7, 2016
Yep, that's much closer (not sure if 100% the same) to what I had in mind. Sorry for not getting that done myself earlier and causing some unnecessary churn :-/ That should also be useful for the outstanding transmute fix of mine that's still missing its MIR part. Nice! |
eddyb
commented
Jun 7, 2016
@bors r=nikomatsakis |
bors
commented
Jun 7, 2016
📌 Commit d9f93b9 has been approved by |
bors
commented
Jun 7, 2016
⌛ Testing commit d9f93b9 with merge ab5b316... |
bors
commented
Jun 7, 2016
💔 Test failed - auto-win-gnu-32-opt-rustbuild |
Real failure: Difference: |
eddyb
commented
Jun 7, 2016
@arielb1 Who needs 32-bit anyway /s. |
eddyb
commented
Jun 7, 2016
@bors r=nikomatsakis |
bors
commented
Jun 7, 2016
📌 Commit e252865 has been approved by |
bors
commented
Jun 7, 2016
trans: always use a memcpy for ABI argument/return casts. When storing incoming arguments or values returned by call/invoke, always do a `memcpy` from a temporary of the cast type, if there is an ABI cast. While Clang has gotten smarter ([store](https://godbolt.org/g/EphFuK) vs [memcpy](https://godbolt.org/g/5dikH9)), a `memcpy` will always work. This is what @dotdash has wanted to do all along, and it fixes#32049.
When storing incoming arguments or values returned by call/invoke, always do a
memcpyfrom a temporary of the cast type, if there is an ABI cast.While Clang has gotten smarter (store vs memcpy), a
memcpywill always work.This is what @dotdash has wanted to do all along, and it fixes#32049.