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

Remove -Z no-landing-pads flag #70175

Merged
merged 4 commits into from
Apr 30, 2020
Merged

Remove -Z no-landing-pads flag #70175

merged 4 commits into from
Apr 30, 2020

Conversation

Amanieu
Copy link
Member

@Amanieu Amanieu commented Mar 20, 2020

Since #67502, -Z no-landing-pads will cause all attempted unwinds to abort since we don't generate a try / catch. This previously worked because __rust_try was located in libpanic_unwind which is always compiled with -C panic=unwind, but __rust_try is now directly inline into the crate that uses catch_unwind.

As such, -Z no-landing-pads is now mostly useless and people should use -C panic=abort instead.

@rust-highfive
Copy link
Collaborator

r? @ecstatic-morse

(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 Mar 20, 2020
@Amanieu
Copy link
Member Author

Amanieu commented Mar 20, 2020

cc @Mark-Simulacrum

@Mark-Simulacrum
Copy link
Member

I am in favor of doing this. I think it probably makes sense to start a compiler team FCP here though (I can't personally do that I think).

r? @pnkfelix

@rust-highfive
Copy link
Collaborator

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-03-20T12:24:41.4815962Z ========================== Starting Command Output ===========================
2020-03-20T12:24:41.4819192Z [command]/bin/bash --noprofile --norc /home/vsts/work/_temp/433685ba-f6db-4acc-8bc7-bafe0e02501e.sh
2020-03-20T12:24:41.4819609Z 
2020-03-20T12:24:41.4824021Z ##[section]Finishing: Disable git automatic line ending conversion
2020-03-20T12:24:41.4843091Z ##[section]Starting: Checkout rust-lang/rust@refs/pull/70175/merge to s
2020-03-20T12:24:41.4846073Z Task         : Get sources
2020-03-20T12:24:41.4846364Z Description  : Get sources from a repository. Supports Git, TfsVC, and SVN repositories.
2020-03-20T12:24:41.4846646Z Version      : 1.0.0
2020-03-20T12:24:41.4846854Z Author       : Microsoft
---
2020-03-20T12:24:42.4744796Z ##[command]git remote add origin https://github.com/rust-lang/rust
2020-03-20T12:24:42.4753831Z ##[command]git config gc.auto 0
2020-03-20T12:24:42.4760106Z ##[command]git config --get-all http.https://github.com/rust-lang/rust.extraheader
2020-03-20T12:24:42.4765651Z ##[command]git config --get-all http.proxy
2020-03-20T12:24:42.4771503Z ##[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/70175/merge:refs/remotes/pull/70175/merge
---
2020-03-20T13:18:25.8642918Z .................................................................................................... 1700/9803
2020-03-20T13:18:29.8972777Z .................................................................................................... 1800/9803
2020-03-20T13:18:40.5768432Z ..........................................................................i......................... 1900/9803
2020-03-20T13:18:46.5407890Z .................................................................................................... 2000/9803
2020-03-20T13:18:53.9756992Z ................................................................iiiii............................... 2100/9803
2020-03-20T13:19:10.7365720Z .................................................................................................... 2300/9803
2020-03-20T13:19:12.9018023Z .................................................................................................... 2400/9803
2020-03-20T13:19:15.7568107Z .................................................................................................... 2500/9803
2020-03-20T13:19:34.6013751Z .................................................................................................... 2600/9803
---
2020-03-20T13:22:04.4204522Z .....................................i...............i.............................................. 5000/9803
2020-03-20T13:22:13.0918388Z .................................................................................................... 5100/9803
2020-03-20T13:22:19.0522204Z ................................................................................i................... 5200/9803
2020-03-20T13:22:24.2083715Z .................................................................................................... 5300/9803
2020-03-20T13:22:33.5752404Z .............................................................ii.ii........i...i..................... 5400/9803
2020-03-20T13:22:41.1740577Z i................................................................................................... 5600/9803
2020-03-20T13:22:49.9412959Z .....i.............................................................................................. 5700/9803
2020-03-20T13:22:55.8465261Z ........................................................i........................................... 5800/9803
2020-03-20T13:23:01.9386038Z .................................................................................................... 5900/9803
2020-03-20T13:23:01.9386038Z .................................................................................................... 5900/9803
2020-03-20T13:23:09.6038888Z .................................................................................................... 6000/9803
2020-03-20T13:23:17.1524086Z ..................................................ii...i..ii...........i............................ 6100/9803
2020-03-20T13:23:36.3489908Z .................................................................................................... 6300/9803
2020-03-20T13:23:43.1661607Z .................................................................................................... 6400/9803
2020-03-20T13:23:43.1661607Z .................................................................................................... 6400/9803
2020-03-20T13:23:47.2160879Z ................................................................................i..ii............... 6500/9803
2020-03-20T13:24:09.2084033Z .................................................................................................... 6700/9803
2020-03-20T13:24:18.5293919Z ...............................................................................i.................... 6800/9803
2020-03-20T13:24:20.6886453Z .................................................................................................... 6900/9803
2020-03-20T13:24:22.7937061Z .................................................................................................... 7000/9803
---
2020-03-20T13:26:01.2558105Z .................................................................................................... 7800/9803
2020-03-20T13:26:06.4025271Z .................................................................................................... 7900/9803
2020-03-20T13:26:12.0844783Z ...................................................................i................................ 8000/9803
2020-03-20T13:26:21.6810718Z .................................................................................................... 8100/9803
2020-03-20T13:26:26.8085307Z ...............iiiiiiiiii.i......................................................................... 8200/9803
2020-03-20T13:26:39.9326433Z .................................................................................................... 8400/9803
2020-03-20T13:26:45.7667824Z .................................................................................................... 8500/9803
2020-03-20T13:26:59.8776493Z .................................................................................................... 8600/9803
2020-03-20T13:27:06.0618974Z .................................................................................................... 8700/9803
---
2020-03-20T13:29:08.1934331Z ---- [run-fail] run-fail/mir_codegen_no_landing_pads.rs stdout ----
2020-03-20T13:29:08.1934547Z 
2020-03-20T13:29:08.1934731Z error: compilation failed!
2020-03-20T13:29:08.1935258Z status: exit code: 1
2020-03-20T13:29:08.1937099Z command: "/checkout/obj/build/x86_64-unknown-linux-gnu/stage2/bin/rustc" "/checkout/src/test/run-fail/mir_codegen_no_landing_pads.rs" "-Zthreads=1" "--target=x86_64-unknown-linux-gnu" "-C" "prefer-dynamic" "-o" "/checkout/obj/build/x86_64-unknown-linux-gnu/test/run-fail/mir_codegen_no_landing_pads/a" "-Crpath" "-O" "-Cdebuginfo=0" "-Zunstable-options" "-Lnative=/checkout/obj/build/x86_64-unknown-linux-gnu/native/rust-test-helpers" "-C" "panic=abort" "-C" "codegen-units=1" "-L" "/checkout/obj/build/x86_64-unknown-linux-gnu/test/run-fail/mir_codegen_no_landing_pads/auxiliary"
2020-03-20T13:29:08.1938611Z ------------------------------------------
2020-03-20T13:29:08.1938783Z 
2020-03-20T13:29:08.1939142Z ------------------------------------------
2020-03-20T13:29:08.1939345Z stderr:
2020-03-20T13:29:08.1939345Z stderr:
2020-03-20T13:29:08.1939726Z ------------------------------------------
2020-03-20T13:29:08.1940107Z warning: unused imports: `Write`, `self`
2020-03-20T13:29:08.1940592Z  --> /checkout/src/test/run-fail/mir_codegen_no_landing_pads.rs:5:15
2020-03-20T13:29:08.1940851Z   |
2020-03-20T13:29:08.1941027Z 5 | use std::io::{self, Write};
2020-03-20T13:29:08.1941413Z   |
2020-03-20T13:29:08.1941612Z   = note: `#[warn(unused_imports)]` on by default
2020-03-20T13:29:08.1941784Z 
2020-03-20T13:29:08.1941784Z 
2020-03-20T13:29:08.1942313Z error: the linked panic runtime `panic_unwind` is not compiled with this crate's panic strategy `abort`
2020-03-20T13:29:08.1942745Z error: aborting due to previous error
2020-03-20T13:29:08.1942895Z 
2020-03-20T13:29:08.1943003Z 
2020-03-20T13:29:08.1943335Z ------------------------------------------
2020-03-20T13:29:08.1943335Z ------------------------------------------
2020-03-20T13:29:08.1943491Z 
2020-03-20T13:29:08.1943741Z 
2020-03-20T13:29:08.1944366Z ---- [run-fail] run-fail/mir_codegen_no_landing_pads_diverging.rs stdout ----
2020-03-20T13:29:08.1944612Z 
2020-03-20T13:29:08.1944779Z error: compilation failed!
2020-03-20T13:29:08.1944986Z status: exit code: 1
2020-03-20T13:29:08.1947094Z command: "/checkout/obj/build/x86_64-unknown-linux-gnu/stage2/bin/rustc" "/checkout/src/test/run-fail/mir_codegen_no_landing_pads_diverging.rs" "-Zthreads=1" "--target=x86_64-unknown-linux-gnu" "-C" "prefer-dynamic" "-o" "/checkout/obj/build/x86_64-unknown-linux-gnu/test/run-fail/mir_codegen_no_landing_pads_diverging/a" "-Crpath" "-O" "-Cdebuginfo=0" "-Zunstable-options" "-Lnative=/checkout/obj/build/x86_64-unknown-linux-gnu/native/rust-test-helpers" "-C" "panic=abort" "-C" "codegen-units=1" "-L" "/checkout/obj/build/x86_64-unknown-linux-gnu/test/run-fail/mir_codegen_no_landing_pads_diverging/auxiliary"
2020-03-20T13:29:08.1948761Z ------------------------------------------
2020-03-20T13:29:08.1948938Z 
2020-03-20T13:29:08.1949289Z ------------------------------------------
2020-03-20T13:29:08.1949508Z stderr:
2020-03-20T13:29:08.1949508Z stderr:
2020-03-20T13:29:08.1949871Z ------------------------------------------
2020-03-20T13:29:08.1950139Z warning: unused imports: `Write`, `self`
2020-03-20T13:29:08.1950712Z  --> /checkout/src/test/run-fail/mir_codegen_no_landing_pads_diverging.rs:5:15
2020-03-20T13:29:08.1950991Z   |
2020-03-20T13:29:08.1951178Z 5 | use std::io::{self, Write};
2020-03-20T13:29:08.1951594Z   |
2020-03-20T13:29:08.1951806Z   = note: `#[warn(unused_imports)]` on by default
2020-03-20T13:29:08.1951992Z 
2020-03-20T13:29:08.1952179Z warning: unreachable statement
---
2020-03-20T13:29:08.1956944Z 
2020-03-20T13:29:08.1957121Z warning: unused variable: `d`
2020-03-20T13:29:08.1957658Z   --> /checkout/src/test/run-fail/mir_codegen_no_landing_pads_diverging.rs:18:8
2020-03-20T13:29:08.1957953Z    |
2020-03-20T13:29:08.1958133Z 18 | fn mir(d: Droppable) {
2020-03-20T13:29:08.1958444Z    |        ^ help: consider prefixing with an underscore: `_d`
2020-03-20T13:29:08.1958693Z 
2020-03-20T13:29:08.1959212Z error: the linked panic runtime `panic_unwind` is not compiled with this crate's panic strategy `abort`
2020-03-20T13:29:08.1959691Z error: aborting due to previous error
2020-03-20T13:29:08.1959857Z 
2020-03-20T13:29:08.1959953Z 
2020-03-20T13:29:08.1960306Z ------------------------------------------
---
2020-03-20T13:29:08.1981609Z test result: FAILED. 137 passed; 2 failed; 0 ignored; 0 measured; 0 filtered out
2020-03-20T13:29:08.1981977Z 
2020-03-20T13:29:08.1982155Z 
2020-03-20T13:29:08.1982246Z 
2020-03-20T13:29:08.1986583Z 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/run-fail" "--build-base" "/checkout/obj/build/x86_64-unknown-linux-gnu/test/run-fail" "--stage-id" "stage2-x86_64-unknown-linux-gnu" "--mode" "run-fail" "--target" "x86_64-unknown-linux-gnu" "--host" "x86_64-unknown-linux-gnu" "--llvm-filecheck" "/usr/lib/llvm-7/bin/FileCheck" "--nodejs" "/usr/bin/node" "--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" "" "--adb-path" "adb" "--adb-test-dir" "/data/tmp/work" "--android-cross-path" "" "--color" "always"
2020-03-20T13:29:08.1989638Z 
2020-03-20T13:29:08.1989783Z 
2020-03-20T13:29:08.1990366Z failed to run: /checkout/obj/build/bootstrap/debug/bootstrap test --exclude src/tools/tidy
2020-03-20T13:29:08.2038527Z Build completed unsuccessfully in 1:00:17
2020-03-20T13:29:08.2038527Z Build completed unsuccessfully in 1:00:17
2020-03-20T13:29:08.2038809Z == clock drift check ==
2020-03-20T13:29:08.2056419Z   local time: Fri Mar 20 13:29:08 UTC 2020
2020-03-20T13:29:08.6951163Z   network time: Fri, 20 Mar 2020 13:29:08 GMT
2020-03-20T13:29:08.6958195Z == end clock drift check ==
2020-03-20T13:29:08.6959981Z 
2020-03-20T13:29:08.6995897Z ##[error]Bash exited with code '1'.
2020-03-20T13:29:08.7009994Z ##[section]Finishing: Run build
2020-03-20T13:29:08.7055367Z ##[section]Starting: Checkout rust-lang/rust@refs/pull/70175/merge to s
2020-03-20T13:29:08.7060462Z Task         : Get sources
2020-03-20T13:29:08.7060782Z Description  : Get sources from a repository. Supports Git, TfsVC, and SVN repositories.
2020-03-20T13:29:08.7061079Z Version      : 1.0.0
2020-03-20T13:29:08.7061304Z Author       : Microsoft
2020-03-20T13:29:08.7061304Z Author       : Microsoft
2020-03-20T13:29:08.7061636Z Help         : [More Information](https://go.microsoft.com/fwlink/?LinkId=798199)
2020-03-20T13:29:08.7062010Z ==============================================================================
2020-03-20T13:29:09.0306473Z Cleaning any cached credential from repository: rust-lang/rust (GitHub)
2020-03-20T13:29:09.0312194Z ##[section]Finishing: Checkout rust-lang/rust@refs/pull/70175/merge to s
2020-03-20T13:29:09.0396800Z Cleaning up task key
2020-03-20T13:29:09.0397936Z Start cleaning up orphan processes.
2020-03-20T13:29:09.0567944Z Terminate orphan process: pid (3487) (python)
2020-03-20T13:29:09.0735714Z ##[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 @rust-lang/infra. (Feature Requests)

@JohnCSimon JohnCSimon 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-review Status: Awaiting review from the assignee but also interested parties. labels Mar 28, 2020
@rust-highfive
Copy link
Collaborator

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-03-31T03:03:56.0151456Z ========================== Starting Command Output ===========================
2020-03-31T03:03:56.0154395Z [command]/bin/bash --noprofile --norc /home/vsts/work/_temp/4230d7db-0d97-4fdc-ad52-eee0141938d3.sh
2020-03-31T03:03:56.0154709Z 
2020-03-31T03:03:56.0159485Z ##[section]Finishing: Disable git automatic line ending conversion
2020-03-31T03:03:56.0183989Z ##[section]Starting: Checkout rust-lang/rust@refs/pull/70175/merge to s
2020-03-31T03:03:56.0187747Z Task         : Get sources
2020-03-31T03:03:56.0188070Z Description  : Get sources from a repository. Supports Git, TfsVC, and SVN repositories.
2020-03-31T03:03:56.0188382Z Version      : 1.0.0
2020-03-31T03:03:56.0188594Z Author       : Microsoft
---
2020-03-31T03:03:57.0176867Z ##[command]git remote add origin https://github.com/rust-lang/rust
2020-03-31T03:03:57.0183755Z ##[command]git config gc.auto 0
2020-03-31T03:03:57.0188526Z ##[command]git config --get-all http.https://github.com/rust-lang/rust.extraheader
2020-03-31T03:03:57.0192267Z ##[command]git config --get-all http.proxy
2020-03-31T03:03:57.0199173Z ##[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/70175/merge:refs/remotes/pull/70175/merge
---
2020-03-31T03:11:47.8816369Z    Compiling rustc_feature v0.0.0 (/checkout/src/librustc_feature)
2020-03-31T03:11:49.4790197Z    Compiling fmt_macros v0.0.0 (/checkout/src/libfmt_macros)
2020-03-31T03:11:51.2131612Z    Compiling rustc_ast_pretty v0.0.0 (/checkout/src/librustc_ast_pretty)
2020-03-31T03:11:52.8325616Z    Compiling rustc_hir v0.0.0 (/checkout/src/librustc_hir)
2020-03-31T03:12:02.0479688Z    Compiling rustc_query_system v0.0.0 (/checkout/src/librustc_query_system)
2020-03-31T03:12:05.5001762Z    Compiling rustc_hir_pretty v0.0.0 (/checkout/src/librustc_hir_pretty)
2020-03-31T03:12:10.6369884Z    Compiling rustc_attr v0.0.0 (/checkout/src/librustc_attr)
2020-03-31T03:12:15.1237661Z    Compiling rustc_parse v0.0.0 (/checkout/src/librustc_parse)
2020-03-31T03:12:25.0951293Z    Compiling rustc_ast_lowering v0.0.0 (/checkout/src/librustc_ast_lowering)
---
2020-03-31T03:36:52.7339409Z    Compiling rustc_feature v0.0.0 (/checkout/src/librustc_feature)
2020-03-31T03:36:54.6698257Z    Compiling fmt_macros v0.0.0 (/checkout/src/libfmt_macros)
2020-03-31T03:36:56.8308724Z    Compiling rustc_ast_pretty v0.0.0 (/checkout/src/librustc_ast_pretty)
2020-03-31T03:36:58.8568430Z    Compiling rustc_hir v0.0.0 (/checkout/src/librustc_hir)
2020-03-31T03:37:10.3111829Z    Compiling rustc_query_system v0.0.0 (/checkout/src/librustc_query_system)
2020-03-31T03:37:14.3177645Z    Compiling rustc_hir_pretty v0.0.0 (/checkout/src/librustc_hir_pretty)
2020-03-31T03:37:20.2967539Z    Compiling rustc_attr v0.0.0 (/checkout/src/librustc_attr)
2020-03-31T03:37:26.3571131Z    Compiling rustc_parse v0.0.0 (/checkout/src/librustc_parse)
2020-03-31T03:37:37.6743667Z    Compiling rustc_ast_lowering v0.0.0 (/checkout/src/librustc_ast_lowering)
---
2020-03-31T04:05:16.4698064Z .................................................................................................... 1700/9856
2020-03-31T04:05:20.7237506Z .................................................................................................... 1800/9856
2020-03-31T04:05:31.3175896Z ..........................................................................................i......... 1900/9856
2020-03-31T04:05:38.7666985Z .................................................................................................... 2000/9856
2020-03-31T04:05:45.7024714Z ................................................................................iiiii............... 2100/9856
2020-03-31T04:06:08.4996442Z .................................................................................................... 2300/9856
2020-03-31T04:06:10.8589646Z .................................................................................................... 2400/9856
2020-03-31T04:06:13.4088295Z .................................................................................................... 2500/9856
2020-03-31T04:06:20.2813122Z .................................................................................................... 2600/9856
---
2020-03-31T04:09:24.7623103Z ......................................................i...............i............................. 5000/9856
2020-03-31T04:09:33.3944523Z .................................................................................................... 5100/9856
2020-03-31T04:09:40.9536161Z ...................................................................................................i 5200/9856
2020-03-31T04:09:46.1719185Z .................................................................................................... 5300/9856
2020-03-31T04:09:57.6404797Z .....................................................................................ii.ii........i. 5400/9856
2020-03-31T04:10:01.2923872Z ..i................................................................................................. 5500/9856
2020-03-31T04:10:10.6922919Z ..............................i..................................................................... 5700/9856
2020-03-31T04:10:21.0557868Z ................................................ii....................................i............. 5800/9856
2020-03-31T04:10:28.7867712Z .................................................................................................... 5900/9856
2020-03-31T04:10:34.0634196Z .................................................................................................... 6000/9856
2020-03-31T04:10:34.0634196Z .................................................................................................... 6000/9856
2020-03-31T04:10:43.5074734Z ................................................................................ii...i..ii.......... 6100/9856
2020-03-31T04:10:56.2281813Z .i.................................................................................................. 6200/9856
2020-03-31T04:11:12.6929199Z .................................................................................................... 6400/9856
2020-03-31T04:11:18.3735110Z .................................................................................................... 6500/9856
2020-03-31T04:11:18.3735110Z .................................................................................................... 6500/9856
2020-03-31T04:11:31.8572793Z ..........i..ii..................................................................................... 6600/9856
2020-03-31T04:11:53.8515145Z .................................................................................................... 6800/9856
2020-03-31T04:11:56.2162911Z ..........i......................................................................................... 6900/9856
2020-03-31T04:11:58.5420642Z .................................................................................................... 7000/9856
2020-03-31T04:12:01.0128442Z ...............................................i.................................................... 7100/9856
---
2020-03-31T04:13:49.3862802Z .................................................................................................... 7800/9856
2020-03-31T04:13:54.9020381Z .................................................................................................... 7900/9856
2020-03-31T04:14:01.0917632Z .................................................................................................... 8000/9856
2020-03-31T04:14:10.1102468Z .......i............................................................................................ 8100/9856
2020-03-31T04:14:18.7762154Z ........................................................iiiiiiiiii.i................................ 8200/9856
2020-03-31T04:14:34.0132297Z i......i............................................................................................ 8400/9856
2020-03-31T04:14:39.4595759Z .................................................................................................... 8500/9856
2020-03-31T04:14:52.8511906Z .................................................................................................... 8600/9856
2020-03-31T04:15:02.9154330Z .................................................................................................... 8700/9856
---
2020-03-31T04:17:34.8590444Z ---- [mir-opt] mir-opt/generator-tiny.rs stdout ----
2020-03-31T04:17:34.8590674Z 
2020-03-31T04:17:34.8590847Z error: compilation failed!
2020-03-31T04:17:34.8591058Z status: exit code: 1
2020-03-31T04:17:34.8593217Z command: "/checkout/obj/build/x86_64-unknown-linux-gnu/stage2/bin/rustc" "/checkout/src/test/mir-opt/generator-tiny.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/generator-tiny" "-C" "prefer-dynamic" "-o" "/checkout/obj/build/x86_64-unknown-linux-gnu/test/mir-opt/generator-tiny/a" "-Crpath" "-O" "-Cdebuginfo=0" "-Zunstable-options" "-Lnative=/checkout/obj/build/x86_64-unknown-linux-gnu/native/rust-test-helpers" "-C" "panic=abort" "-L" "/checkout/obj/build/x86_64-unknown-linux-gnu/test/mir-opt/generator-tiny/auxiliary"
2020-03-31T04:17:34.8594950Z ------------------------------------------
2020-03-31T04:17:34.8595125Z 
2020-03-31T04:17:34.8595485Z ------------------------------------------
2020-03-31T04:17:34.8595709Z stderr:
2020-03-31T04:17:34.8595709Z stderr:
2020-03-31T04:17:34.8596076Z ------------------------------------------
2020-03-31T04:17:34.8596676Z error: the linked panic runtime `panic_unwind` is not compiled with this crate's panic strategy `abort`
2020-03-31T04:17:34.8597168Z error: aborting due to previous error
2020-03-31T04:17:34.8597335Z 
2020-03-31T04:17:34.8597430Z 
2020-03-31T04:17:34.8597808Z ------------------------------------------
---
2020-03-31T04:17:34.8604733Z thread 'main' panicked at 'Some tests failed', src/tools/compiletest/src/main.rs:348:22
2020-03-31T04:17:34.8605258Z note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace
2020-03-31T04:17:34.8610504Z 
2020-03-31T04:17:34.8610673Z 
2020-03-31T04:17:34.8618651Z 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-7/bin/FileCheck" "--nodejs" "/usr/bin/node" "--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" "--system-llvm" "--cc" "" "--cxx" "" "--cflags" "" "--llvm-components" "" "--adb-path" "adb" "--adb-test-dir" "/data/tmp/work" "--android-cross-path" "" "--color" "always"
2020-03-31T04:17:34.8621355Z 
2020-03-31T04:17:34.8621452Z 
2020-03-31T04:17:34.8627026Z failed to run: /checkout/obj/build/bootstrap/debug/bootstrap test --exclude src/tools/tidy
2020-03-31T04:17:34.8627469Z Build completed unsuccessfully in 1:09:40
2020-03-31T04:17:34.8627469Z Build completed unsuccessfully in 1:09:40
2020-03-31T04:17:34.8685839Z == clock drift check ==
2020-03-31T04:17:34.8706224Z   local time: Tue Mar 31 04:17:34 UTC 2020
2020-03-31T04:17:35.0818337Z   network time: Tue, 31 Mar 2020 04:17:35 GMT
2020-03-31T04:17:35.0822898Z == end clock drift check ==
2020-03-31T04:17:37.2015635Z 
2020-03-31T04:17:37.2109377Z ##[error]Bash exited with code '1'.
2020-03-31T04:17:37.2125010Z ##[section]Finishing: Run build
2020-03-31T04:17:37.2184867Z ##[section]Starting: Checkout rust-lang/rust@refs/pull/70175/merge to s
2020-03-31T04:17:37.2190457Z Task         : Get sources
2020-03-31T04:17:37.2190857Z Description  : Get sources from a repository. Supports Git, TfsVC, and SVN repositories.
2020-03-31T04:17:37.2191210Z Version      : 1.0.0
2020-03-31T04:17:37.2191459Z Author       : Microsoft
2020-03-31T04:17:37.2191459Z Author       : Microsoft
2020-03-31T04:17:37.2191867Z Help         : [More Information](https://go.microsoft.com/fwlink/?LinkId=798199)
2020-03-31T04:17:37.2192326Z ==============================================================================
2020-03-31T04:17:37.6028085Z Cleaning any cached credential from repository: rust-lang/rust (GitHub)
2020-03-31T04:17:37.6081056Z ##[section]Finishing: Checkout rust-lang/rust@refs/pull/70175/merge to s
2020-03-31T04:17:37.6183012Z Cleaning up task key
2020-03-31T04:17:37.6184458Z Start cleaning up orphan processes.
2020-03-31T04:17:37.6411552Z Terminate orphan process: pid (3426) (python)
2020-03-31T04:17:37.6611529Z ##[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 @rust-lang/infra. (Feature Requests)

@Amanieu
Copy link
Member Author

Amanieu commented Mar 31, 2020

Well I have no idea why this test is failing... We are passing in -Cpanic=abort but it's complaining about panic_unwind.

--- [mir-opt] mir-opt/generator-tiny.rs stdout ----

error: compilation failed!
status: exit code: 1
command: "/checkout/obj/build/x86_64-unknown-linux-gnu/stage2/bin/rustc" "/checkout/src/test/mir-opt/generator-tiny.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/generator-tiny" "-C" "prefer-dynamic" "-o" "/checkout/obj/build/x86_64-unknown-linux-gnu/test/mir-opt/generator-tiny/a" "-Crpath" "-O" "-Cdebuginfo=0" "-Zunstable-options" "-Lnative=/checkout/obj/build/x86_64-unknown-linux-gnu/native/rust-test-helpers" "-C" "panic=abort" "-L" "/checkout/obj/build/x86_64-unknown-linux-gnu/test/mir-opt/generator-tiny/auxiliary"
stdout:
------------------------------------------

------------------------------------------
stderr:
------------------------------------------
error: the linked panic runtime `panic_unwind` is not compiled with this crate's panic strategy `abort`

error: aborting due to previous error

@tmiasko
Copy link
Contributor

tmiasko commented Mar 31, 2020

Most likely result of using -Cpanic=abort together with -Cprefer-dynamic since the standard library is compiled with unwind strategy.

$ echo 'fn main(){}' > a.rs
$ rustc -Cpanic=abort -Cprefer-dynamic a.rs
error: the linked panic runtime `panic_unwind` is not compiled with this crate's panic strategy `abort`

error: aborting due to previous error

@Amanieu
Copy link
Member Author

Amanieu commented Mar 31, 2020

cc @rust-lang/compiler: @Mark-Simulacrum suggests starting a compiler team FCP for this PR.

Comment on lines 544 to 546
pub fn no_landing_pads(&self) -> bool {
self.opts.debugging_opts.no_landing_pads || self.panic_strategy() == PanicStrategy::Abort
self.panic_strategy() == PanicStrategy::Abort
}
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I wonder if this should be inlined or not.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Won't LTO take care of it regardless?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't mean in terms of performance, only code organization.
The reason these methods exist is because the conditions they check are non-trivial, otherwise options should be checked directly.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't mean in terms of performance, only code organization.
The reason these methods exist is because the conditions they check are non-trivial, otherwise options should be checked directly.

I don't personally agree with eddyb's end assertion; sometimes checking options directly makes sense, but I have seen cases where it can be easier to read the overall logic with helper methods, especially if the names of the helper methods end up encoding something that would otherwise be written as a comment alongside the call site.

Having said that, I don't care enough one way or the other in this case to try to argue that this helper method should stay in place. I just don't want the comment here to, on its own, be treated as precedent for a general rule across the board.

@pnkfelix pnkfelix added the T-compiler Relevant to the compiler team, which will review and decide on the PR/issue. label Mar 31, 2020
@pnkfelix
Copy link
Member

@rfcbot fcp merge

@rfcbot
Copy link

rfcbot commented Mar 31, 2020

Team member @pnkfelix has proposed to merge this. The next step is review by the rest of the tagged team members:

No concerns currently listed.

Once a majority of reviewers approve (and at most 2 approvals are outstanding), this will enter its final comment period. If you spot a major issue that hasn't been raised at any point in this process, please speak up!

See this document for info about what commands tagged team members can give me.

@rfcbot rfcbot added proposed-final-comment-period Proposed to merge/close by relevant subteam, see T-<team> label. Will enter FCP once signed off. disposition-merge This issue / PR is in PFCP or FCP with a disposition to merge it. labels Mar 31, 2020
@pnkfelix pnkfelix added S-waiting-on-team Status: Awaiting decision from the relevant subteam (see the T-<team> label). and removed S-waiting-on-author Status: This is awaiting some action (such as code changes or more information) from the author. labels Mar 31, 2020
@petrochenkov
Copy link
Contributor

As such, -Z no-landing-pads is now mostly useless and people should use -C panic=abort instead.

Question: Is -C panic=abort always usable?
Are situations like "one of your dependencies linked to panic_unwind, so I'll produce an error if you pass -C panic=abort or silently ignore it" possible?

@bors
Copy link
Contributor

bors commented Apr 2, 2020

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

@Amanieu
Copy link
Member Author

Amanieu commented Apr 3, 2020

@petrochenkov panic_unwind is an implementation detail of std, so it shouldn't be possible to link to it directly.

@rfcbot rfcbot added the final-comment-period In the final comment period and will be merged soon unless new substantive objections are raised. label Apr 3, 2020
mklein994 added a commit to mklein994/dynamic_wallpaper that referenced this pull request May 9, 2020
dingelish added a commit to mesalock-linux/gbdt-rs that referenced this pull request May 10, 2020
@tshepang tshepang mentioned this pull request May 10, 2020
27 tasks
lu-zero added a commit to rust-av/rav1e that referenced this pull request May 26, 2020
lu-zero added a commit to rust-av/rav1e that referenced this pull request May 26, 2020
lu-zero added a commit to rust-av/rav1e that referenced this pull request May 26, 2020
lu-zero added a commit to rust-av/rav1e that referenced this pull request May 26, 2020
danielhstahl added a commit to realoptions/option_price_faas that referenced this pull request May 27, 2020
lu-zero added a commit to rust-av/rav1e that referenced this pull request May 28, 2020
shssoichiro pushed a commit to xiph/rav1e that referenced this pull request May 28, 2020
* Update nightly in CI

See rust-lang/rust#70175 and
rust-lang/cargo#6375

* Bump minimum rust version to 1.43.1

* Add rustdocflags

* Bump grcov version
lu-zero added a commit to rust-av/rav1e that referenced this pull request May 28, 2020
* Update nightly in CI

See rust-lang/rust#70175 and
rust-lang/cargo#6375

* Bump minimum rust version to 1.43.1

* Add rustdocflags

* Bump grcov version
lu-zero added a commit to xiph/rav1e that referenced this pull request May 28, 2020
* Update nightly in CI

See rust-lang/rust#70175 and
rust-lang/cargo#6375

* Bump minimum rust version to 1.43.1

* Add rustdocflags

* Bump grcov version
chaaz added a commit to chaaz/rust_coverage that referenced this pull request May 29, 2020
dhenkel92 added a commit to dhenkel92/route53-dyndns that referenced this pull request Jun 8, 2020
rossnomann added a commit to tg-rs/tgbot that referenced this pull request Jun 20, 2020
rossnomann added a commit to tg-rs/carapax that referenced this pull request Jun 20, 2020
ysimonson added a commit to indradb/indradb that referenced this pull request Jun 23, 2020
ysimonson added a commit to indradb/indradb that referenced this pull request Jun 25, 2020
* New makefile targets to shortcut existing functionality
* Remove no-landing-pads, see rust-lang/rust#70175
* Run fmt check only on stable
* Use makefile target for testing
glandium added a commit to glandium/git-cinnabar that referenced this pull request Jul 18, 2020
Remove -Zno-landing-pads flag, because it was removed in
rust-lang/rust#70175
Its replacement is panic=abort, which... we already use.
glandium added a commit to glandium/git-cinnabar that referenced this pull request Jul 18, 2020
Remove -Zno-landing-pads flag, because it was removed in
rust-lang/rust#70175
Its replacement is panic=abort, which... we already use.
glandium added a commit to glandium/git-cinnabar that referenced this pull request Jul 18, 2020
Remove -Zno-landing-pads flag, because it was removed in
rust-lang/rust#70175
Its replacement is panic=abort, which... we already use.
@mchernyavsky
Copy link

@petrochenkov panic_unwind is an implementation detail of std, so it shouldn't be possible to link to it directly.

@Amanieu I can't use -C panic=abort in proc-macro libs:

[lib]
proc-macro = true

Compiler says:

error: the linked panic runtime `panic_unwind` is not compiled with this crate's panic strategy `abort`

-Z no-landing-pads worked fine.

bors bot added a commit to rust-fuzz/honggfuzz-rs that referenced this pull request Sep 11, 2020
43: Fix compiler flags for ProfileWithGrcov build option r=PaulGrandperrin a=viniul

This commit replaces the -Zno-landing-pads with the -C panic=unwind,
as the -Zno-landing-pdas is deprecated, see [here](rust-lang/rust#70175).

Co-authored-by: Vincent Ulitzsch <vincent@srlabs.de>
bash pushed a commit to isitvegan/isitvegan-web that referenced this pull request Jan 4, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
disposition-merge This issue / PR is in PFCP or FCP with a disposition to merge it. finished-final-comment-period The final comment period is finished for this PR / Issue. 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. T-compiler Relevant to the compiler team, which will review and decide on the PR/issue.
Projects
None yet
Development

Successfully merging this pull request may close these issues.