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

Don't count MIR locals as borrowed after StorageDead when finding locals live across a yield terminator #52915

Merged
merged 1 commit into from
Aug 1, 2018

Conversation

Zoxc
Copy link
Contributor

@Zoxc Zoxc commented Jul 31, 2018

This should fix #52792.

r? @eddyb

@rust-highfive rust-highfive added the S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. label Jul 31, 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:03:50] travis_fold:start:tidy
travis_time:start:tidy
tidy check
[00:03:51] tidy error: /checkout/src/test/run-pass/generator/yield-in-initializer.rs: missing trailing newline
[00:03:52] some tidy checks failed
[00:03:52] 
[00:03:52] 
[00:03:52] 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:03:52] 
[00:03:52] 
[00:03:52] failed to run: /checkout/obj/build/bootstrap/debug/bootstrap test src/tools/tidy
[00:03:52] Build completed unsuccessfully in 0:00:46
[00:03:52] Build completed unsuccessfully in 0:00:46
[00:03:52] Makefile:79: recipe for target 'tidy' failed
[00:03:52] make: *** [tidy] Error 1

The command "stamp sh -x -c "$RUN_SCRIPT"" exited with 2.
travis_time:start:02217930
$ date && (curl -fs --head https://google.com | grep ^Date: | sed 's/Date: //g' || true)
---
travis_time:end:0f43e370:start=1533067886158299731,finish=1533067886166570915,duration=8271184
travis_fold:end:after_failure.3
travis_fold:start:after_failure.4
travis_time:start:1006fcc4
$ 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:20dff43f
travis_time:start:20dff43f
$ 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:1cc53908
$ 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)

@eddyb
Copy link
Member

eddyb commented Jul 31, 2018

r=me after fixing tidy

This explains why @cramertj and I couldn't find anything to toggle, we didn't realize this was about borrows outliving the StorageDead. Also cc @RalfJung (whom we discussed this with on IRC).

@Zoxc Zoxc force-pushed the refine-gen-borrow-analysis branch from 3555d48 to 0babbf1 Compare July 31, 2018 20:39
@RalfJung
Copy link
Member

Not sure what you mean by "toggle", but yes -- StorageDead is like "free" for a local, nothing can refer to it any more.

@Zoxc
Copy link
Contributor Author

Zoxc commented Jul 31, 2018

@bors r=eddyb

@bors
Copy link
Contributor

bors commented Jul 31, 2018

📌 Commit 0babbf1 has been approved by eddyb

@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 Jul 31, 2018
@eddyb
Copy link
Member

eddyb commented Jul 31, 2018

Not sure what you mean by "toggle"

Specifically, something to change in the liveness computation that would make a difference.

pietroalbini added a commit to pietroalbini/rust that referenced this pull request Aug 1, 2018
…eddyb

Don't count MIR locals as borrowed after StorageDead when finding locals live across a yield terminator

This should fix rust-lang#52792.

r? @eddyb
bors added a commit that referenced this pull request Aug 1, 2018
Rollup of 15 pull requests

Successful merges:

 - #52793 (Add test for NLL: unexpected "free region `` does not outlive" error )
 - #52799 (Use BitVector for global sets of AttrId)
 - #52809 (Add test for unexpected region for local data ReStatic)
 - #52834 ([NLL] Allow conflicting borrows of promoted length zero arrays)
 - #52835 (Fix Alias intra doc ICE)
 - #52854 (fix memrchr in miri)
 - #52899 (tests/ui: Add missing mips{64} ignores)
 - #52908 (Use SetLenOnDrop in Vec::truncate())
 - #52915 (Don't count MIR locals as borrowed after StorageDead when finding locals live across a yield terminator)
 - #52926 (rustc: Trim down the `rust_2018_idioms` lint group)
 - #52930 (rustc_resolve: record single-segment extern crate import resolutions.)
 - #52939 (Make io::Read::read_to_end consider io::Take::limit)
 - #52942 (Another SmallVec.extend optimization)
 - #52947 (1.27 actually added the `armv5te-unknown-linux-musleabi` target)
 - #52954 (async can begin expressions)

Failed merges:

r? @ghost
@bors bors merged commit 0babbf1 into rust-lang:master Aug 1, 2018
@Zoxc Zoxc deleted the refine-gen-borrow-analysis branch August 6, 2018 21:24
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.

MIR generator compiler panic
5 participants