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

Make -Zdump-mir dump shims #58103

Merged
merged 9 commits into from
Feb 10, 2019
Merged

Make -Zdump-mir dump shims #58103

merged 9 commits into from
Feb 10, 2019

Conversation

RalfJung
Copy link
Member

@RalfJung RalfJung commented Feb 3, 2019

Fixes #53532 by (a) making the MIR shim generation use the MIR pass infrastructure, and (b) fixing said infrastructure to handle the fallout.

Cc @eddyb @oli-obk

@rust-highfive
Copy link
Collaborator

r? @eddyb

(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 Feb 3, 2019
@rust-highfive

This comment has been minimized.

@RalfJung RalfJung changed the title WIP: Make -Zdump-mir dump shims Make -Zdump-mir dump shims Feb 5, 2019
@RalfJung
Copy link
Member Author

RalfJung commented Feb 5, 2019

With some help for @eddyb, this is working now. :)

PR is ready for review.

@eddyb
Copy link
Member

eddyb commented Feb 5, 2019

@bors r+

@bors
Copy link
Contributor

bors commented Feb 5, 2019

📌 Commit 53a4bb193f88a2edabadad32f4bec292b9c0426e 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 Feb 5, 2019
@rust-highfive
Copy link
Collaborator

The job x86_64-gnu-llvm-6.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.
travis_time:end:1c918220:start=1549400438115776704,finish=1549400552148568528,duration=114032791824
$ git checkout -qf FETCH_HEAD
travis_fold:end:git.checkout

Encrypted environment variables have been removed for security reasons.
See https://docs.travis-ci.com/user/pull-requests/#pull-requests-and-security-restrictions
$ export SCCACHE_BUCKET=rust-lang-ci-sccache2
$ export SCCACHE_REGION=us-west-1
Setting environment variables from .travis.yml
$ export IMAGE=x86_64-gnu-llvm-6.0
---
Check compiletest suite=mir-opt mode=mir-opt (x86_64-unknown-linux-gnu -> x86_64-unknown-linux-gnu)
[01:09:20] 
[01:09:20] running 38 tests
[01:09:39] thread 'main' panicked at 'Some tests failed', src/tools/compiletest/src/main.rs:502:22
[01:09:39] .........F.F...............F..........
[01:09:39] 
[01:09:39] ---- [mir-opt] mir-opt/inline-closure-borrows-arg.rs stdout ----
[01:09:39] 
[01:09:39] error: compilation failed!
[01:09:39] error: compilation failed!
[01:09:39] status: exit code: 101
[01:09:39] command: "/checkout/obj/build/x86_64-unknown-linux-gnu/stage2/bin/rustc" "/checkout/src/test/mir-opt/inline-closure-borrows-arg.rs" "-Zthreads=1" "--target=x86_64-unknown-linux-gnu" "-Zdump-mir=all" "-Zmir-opt-level=3" "-Zdump-mir-exclude-pass-number" "-Zdump-mir-dir=/checkout/obj/build/x86_64-unknown-linux-gnu/test/mir-opt/inline-closure-borrows-arg" "-C" "prefer-dynamic" "-o" "/checkout/obj/build/x86_64-unknown-linux-gnu/test/mir-opt/inline-closure-borrows-arg/a" "-Crpath" "-O" "-Zunstable-options" "-Lnative=/checkout/obj/build/x86_64-unknown-linux-gnu/native/rust-test-helpers" "-Z" "span_free_formats" "-L" "/checkout/obj/build/x86_64-unknown-linux-gnu/test/mir-opt/inline-closure-borrows-arg/auxiliary"
[01:09:39] ------------------------------------------
[01:09:39] 
[01:09:39] ------------------------------------------
[01:09:39] stderr:
---
[01:09:39] note: we would appreciate a bug report: https://github.com/rust-lang/rust/blob/master/CONTRIBUTING.md#bug-reports
[01:09:39] 
[01:09:39] note: rustc 1.34.0-dev running on x86_64-unknown-linux-gnu
[01:09:39] 
[01:09:39] note: compiler flags: -Z threads=1 -Z dump-mir=all -Z mir-opt-level=3 -Z dump-mir-exclude-pass-number -Z dump-mir-dir=/checkout/obj/build/x86_64-unknown-linux-gnu/test/mir-opt/inline-closure-borrows-arg -Z unstable-options -Z span_free_formats -C prefer-dynamic -C rpath
[01:09:39] 
[01:09:39] ------------------------------------------
[01:09:39] 
[01:09:39] thread '[mir-opt] mir-opt/inline-closure-borrows-arg.rs' panicked at 'explicit panic', src/tools/compiletest/src/runtest.rs:3295:9
[01:09:39] thread '[mir-opt] mir-opt/inline-closure-borrows-arg.rs' panicked at 'explicit panic', src/tools/compiletest/src/runtest.rs:3295:9
[01:09:39] note: Run with `RUST_BACKTRACE=1` environment variable to display a backtrace.
[01:09:39] 
[01:09:39] ---- [mir-opt] mir-opt/inline-closure.rs stdout ----
[01:09:39] 
[01:09:39] error: compilation failed!
[01:09:39] status: exit code: 101
[01:09:39] command: "/checkout/obj/build/x86_64-unknown-linux-gnu/stage2/bin/rustc" "/checkout/src/test/mir-opt/inline-closure.rs" "-Zthreads=1" "--target=x86_64-unknown-linux-gnu" "-Zdump-mir=all" "-Zmir-opt-level=3" "-Zdump-mir-exclude-pass-number" "-Zdump-mir-dir=/checkout/obj/build/x86_64-unknown-linux-gnu/test/mir-opt/inline-closure" "-C" "prefer-dynamic" "-o" "/checkout/obj/build/x86_64-unknown-linux-gnu/test/mir-opt/inline-closure/a" "-Crpath" "-O" "-Zunstable-options" "-Lnative=/checkout/obj/build/x86_64-unknown-linux-gnu/native/rust-test-helpers" "-Z" "span_free_formats" "-L" "/checkout/obj/build/x86_64-unknown-linux-gnu/test/mir-opt/inline-closure/auxiliary"
[01:09:39] ------------------------------------------
[01:09:39] 
[01:09:39] ------------------------------------------
[01:09:39] stderr:
---
[01:09:39] note: we would appreciate a bug report: https://github.com/rust-lang/rust/blob/master/CONTRIBUTING.md#bug-reports
[01:09:39] 
[01:09:39] note: rustc 1.34.0-dev running on x86_64-unknown-linux-gnu
[01:09:39] 
[01:09:39] note: compiler flags: -Z threads=1 -Z dump-mir=all -Z mir-opt-level=3 -Z dump-mir-exclude-pass-number -Z dump-mir-dir=/checkout/obj/build/x86_64-unknown-linux-gnu/test/mir-opt/inline-closure -Z unstable-options -Z span_free_formats -C prefer-dynamic -C rpath
[01:09:39] 
[01:09:39] ------------------------------------------
[01:09:39] 
[01:09:39] thread '[mir-opt] mir-opt/inline-closure.rs' panicked at 'explicit panic', src/tools/compiletest/src/runtest.rs:3295:9
[01:09:39] thread '[mir-opt] mir-opt/inline-closure.rs' panicked at 'explicit panic', src/tools/compiletest/src/runtest.rs:3295:9
[01:09:39] 
[01:09:39] ---- [mir-opt] mir-opt/retag.rs stdout ----
[01:09:39] 
[01:09:39] error: compilation failed!
[01:09:39] status: exit code: 101
[01:09:39] command: "/checkout/obj/build/x86_64-unknown-linux-gnu/stage2/bin/rustc" "/checkout/src/test/mir-opt/retag.rs" "-Zthreads=1" "--target=x86_64-unknown-linux-gnu" "-Zdump-mir=all" "-Zmir-opt-level=3" "-Zdump-mir-exclude-pass-number" "-Zdump-mir-dir=/checkout/obj/build/x86_64-unknown-linux-gnu/test/mir-opt/retag" "-C" "prefer-dynamic" "-o" "/checkout/obj/build/x86_64-unknown-linux-gnu/test/mir-opt/retag/a" "-Crpath" "-O" "-Zunstable-options" "-Lnative=/checkout/obj/build/x86_64-unknown-linux-gnu/native/rust-test-helpers" "-Z" "mir-emit-retag" "-Z" "mir-opt-level=0" "-Z" "span_free_formats" "-L" "/checkout/obj/build/x86_64-unknown-linux-gnu/test/mir-opt/retag/auxiliary"
[01:09:39] ------------------------------------------
[01:09:39] 
[01:09:39] ------------------------------------------
[01:09:39] stderr:
---
[01:09:39] note: we would appreciate a bug report: https://github.com/rust-lang/rust/blob/master/CONTRIBUTING.md#bug-reports
[01:09:39] 
[01:09:39] note: rustc 1.34.0-dev running on x86_64-unknown-linux-gnu
[01:09:39] 
[01:09:39] note: compiler flags: -Z threads=1 -Z dump-mir=all -Z mir-opt-level=3 -Z dump-mir-exclude-pass-number -Z dump-mir-dir=/checkout/obj/build/x86_64-unknown-linux-gnu/test/mir-opt/retag -Z unstable-options -Z mir-emit-retag -Z mir-opt-level=0 -Z span_free_formats -C prefer-dynamic -C rpath
[01:09:39] 
[01:09:39] ------------------------------------------
[01:09:39] 
[01:09:39] thread '[mir-opt] mir-opt/retag.rs' panicked at 'explicit panic', src/tools/compiletest/src/runtest.rs:3295:9
---
[01:09:39] test result: FAILED. 35 passed; 3 failed; 0 ignored; 0 measured; 0 filtered out
[01:09:39] 
[01:09:39] 
[01:09:39] 
[01:09:39] command did not execute successfully: "/checkout/obj/build/x86_64-unknown-linux-gnu/stage0-tools-bin/compiletest" "--compile-lib-path" "/checkout/obj/build/x86_64-unknown-linux-gnu/stage2/lib" "--run-lib-path" "/checkout/obj/build/x86_64-unknown-linux-gnu/stage2/lib/rustlib/x86_64-unknown-linux-gnu/lib" "--rustc-path" "/checkout/obj/build/x86_64-unknown-linux-gnu/stage2/bin/rustc" "--src-base" "/checkout/src/test/mir-opt" "--build-base" "/checkout/obj/build/x86_64-unknown-linux-gnu/test/mir-opt" "--stage-id" "stage2-x86_64-unknown-linux-gnu" "--mode" "mir-opt" "--target" "x86_64-unknown-linux-gnu" "--host" "x86_64-unknown-linux-gnu" "--llvm-filecheck" "/usr/lib/llvm-6.0/bin/FileCheck" "--host-rustcflags" "-Crpath -O -Zunstable-options  -Lnative=/checkout/obj/build/x86_64-unknown-linux-gnu/native/rust-test-helpers" "--target-rustcflags" "-Crpath -O -Zunstable-options  -Lnative=/checkout/obj/build/x86_64-unknown-linux-gnu/native/rust-test-helpers" "--docck-python" "/usr/bin/python2.7" "--lldb-python" "/usr/bin/python2.7" "--gdb" "/usr/bin/gdb" "--quiet" "--llvm-version" "6.0.0\n" "--system-llvm" "--cc" "" "--cxx" "" "--cflags" "" "--llvm-components" "" "--llvm-cxxflags" "" "--adb-path" "adb" "--adb-test-dir" "/data/tmp/work" "--android-cross-path" "" "--color" "always"
[01:09:39] 
[01:09:39] 
[01:09:39] failed to run: /checkout/obj/build/bootstrap/debug/bootstrap test
[01:09:39] Build completed unsuccessfully in 0:11:30
[01:09:39] Build completed unsuccessfully in 0:11:30
[01:09:39] make: *** [check] Error 1
[01:09:39] Makefile:48: recipe for target 'check' failed
The command "stamp sh -x -c "$RUN_SCRIPT"" exited with 2.
travis_time:start:0617ac48
$ date && (curl -fs --head https://google.com | grep ^Date: | sed 's/Date: //g' || true)
Tue Feb  5 22:12:20 UTC 2019
---
travis_time:end:23549ac0:start=1549404741764474738,finish=1549404741769243653,duration=4768915
travis_fold:end:after_failure.3
travis_fold:start:after_failure.4
travis_time:start:178a6a70
$ 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 --batch -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:00012129
travis_time:start:00012129
$ 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:0a907da0
$ 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)

@RalfJung
Copy link
Member Author

RalfJung commented Feb 5, 2019

@bors r-

investigating

@bors bors added S-waiting-on-author Status: This is awaiting some action (such as code changes or more information) from the author. and removed S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. labels Feb 5, 2019
@eddyb
Copy link
Member

eddyb commented Feb 5, 2019

@bors r+

@bors
Copy link
Contributor

bors commented Feb 5, 2019

📌 Commit 26df5bd39993c0e43441a83329be705299d4197d 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-author Status: This is awaiting some action (such as code changes or more information) from the author. labels Feb 5, 2019
@bors
Copy link
Contributor

bors commented Feb 9, 2019

☔ The latest upstream changes (presumably #58316) made this pull request unmergeable. Please resolve the merge conflicts.

@bors bors added S-waiting-on-author Status: This is awaiting some action (such as code changes or more information) from the author. and removed S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. labels Feb 9, 2019
@RalfJung
Copy link
Member Author

RalfJung commented Feb 9, 2019

Rebased.

@bors r=eddyb

@bors
Copy link
Contributor

bors commented Feb 9, 2019

📌 Commit 544b3a1 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-author Status: This is awaiting some action (such as code changes or more information) from the author. labels Feb 9, 2019
@bors
Copy link
Contributor

bors commented Feb 10, 2019

⌛ Testing commit 544b3a1 with merge de111e6...

bors added a commit that referenced this pull request Feb 10, 2019
Make -Zdump-mir dump shims

Fixes #53532 by (a) making the MIR shim generation use the MIR pass infrastructure, and (b) fixing said infrastructure to handle the fallout.

Cc @eddyb @oli-obk
@bors
Copy link
Contributor

bors commented Feb 10, 2019

☀️ Test successful - checks-travis, status-appveyor
Approved by: eddyb
Pushing de111e6 to master...

@bors bors added the merged-by-bors This PR was explicitly merged by bors. label Feb 10, 2019
@bors bors merged commit 544b3a1 into rust-lang:master Feb 10, 2019
@RalfJung RalfJung deleted the mir-shim-dump branch February 17, 2019 11:06
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
merged-by-bors This PR was explicitly merged by bors. 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.

-Zdump-mir does not dump all the MIR: drop glue missing
4 participants