Uh oh!
There was an error while loading. Please reload this page.
Fix ICE: inject bitcast if types mismatch for invokes/calls/stores - #37112
Conversation
rust-highfive
commented
Oct 12, 2016
r? @Aatch (rust_highfive has picked a reviewer for you, use r? to override) |
pnkfelix
commented
Oct 12, 2016
(oh I forgot a regression test; will put into followup commit.) |
So I just realized that this fix as originally written only handles the case of calls, which does fix the specific report of #36744 but does not address the other cases that @arielb1 pointed out here: #36744 (comment) I'm looking into generalizing it slightly now to deal with more of those. Ideally we would handle the following cases (I will check off the ones that the PR handles as I go):
|
pnkfelix
commented
Oct 12, 2016
While working on this PR, I realized that one flaw in this strategy is that you can not apply the LLVM |
pnkfelix
commented
Oct 13, 2016
pnkfelix
commented
Oct 13, 2016
FYI @arielb1 mentioned over IRC discussion that he would prefer a more targeted fix oriented around changes to MIR-trans. |
pnkfelix
commented
Oct 17, 2016
We should decide whether we are going to land this patch or not. my opinion is that we should put this PR in. It solves the bulk of the occurrences of this problem (see above comment), and guards against adding the bitcast when it is unneeded by first checking if the types already match. |
Sure. My patch turned out to be more complicated than it seems. @bors r+ |
bors
commented
Oct 17, 2016
📌 Commit 0562654 has been approved by |
bors
commented
Oct 17, 2016
💡 This pull request was already approved, no need to approve it again.
|
bors
commented
Oct 17, 2016
📌 Commit 0562654 has been approved by |
Fix ICE: inject bitcast if types mismatch for invokes/calls/stores Fix ICE: inject bitcast if types mismatch for invokes/calls Fix#36744
bors
commented
Oct 17, 2016
⌛ Testing commit 0562654 with merge ce31626... |
| fn check_call(typ: &str, llfn: ValueRef, args: &[ValueRef]) { | ||
| if cfg!(debug_assertions) { | ||
| fn check_call<'b>(&self, |
There was a problem hiding this comment.
I think a comment here would be nice-- what is this Cow that is being returned?
nikomatsakis
commented
Oct 17, 2016
(Oh, I see @arielb1 already r+'d. Seems fine.) |
bors
commented
Oct 17, 2016
nikomatsakis
commented
Oct 18, 2016
Accepting for beta. Low risk patch, regression. cc @rust-lang/compiler |
Fix ICE: inject bitcast if types mismatch for invokes/calls
Partial fix for #36744