-
Notifications
You must be signed in to change notification settings - Fork 12.9k
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
Try to fix 48116 and 48192 #48209
Merged
Merged
Try to fix 48116 and 48192 #48209
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
1. When the invalid condition is hit, write out the relevant variables too 2. In compile-fail/parse-fail tests, check for ICE first, so the invalid error patterns won't mask our ICE output.
kennytm
added
the
S-waiting-on-review
Status: Awaiting review from the assignee but also interested parties.
label
Feb 14, 2018
@bors: r+ p=100 |
📌 Commit 553f82d has been approved by |
bors
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 14, 2018
@bors: r+ |
📌 Commit 71269a5 has been approved by |
This was referenced Feb 14, 2018
💔 Test failed - status-travis |
bors
added
S-waiting-on-review
Status: Awaiting review from the assignee but also interested parties.
and removed
S-waiting-on-bors
Status: Waiting on bors to run and complete tests. Bors will change the label on completion.
labels
Feb 14, 2018
Removed the `assume()` which we assumed is the cause of misoptimization in issue rust-lang#48116.
This reverts commit 64a8730.
kennytm
force-pushed
the
try-fix-48116
branch
from
February 14, 2018 16:04
71269a5
to
e0da990
Compare
@bors r=alexcrichton |
📌 Commit e0da990 has been approved by |
bors
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 14, 2018
bors
added a commit
that referenced
this pull request
Feb 14, 2018
Try to fix 48116 and 48192 The bug #48116 happens because of a misoptimization of the `import_path_to_string` function, where a `names` slice is empty but the `!names.is_empty()` branch is executed. https://github.com/rust-lang/rust/blob/4d2d3fc5dadf894a8ad709a5860a549f2c0b1032/src/librustc_resolve/resolve_imports.rs#L1015-L1042 Yesterday, @eddyb had locally reproduced the bug, and [came across the `position` function](https://mozilla.logbot.info/rust-infra/20180214#c14296834) where the `assume()` call is found to be suspicious. We have *not* concluded that this `assume()` causes #48116, but given [the reputation of `assume()`](#45501 (comment)), this seems higher relevant. Here we try to see if commenting it out can fix the errors. Later @alexcrichton has bisected and found a potential bug [in the LLVM side](#48116 (comment)). We are currently testing if reverting that LLVM commit is enough to stop the bug. If true, this PR can be reverted (keep the `assume()`) and we could backport the LLVM patch instead. (This PR also includes an earlier commit from #48127 for help debugging ICE happening in compile-fail/parse-fail tests.) The PR also reverts #48059, which seems to cause #48192. r? @alexcrichton cc @eddyb, @arthurprs (#47333)
💔 Test failed - status-appveyor |
bors
added
S-waiting-on-review
Status: Awaiting review from the assignee but also interested parties.
and removed
S-waiting-on-bors
Status: Waiting on bors to run and complete tests. Bors will change the label on completion.
labels
Feb 14, 2018
bors
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 14, 2018
(Manually merged since everything else passed) |
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.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
The bug #48116 happens because of a misoptimization of the
import_path_to_string
function, where anames
slice is empty but the!names.is_empty()
branch is executed.rust/src/librustc_resolve/resolve_imports.rs
Lines 1015 to 1042 in 4d2d3fc
Yesterday, @eddyb had locally reproduced the bug, and came across the
position
function where theassume()
call is found to be suspicious. We have not concluded that thisassume()
causes #48116, but given the reputation ofassume()
, this seems higher relevant. Here we try to see if commenting it out can fix the errors.Later @alexcrichton has bisected and found a potential bug in the LLVM side. We are currently testing if reverting that LLVM commit is enough to stop the bug. If true, this PR can be reverted (keep the
assume()
) and we could backport the LLVM patch instead.(This PR also includes an earlier commit from #48127 for help debugging ICE happening in compile-fail/parse-fail tests.)
The PR also reverts #48059, which seems to cause #48192.
r? @alexcrichton
cc @eddyb, @arthurprs (#47333)