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

fix NLL ICEs #53580

Merged
merged 3 commits into from
Aug 27, 2018
Merged

fix NLL ICEs #53580

merged 3 commits into from
Aug 27, 2018

Conversation

nikomatsakis
Copy link
Contributor

@nikomatsakis nikomatsakis commented Aug 21, 2018

Custom type-ops reuse some of the query machinery -- but while query results are canonicalized after they are constructed, custom type ops are not, and hence we have to resolve the type variables to avoid an ICE here.

Also, use the type-op machinery for implied outlives bounds.

Fixes #53568
Fixes #52992
Fixes #53680

@rust-highfive
Copy link
Collaborator

r? @cramertj

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

@rust-highfive rust-highfive added the S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. label Aug 21, 2018
@nikomatsakis
Copy link
Contributor Author

r? @pnkfelix

@rust-highfive rust-highfive assigned pnkfelix and unassigned cramertj Aug 21, 2018
@rust-highfive
Copy link
Collaborator

The job x86_64-gnu-llvm-5.0 of your PR failed on Travis (raw log). Through arcane magic we have determined that the following fragments from the build log may contain information about the problem.

Click to expand the log.
[00:05:02] tidy error: /checkout/src/test/ui/issue-53568.rs:12: trailing whitespace
[00:05:03] some tidy checks failed
[00:05:03] 
[00:05:03] 
[00:05:03] command did not execute successfully: "/checkout/obj/build/x86_64-unknown-linux-gnu/stage0-tools-bin/tidy" "/checkout/src" "/checkout/obj/build/x86_64-unknown-linux-gnu/stage0/bin/cargo" "--no-vendor" "--quiet"
[00:05:03] 
[00:05:03] 
[00:05:03] failed to run: /checkout/obj/build/bootstrap/debug/bootstrap test src/tools/tidy
[00:05:03] Build completed unsuccessfully in 0:00:52
[00:05:03] Build completed unsuccessfully in 0:00:52
[00:05:03] Makefile:79: recipe for target 'tidy' failed
[00:05:03] make: *** [tidy] Error 1

The command "stamp sh -x -c "$RUN_SCRIPT"" exited with 2.
travis_time:start:007cca7c
$ date && (curl -fs --head https://google.com | grep ^Date: | sed 's/Date: //g' || true)
---
travis_time:end:2090fa54:start=1534894487850192463,finish=1534894487856688571,duration=6496108
travis_fold:end:after_failure.3
travis_fold:start:after_failure.4
travis_time:start:00956d2a
$ ln -s . checkout && for CORE in obj/cores/core.*; do EXE=$(echo $CORE | sed 's|obj/cores/core\.[0-9]*\.!checkout!\(.*\)|\1|;y|!|/|'); if [ -f "$EXE" ]; then printf travis_fold":start:crashlog\n\033[31;1m%s\033[0m\n" "$CORE"; gdb -q -c "$CORE" "$EXE" -iex 'set auto-load off' -iex 'dir src/' -iex 'set sysroot .' -ex bt -ex q; echo travis_fold":"end:crashlog; fi; done || true
travis_fold:end:after_failure.4
travis_fold:start:after_failure.5
travis_time:start:009958de
travis_time:start:009958de
$ cat ./obj/build/x86_64-unknown-linux-gnu/native/asan/build/lib/asan/clang_rt.asan-dynamic-i386.vers || true
cat: ./obj/build/x86_64-unknown-linux-gnu/native/asan/build/lib/asan/clang_rt.asan-dynamic-i386.vers: No such file or directory
travis_fold:end:after_failure.5
travis_fold:start:after_failure.6
travis_time:start:191c7944
$ dmesg | grep -i kill

I'm a bot! I can only do what humans tell me to, so if this was not helpful or you have suggestions for improvements, please ping or otherwise contact @TimNN. (Feature Requests)

@nikomatsakis nikomatsakis changed the title refresh type variables in custom type-ops [WIP] hunt some ICEs Aug 22, 2018
@nikomatsakis
Copy link
Contributor Author

I marked this as WIP because:

@rust-highfive
Copy link
Collaborator

The job x86_64-gnu-llvm-5.0 of your PR failed on Travis (raw log). Through arcane magic we have determined that the following fragments from the build log may contain information about the problem.

Click to expand the log.
[00:45:38] ....................................................................................................
[00:45:40] ...................................................................................................i
[00:45:43] ...................................................................i................................
[00:45:46] ....................................................................................................
[00:45:49] .....................................F.F............................................................
[00:45:54] ....................................................................................................
[00:45:58] ....................................................................................................
[00:46:00] ....................................................................................................
[00:46:03] ....................................................................................................

I'm a bot! I can only do what humans tell me to, so if this was not helpful or you have suggestions for improvements, please ping or otherwise contact @TimNN. (Feature Requests)

@nikomatsakis
Copy link
Contributor Author

@TimNN jfyi, the output extracted was less than helpful :)

[00:45:38] ....................................................................................................
[00:45:40] ...................................................................................................i
[00:45:43] ...................................................................i................................
[00:45:46] ....................................................................................................
[00:45:49] .....................................F.F............................................................
[00:45:54] ....................................................................................................
[00:45:58] ....................................................................................................
[00:46:00] ....................................................................................................
[00:46:03] ....................................................................................................

No clue why...

@nikomatsakis
Copy link
Contributor Author

@TimNN

No clue why...

the problem turned out to be that this was a case of UI tests that were supposed to fail...not failing. (Because I was missing a // compile-pass annotation.)

@nikomatsakis nikomatsakis changed the title [WIP] hunt some ICEs fix NLL ICEs Aug 23, 2018
@nikomatsakis
Copy link
Contributor Author

OK, I've changed my mind. I think this PR is ready to land. I would still like to do some refactoring -- in particular, I am not happy with the way that the trait queries + type-op setup is so distinct, but I think that is best left to a separate PR.

@illicitonion
Copy link

I was about to file a dupe of #53680 and have verified that this PR fixes my ICE - thanks for putting it together!

@pnkfelix
Copy link
Member

@bors r+

@bors
Copy link
Contributor

bors commented Aug 27, 2018

📌 Commit a59584a has been approved by pnkfelix

@bors 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 Aug 27, 2018
@bors
Copy link
Contributor

bors commented Aug 27, 2018

⌛ Testing commit a59584a with merge 8785e34...

bors added a commit that referenced this pull request Aug 27, 2018
fix NLL ICEs

Custom type-ops reuse some of the query machinery -- but while query results are canonicalized after they are constructed, custom type ops are not, and hence we have to resolve the type variables to avoid an ICE here.

Also, use the type-op machinery for implied outlives bounds.

Fixes #53568
Fixes #52992
Fixes #53680
@bors
Copy link
Contributor

bors commented Aug 27, 2018

☀️ Test successful - status-appveyor, status-travis
Approved by: pnkfelix
Pushing 8785e34 to master...

@bors bors merged commit a59584a into rust-lang:master Aug 27, 2018
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
6 participants