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

Rollup of 7 pull requests #69990

Closed
wants to merge 21 commits into from

Conversation

Dylan-DPC-zz
Copy link

Successful merges:

Failed merges:

r? @ghost

nnethercote and others added 21 commits February 26, 2020 10:59
`sip::Hasher::short_write` is currently unused. It is called by
`sip::Hasher::write_{u8,usize}`, but those methods are also unused,
because `DefaultHasher`, `SipHasher` and `SipHasher13` don't implement
any of the `write_xyz` methods, so all their write operations end up
calling `sip::Hasher::write`.

(I confirmed this by inserting a `panic!` in `sip::Hasher::short_write`
and running the tests -- they all passed.)

The alternative would be to add all the missing `write_xyz` methods.
This does give some significant speed-ups, but it hurts compile times a
little in some cases. See rust-lang#69152 for details. This commit does the
conservative thing and doesn't change existing behaviour.
For some reason the absolute paths were formatted differently on the
armhf-gnu target.

    thread '<unnamed>' panicked at 'assertion failed: `(left == right)`
      left: `"Backtrace [\n    { fn: \"__rust_maybe_catch_panic\" },\n    { fn: \"std::rt::lang_start_internal\", file: \"./rust/rt.rs\", line: 300 },\n    { fn: \"std::rt::lang_start\", file: \"./rust/rt.rs\", line: 400 },\n]"`,
     right: `"Backtrace [\n    { fn: \"__rust_maybe_catch_panic\" },\n    { fn: \"std::rt::lang_start_internal\", file: \"/rust/rt.rs\", line: 300 },\n    { fn: \"std::rt::lang_start\", file: \"/rust/rt.rs\", line: 400 },\n]"`', src/libstd/backtrace.rs:486:5
…d a long lost assertion

This reverts part of commit 9712fa4.
Co-Authored-By: Ralf Jung <post@ralfj.de>
This commit fixes an issue where if `eprintln!` is used in a TLS
destructor it can accidentally cause the process to abort. TLS
destructors are executed after `main` returns on the main thread, and at
this point we've also deinitialized global `Lazy` values like those
which store the `Stderr` and `Stdout` internals. This means that despite
handling TLS not being accessible in `eprintln!`, we will fail due to
not being able to call `stderr()`. This means that we'll double-panic
quickly because panicking also attempt to write to stderr.

The fix here is to reimplement the global stderr handle to avoid the
need for destruction. This avoids the need for `Lazy` as well as the
hidden panic inside of the `stderr` function.

Overall this should improve the robustness of printing errors and/or
panics in weird situations, since the `stderr` accessor should be
infallible in more situations.
Backtrace Debug tweaks

- Change Debug representation of disabled and unsupported backtraces to use \<placeholder\> style, same as what we do for debug printing locked mutexes and mutably borrowed refcells;

    ```diff
    - Error { msg: "...", backtrace: disabled backtrace }
    + Error { msg: "...", backtrace: <disabled> }
    ```

- Remove quotes around unresolved symbol names;

    ```diff
    - Backtrace [{ fn: "<unknown>" }]
    + Backtrace [{ fn: <unknown> }]
    ```

- Add quotes around file paths;

    ```diff
    - Backtrace [{ fn: "krate::main", file: /path/to/main.rs, line: 10 }]
    + Backtrace [{ fn: "krate::main", file: "/path/to/main.rs", line: 10 }]
    ```

- Add test.
…te, r=dtolnay

Remove `sip::Hasher::short_write`.

`sip::Hasher::short_write` is currently unused. It is called by
`sip::Hasher::write_{u8,usize}`, but those methods are also unused,
because `DefaultHasher`, `SipHasher` and `SipHasher13` don't implement
any of the `write_xyz` methods, so all their write operations end up
calling `sip::Hasher::write`.

(I confirmed this by inserting a `panic!` in `sip::Hasher::short_write`
and running the tests -- they all passed.)

The alternative would be to add all the missing `write_xyz` methods.
This does give some significant speed-ups, but it hurts compile times a
little in some cases. See rust-lang#69152 for details. This commit does the
conservative thing and doesn't change existing behaviour.

r? @rust-lang/libs
…lfJung

Compute the correct layout for variants of uninhabited enums

r? @eddyb
cc @RalfJung

fixes rust-lang#69191
cc rust-lang#69763
…lacrum

Regenerate tables for Unicode 13.0.0
…hewjasper

Increase verbosity when suggesting subtle code changes

Do not suggest changes that are actually quite small inline, to minimize the likelihood of confusion.

Fix rust-lang#69243.
…fackler

Fix abort-on-eprintln during process shutdown

This commit fixes an issue where if `eprintln!` is used in a TLS
destructor it can accidentally cause the process to abort. TLS
destructors are executed after `main` returns on the main thread, and at
this point we've also deinitialized global `Lazy` values like those
which store the `Stderr` and `Stdout` internals. This means that despite
handling TLS not being accessible in `eprintln!`, we will fail due to
not being able to call `stderr()`. This means that we'll double-panic
quickly because panicking also attempt to write to stderr.

The fix here is to reimplement the global stderr handle to avoid the
need for destruction. This avoids the need for `Lazy` as well as the
hidden panic inside of the `stderr` function.

Overall this should improve the robustness of printing errors and/or
panics in weird situations, since the `stderr` accessor should be
infallible in more situations.
Add self to .mailmap

The variants are only used for [rust-lang/rust-clippy](https://github.com/rust-lang/rust-clippy), but it seems like <https://thanks.rust-lang.org/> only uses this `.mailmap`.
@Dylan-DPC-zz
Copy link
Author

@bors r+ rollup=never p=7

@bors
Copy link
Contributor

bors commented Mar 14, 2020

📌 Commit 9771fdf has been approved by Dylan-DPC

@bors bors added the S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. label Mar 14, 2020
@Dylan-DPC-zz Dylan-DPC-zz added the rollup A PR which is a rollup label Mar 14, 2020
@bors
Copy link
Contributor

bors commented Mar 14, 2020

⌛ Testing commit 9771fdf with merge 880198f77cc288695a27b779dec32aa90836c301...

@rust-highfive
Copy link
Collaborator

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.

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)

@bors
Copy link
Contributor

bors commented Mar 14, 2020

💔 Test failed - checks-azure

@bors bors removed the S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. label Mar 14, 2020
@bors bors added the S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. label Mar 14, 2020
@Dylan-DPC-zz
Copy link
Author

@bors retry

@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 Mar 14, 2020
@bors
Copy link
Contributor

bors commented Mar 14, 2020

⌛ Testing commit 9771fdf with merge 5f61ecb123d2701eb29ea40a71e769b304ff0bcd...

@rust-highfive
Copy link
Collaborator

The job test-various 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-14T06:47:25.2975201Z test [ui] ui/env-vars.rs ... ignored
2020-03-14T06:47:25.3109386Z test [ui] ui/enums-pats-not-idents.rs ... ok
2020-03-14T06:47:25.5601304Z test [ui] ui/epoch-gate-feature.rs ... ok
2020-03-14T06:47:25.9768506Z test [ui] ui/eq-multidispatch.rs ... ok
2020-03-14T06:47:25.9790785Z test [ui] ui/eprint-on-tls-drop.rs ... FAILED
2020-03-14T06:47:26.0188302Z test [ui] ui/error-codes/E0004-2.rs ... ok
2020-03-14T06:47:26.0712250Z test [ui] ui/error-codes/E0005.rs ... ok
2020-03-14T06:47:26.0730068Z test [ui] ui/error-codes/E0004.rs ... ok
2020-03-14T06:47:26.1105214Z test [ui] ui/error-codes/E0010-teach.rs ... ok
---
2020-03-14T06:57:55.8631657Z test [ui] ui/wrapping-int-combinations.rs ... ok
2020-03-14T06:57:55.8635736Z 
2020-03-14T06:57:55.8636031Z failures:
2020-03-14T06:57:55.8666048Z 
2020-03-14T06:57:55.8666710Z ---- [ui] ui/eprint-on-tls-drop.rs stdout ----
2020-03-14T06:57:55.8667145Z error: test run failed!
2020-03-14T06:57:55.8667369Z status: exit code: 101
2020-03-14T06:57:55.8667369Z status: exit code: 101
2020-03-14T06:57:55.8668119Z command: "/node-v9.2.0-linux-x64/bin/node" "/checkout/src/etc/wasm32-shim.js" "/checkout/obj/build/x86_64-unknown-linux-gnu/test/ui/eprint-on-tls-drop/a.wasm"
2020-03-14T06:57:55.8668931Z ------------------------------------------
2020-03-14T06:57:55.8669105Z 
2020-03-14T06:57:55.8669467Z ------------------------------------------
2020-03-14T06:57:55.8669694Z stderr:
2020-03-14T06:57:55.8669694Z stderr:
2020-03-14T06:57:55.8670051Z ------------------------------------------
2020-03-14T06:57:55.8670312Z RuntimeError: unreachable
2020-03-14T06:57:55.8670955Z     at __rust_start_panic (wasm-function[102]:1)
2020-03-14T06:57:55.8671461Z     at rust_panic (wasm-function[97]:39)
2020-03-14T06:57:55.8672100Z     at _ZN3std9panicking20rust_panic_with_hook17hce8da6fb7d79ed0eE (wasm-function[92]:279)
2020-03-14T06:57:55.8672728Z     at rust_begin_unwind (wasm-function[91]:90)
2020-03-14T06:57:55.8673352Z     at _ZN4core9panicking9panic_fmt17h0843d8e9cd281e9dE (wasm-function[121]:58)
2020-03-14T06:57:55.8674181Z     at _ZN4core6option18expect_none_failed17h800de8fcb4c10b2bE (wasm-function[133]:139)
2020-03-14T06:57:55.8675023Z     at _ZN4core6result19Result$LT$T$C$E$GT$6unwrap17hce76bed18edc3eafE (wasm-function[2]:67)
2020-03-14T06:57:55.8675859Z     at _ZN18eprint_on_tls_drop4main17he6677df84c8c9a17E (wasm-function[3]:106)
2020-03-14T06:57:55.8676769Z     at _ZN3std2rt10lang_start28_$u7b$$u7b$closure$u7d$$u7d$17hb0e66e6d369820aeE (wasm-function[5]:25)
2020-03-14T06:57:55.8677659Z     at _ZN3std10sys_common9backtrace28__rust_begin_short_backtrace17ha5a6714d3fad5170E (wasm-function[82]:8)
2020-03-14T06:57:55.8678489Z     at _ZN3std2rt19lang_start_internal17h51f54df58857afefE (wasm-function[98]:285)
2020-03-14T06:57:55.8679092Z     at main (wasm-function[4]:46)
2020-03-14T06:57:55.8679662Z     at Object.<anonymous> (/checkout/src/etc/wasm32-shim.js:20:20)
2020-03-14T06:57:55.8680064Z     at Module._compile (module.js:641:30)
2020-03-14T06:57:55.8680448Z     at Object.Module._extensions..js (module.js:652:10)
2020-03-14T06:57:55.8680823Z     at Module.load (module.js:560:32)
2020-03-14T06:57:55.8681146Z     at tryModuleLoad (module.js:503:12)
2020-03-14T06:57:55.8681709Z     at Function.Module._load (module.js:495:3)
2020-03-14T06:57:55.8682278Z     at Function.Module.runMain (module.js:682:10)
2020-03-14T06:57:55.8682655Z     at startup (bootstrap_node.js:191:16)
2020-03-14T06:57:55.8683593Z ------------------------------------------
2020-03-14T06:57:55.8683777Z 
2020-03-14T06:57:55.8683880Z 
2020-03-14T06:57:55.8684004Z 
2020-03-14T06:57:55.8684004Z 
2020-03-14T06:57:55.8684153Z failures:
2020-03-14T06:57:55.8684769Z     [ui] ui/eprint-on-tls-drop.rs
2020-03-14T06:57:55.8686035Z test result: FAILED. 9385 passed; 1 failed; 386 ignored; 0 measured; 0 filtered out
2020-03-14T06:57:55.8686327Z 
2020-03-14T06:57:55.8713853Z thread 'main' panicked at 'Some tests failed', src/tools/compiletest/src/main.rs:348:22
2020-03-14T06:57:55.8714320Z note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace
2020-03-14T06:57:55.8714320Z note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace
2020-03-14T06:57:55.8727481Z 
2020-03-14T06:57:55.8727668Z 
2020-03-14T06:57:55.8736787Z 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/wasm32-unknown-unknown/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-wasm32-unknown-unknown" "--mode" "ui" "--target" "wasm32-unknown-unknown" "--host" "x86_64-unknown-linux-gnu" "--llvm-filecheck" "/checkout/obj/build/x86_64-unknown-linux-gnu/llvm/build/bin/FileCheck" "--nodejs" "/node-v9.2.0-linux-x64/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/wasm32-unknown-unknown/native/rust-test-helpers" "--docck-python" "/usr/bin/python2.7" "--lldb-python" "/usr/bin/python2.7" "--gdb" "/usr/bin/gdb" "--llvm-version" "9.0.1-rust-1.43.0-nightly\n" "--cc" "" "--cxx" "" "--cflags" "" "--llvm-components" "" "--adb-path" "adb" "--adb-test-dir" "/data/tmp/work" "--android-cross-path" "" "--color" "always"
2020-03-14T06:57:55.8740526Z 
2020-03-14T06:57:55.8740743Z 
2020-03-14T06:57:55.8755049Z failed to run: /checkout/obj/build/bootstrap/debug/bootstrap test --target wasm32-unknown-unknown src/test/run-make src/test/ui src/test/compile-fail src/test/mir-opt src/test/codegen-units src/libcore
2020-03-14T06:57:55.8755728Z Build completed unsuccessfully in 1:37:39
2020-03-14T06:57:55.8755728Z Build completed unsuccessfully in 1:37:39
2020-03-14T06:57:55.8822169Z == clock drift check ==
2020-03-14T06:57:55.8843249Z   local time: Sat Mar 14 06:57:55 UTC 2020
2020-03-14T06:57:56.0462563Z   network time: Sat, 14 Mar 2020 06:57:56 GMT
2020-03-14T06:57:56.0463664Z == end clock drift check ==
2020-03-14T06:57:57.1849094Z 
2020-03-14T06:57:57.1957306Z ##[error]Bash exited with code '1'.
2020-03-14T06:57:57.2037504Z ##[section]Starting: Checkout rust-lang/rust@auto to s
2020-03-14T06:57:57.2043281Z ==============================================================================
2020-03-14T06:57:57.2043636Z Task         : Get sources
2020-03-14T06:57:57.2043979Z Description  : Get sources from a repository. Supports Git, TfsVC, and SVN repositories.

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)

@bors
Copy link
Contributor

bors commented Mar 14, 2020

💔 Test failed - checks-azure

@bors bors added S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. and removed S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. labels Mar 14, 2020
@JohnTitor
Copy link
Member

Left a comment to the PR, closing.

@JohnTitor JohnTitor closed this Mar 14, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
rollup A PR which is a rollup S-waiting-on-review Status: Awaiting review from the assignee but also interested parties.
Projects
None yet
Development

Successfully merging this pull request may close these issues.