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 #[track_caller] and function pointers #68302

Merged
merged 4 commits into from Jan 21, 2020
Merged

Fix #[track_caller] and function pointers #68302

merged 4 commits into from Jan 21, 2020

Conversation

@anp
Copy link
Member

anp commented Jan 17, 2020

Starting with failing tests, fix the miscompilation and ICE caused by ReifyShim bug.

Fixes #68178.

@rust-highfive

This comment has been minimized.

Copy link
Collaborator

rust-highfive commented Jan 17, 2020

r? @alexcrichton

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

@rust-highfive

This comment has been minimized.

Copy link
Collaborator

rust-highfive commented Jan 17, 2020

The job x86_64-gnu-llvm-7 of your PR failed (pretty log, 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.
2020-01-17T03:24:29.3470860Z ========================== Starting Command Output ===========================
2020-01-17T03:24:29.3474602Z [command]/bin/bash --noprofile --norc /home/vsts/work/_temp/0afaeaa8-d13f-4ab5-bb04-bfbd284d433f.sh
2020-01-17T03:24:29.3474792Z 
2020-01-17T03:24:29.3491783Z ##[section]Finishing: Disable git automatic line ending conversion
2020-01-17T03:24:29.3509793Z ##[section]Starting: Checkout rust-lang/rust@refs/pull/68302/merge to s
2020-01-17T03:24:29.3511825Z Task         : Get sources
2020-01-17T03:24:29.3511861Z Description  : Get sources from a repository. Supports Git, TfsVC, and SVN repositories.
2020-01-17T03:24:29.3511896Z Version      : 1.0.0
2020-01-17T03:24:29.3511980Z Author       : Microsoft
---
2020-01-17T03:24:30.2318417Z ##[command]git remote add origin https://github.com/rust-lang/rust
2020-01-17T03:24:30.2444991Z ##[command]git config gc.auto 0
2020-01-17T03:24:30.2536302Z ##[command]git config --get-all http.https://github.com/rust-lang/rust.extraheader
2020-01-17T03:24:30.2591301Z ##[command]git config --get-all http.proxy
2020-01-17T03:24:30.2755760Z ##[command]git -c http.extraheader="AUTHORIZATION: basic ***" fetch --force --tags --prune --progress --no-recurse-submodules --depth=2 origin +refs/heads/*:refs/remotes/origin/* +refs/pull/68302/merge:refs/remotes/pull/68302/merge
---
2020-01-17T04:21:42.6595860Z .................................................................................................... 1700/9526
2020-01-17T04:21:51.1676543Z .................................................................................................... 1800/9526
2020-01-17T04:22:01.0135974Z ...........i........................................................................................ 1900/9526
2020-01-17T04:22:08.2349293Z .................................................................................................... 2000/9526
2020-01-17T04:22:25.0624695Z .iiiii.............................................................................................. 2100/9526
2020-01-17T04:22:34.0105991Z .................................................................................................... 2300/9526
2020-01-17T04:22:36.5312800Z .................................................................................................... 2400/9526
2020-01-17T04:22:42.3720139Z .................................................................................................... 2500/9526
2020-01-17T04:23:03.6205561Z .................................................................................................... 2600/9526
---
2020-01-17T04:25:49.5458947Z ............................................i...............i....................................... 4900/9526
2020-01-17T04:25:58.7579913Z .................................................................................................... 5000/9526
2020-01-17T04:26:05.8787627Z .......................................................................................i............ 5100/9526
2020-01-17T04:26:11.1694837Z .................................................................................................... 5200/9526
2020-01-17T04:26:22.3327689Z ...........................................................ii.ii...........i........................ 5300/9526
2020-01-17T04:26:31.9461754Z .................................................................................................... 5500/9526
2020-01-17T04:26:42.4078901Z .................................................................................................... 5600/9526
2020-01-17T04:26:49.0331023Z ............................................i....................................................... 5700/9526
2020-01-17T04:26:56.1790142Z .................................................................................................... 5800/9526
2020-01-17T04:26:56.1790142Z .................................................................................................... 5800/9526
2020-01-17T04:27:07.0813185Z .................................................................................................... 5900/9526
2020-01-17T04:27:16.6350363Z ...................................ii...i..ii...........i........................................... 6000/9526
2020-01-17T04:27:36.5118377Z .................................................................................................... 6200/9526
2020-01-17T04:27:44.8368194Z .................................................................................................... 6300/9526
2020-01-17T04:27:44.8368194Z .................................................................................................... 6300/9526
2020-01-17T04:27:55.2754741Z ...............................................................i..ii................................ 6400/9526
2020-01-17T04:28:24.9504475Z .................................................................................................... 6600/9526
2020-01-17T04:28:27.2841271Z .......................................i............................................................ 6700/9526
2020-01-17T04:28:29.4891220Z .................................................................................................... 6800/9526
2020-01-17T04:28:32.1053727Z .......................................i............................................................ 6900/9526
---
2020-01-17T04:30:13.8053101Z .................................................................................................... 7500/9526
2020-01-17T04:30:18.4428347Z .................................................................................................... 7600/9526
2020-01-17T04:30:25.0016885Z ...............................................................................................F.... 7700/9526
2020-01-17T04:30:31.9396737Z .................................................................................................... 7800/9526
2020-01-17T04:30:42.6683195Z ..........................................................................................iiii...... 7900/9526
2020-01-17T04:31:00.0364971Z ........................i......i.................................................................... 8100/9526
2020-01-17T04:31:05.1018338Z .................................................................................................... 8200/9526
2020-01-17T04:31:18.2921458Z .................................................................................................... 8300/9526
2020-01-17T04:31:30.0250318Z .................................................................................................... 8400/9526
---
2020-01-17T04:33:35.7361050Z ---- [ui] ui/rfc-2091-track-caller/tracked-fn-ptr.rs stdout ----
2020-01-17T04:33:35.7361090Z 
2020-01-17T04:33:35.7361337Z error: test compilation failed although it shouldn't!
2020-01-17T04:33:35.7361408Z status: exit code: 101
2020-01-17T04:33:35.7362427Z command: "/checkout/obj/build/x86_64-unknown-linux-gnu/stage2/bin/rustc" "/checkout/src/test/ui/rfc-2091-track-caller/tracked-fn-ptr.rs" "-Zthreads=1" "--target=x86_64-unknown-linux-gnu" "--error-format" "json" "-Zui-testing" "-Zdeduplicate-diagnostics=no" "-C" "prefer-dynamic" "-o" "/checkout/obj/build/x86_64-unknown-linux-gnu/test/ui/rfc-2091-track-caller/tracked-fn-ptr/a" "-Crpath" "-O" "-Cdebuginfo=0" "-Zunstable-options" "-Lnative=/checkout/obj/build/x86_64-unknown-linux-gnu/native/rust-test-helpers" "-L" "/checkout/obj/build/x86_64-unknown-linux-gnu/test/ui/rfc-2091-track-caller/tracked-fn-ptr/auxiliary"
2020-01-17T04:33:35.7362935Z ------------------------------------------
2020-01-17T04:33:35.7362973Z 
2020-01-17T04:33:35.7363213Z ------------------------------------------
2020-01-17T04:33:35.7363259Z stderr:
---
2020-01-17T04:33:35.7364771Z error: internal compiler error: unexpected panic
2020-01-17T04:33:35.7364815Z 
2020-01-17T04:33:35.7364983Z note: the compiler unexpectedly panicked. this is a bug.
2020-01-17T04:33:35.7365041Z 
2020-01-17T04:33:35.7365543Z note: we would appreciate a bug report: ***/blob/master/CONTRIBUTING.md#bug-reports
2020-01-17T04:33:35.7365707Z 
2020-01-17T04:33:35.7366626Z note: rustc 1.42.0-nightly (f52a3b494 2020-01-17) running on x86_64-unknown-linux-gnu
2020-01-17T04:33:35.7366824Z 
2020-01-17T04:33:35.7367293Z note: compiler flags: -Z threads=1 -Z ui-testing -Z deduplicate-diagnostics=no -Z unstable-options -C prefer-dynamic -C rpath -C debuginfo=0
2020-01-17T04:33:35.7367593Z 
2020-01-17T04:33:35.7367947Z ------------------------------------------
2020-01-17T04:33:35.7368095Z 
2020-01-17T04:33:35.7368227Z 
---
2020-01-17T04:33:35.7390162Z thread 'main' panicked at 'Some tests failed', src/tools/compiletest/src/main.rs:387:22
2020-01-17T04:33:35.7390408Z note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace
2020-01-17T04:33:35.7404753Z 
2020-01-17T04:33:35.7404850Z 
2020-01-17T04:33:35.7409864Z command did not execute successfully: "/checkout/obj/build/x86_64-unknown-linux-gnu/stage0-tools-bin/compiletest" "/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/ui" "--build-base" "/checkout/obj/build/x86_64-unknown-linux-gnu/test/ui" "--stage-id" "stage2-x86_64-unknown-linux-gnu" "--mode" "ui" "--target" "x86_64-unknown-linux-gnu" "--host" "x86_64-unknown-linux-gnu" "--llvm-filecheck" "/usr/lib/llvm-7/bin/FileCheck" "--host-rustcflags" "-Crpath -O -Cdebuginfo=0 -Zunstable-options  -Lnative=/checkout/obj/build/x86_64-unknown-linux-gnu/native/rust-test-helpers" "--target-rustcflags" "-Crpath -O -Cdebuginfo=0 -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" "7.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"
2020-01-17T04:33:35.7410389Z 
2020-01-17T04:33:35.7410443Z 
2020-01-17T04:33:35.7423536Z failed to run: /checkout/obj/build/bootstrap/debug/bootstrap test
2020-01-17T04:33:35.7423608Z Build completed unsuccessfully in 1:03:27
2020-01-17T04:33:35.7423608Z Build completed unsuccessfully in 1:03:27
2020-01-17T04:33:35.7490750Z == clock drift check ==
2020-01-17T04:33:35.7507990Z   local time: Fri Jan 17 04:33:35 UTC 2020
2020-01-17T04:33:35.8492098Z   network time: Fri, 17 Jan 2020 04:33:35 GMT
2020-01-17T04:33:35.8492479Z == end clock drift check ==
2020-01-17T04:33:36.3079798Z 
2020-01-17T04:33:36.3183376Z ##[error]Bash exited with code '1'.
2020-01-17T04:33:36.3196686Z ##[section]Finishing: Run build
2020-01-17T04:33:36.3232336Z ##[section]Starting: Checkout rust-lang/rust@refs/pull/68302/merge to s
2020-01-17T04:33:36.3234330Z Task         : Get sources
2020-01-17T04:33:36.3234376Z Description  : Get sources from a repository. Supports Git, TfsVC, and SVN repositories.
2020-01-17T04:33:36.3234436Z Version      : 1.0.0
2020-01-17T04:33:36.3234477Z Author       : Microsoft
2020-01-17T04:33:36.3234477Z Author       : Microsoft
2020-01-17T04:33:36.3234522Z Help         : [More Information](https://go.microsoft.com/fwlink/?LinkId=798199)
2020-01-17T04:33:36.3234603Z ==============================================================================
2020-01-17T04:33:36.7815076Z Cleaning any cached credential from repository: rust-lang/rust (GitHub)
2020-01-17T04:33:36.7854442Z ##[section]Finishing: Checkout rust-lang/rust@refs/pull/68302/merge to s
2020-01-17T04:33:36.7977901Z Cleaning up task key
2020-01-17T04:33:36.7978667Z Start cleaning up orphan processes.
2020-01-17T04:33:36.8100490Z Terminate orphan process: pid (3543) (python)
2020-01-17T04:33:36.8336975Z ##[section]Finishing: Finalize Job

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)

@Centril

This comment has been minimized.

Copy link
Member

Centril commented Jan 17, 2020

r? @eddyb

@rust-highfive rust-highfive assigned eddyb and unassigned alexcrichton Jan 17, 2020
@anp anp marked this pull request as ready for review Jan 19, 2020
@anp anp force-pushed the anp:caller-fn-ptr branch from 214efcc to 72dffac Jan 19, 2020
@anp

This comment has been minimized.

Copy link
Member Author

anp commented Jan 19, 2020

@eddyb thanks for the help with ReifyShim! Both of the bugs surfaced by @RalfJung have repro cases that pass for me now. Will see what CI says, can you do a quick review?

@eddyb
eddyb approved these changes Jan 19, 2020
Copy link
Member

eddyb left a comment

r=me after someone else reviews my commit (e.g. @oli-obk or @RalfJung)

@RalfJung

This comment has been minimized.

Copy link
Member

RalfJung commented Jan 20, 2020

Great, these will be interesting test-cases for Miri :D (and I might need help to implement the shim in Miri)

I can't help with review though I'm afraid, I don't think I ever saw any of the involved code.

@oli-obk

This comment has been minimized.

Copy link
Contributor

oli-obk commented Jan 20, 2020

@bors r=eddyb,oli-obk

@bors

This comment has been minimized.

Copy link
Contributor

bors commented Jan 20, 2020

📌 Commit 72dffac has been approved by eddyb,oli-obk

Dylan-DPC added a commit to Dylan-DPC/rust that referenced this pull request Jan 20, 2020
Fix #[track_caller] and function pointers

Starting with failing tests, fix the miscompilation and ICE caused by `ReifyShim` bug.

Fixes rust-lang#68178.
bors added a commit that referenced this pull request Jan 20, 2020
Rollup of 4 pull requests

Successful merges:

 - #68302 (Fix #[track_caller] and function pointers)
 - #68334 (AArch64 bare-metal targets: Build rust-std)
 - #68339 (Add `riscv64gc-unknown-linux-gnu` into target list in build-manifest)
 - #68381 (Added minor clarification to specification of GlobalAlloc::realloc.)

Failed merges:

r? @ghost
JohnTitor added a commit to JohnTitor/rust that referenced this pull request Jan 20, 2020
Fix #[track_caller] and function pointers

Starting with failing tests, fix the miscompilation and ICE caused by `ReifyShim` bug.

Fixes rust-lang#68178.
bors added a commit that referenced this pull request Jan 20, 2020
Rollup of 8 pull requests

Successful merges:

 - #67734 (Remove appendix from Apache license)
 - #67795 (Cleanup formatting code)
 - #68290 (Fix some tests failing in `--pass check` mode)
 - #68297 ( Filter and test predicates using `normalize_and_test_predicates` for const-prop)
 - #68302 (Fix #[track_caller] and function pointers)
 - #68339 (Add `riscv64gc-unknown-linux-gnu` into target list in build-manifest)
 - #68381 (Added minor clarification to specification of GlobalAlloc::realloc.)
 - #68397 (rustdoc: Correct order of `async` and `unsafe` in `async unsafe fn`s)

Failed merges:

r? @ghost
@bors bors merged commit 72dffac into rust-lang:master Jan 21, 2020
4 checks passed
4 checks passed
pr Build #20200119.41 succeeded
Details
pr (Linux mingw-check) Linux mingw-check succeeded
Details
pr (Linux x86_64-gnu-llvm-7) Linux x86_64-gnu-llvm-7 succeeded
Details
pr (Linux x86_64-gnu-tools) Linux x86_64-gnu-tools succeeded
Details
@anp anp deleted the anp:caller-fn-ptr branch Jan 21, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked issues

Successfully merging this pull request may close these issues.

8 participants
You can’t perform that action at this time.