rust/tests
bors 0065384608 Auto merge of #127397 - jyn514:multi-thread-panic-hook, r=workingjubilee
fix interleaved output in the default panic hook when multiple threads panic simultaneously

previously, we only held a lock for printing the backtrace itself. since all threads were printing to the same file descriptor, that meant random output in the default panic hook from one thread would be interleaved with the backtrace from another. now, we hold the lock for the full duration of the hook, and the output is ordered.

---

i noticed some odd things while working on this you may or may not already be aware of.

- libbacktrace is included as a submodule instead of a normal rustc crate, and as a result uses `cfg(backtrace_in_std)` instead of a more normal `cfg(feature = "rustc-dep-of-std")`. probably this is left over from before rust used a cargo-based build system?
- the default panic handler uses `trace_unsynchronized`, etc, in `sys::backtrace::print`. as a result, the lock only applies to concurrent *panic handlers*, not concurrent *threads*.  in other words, if another, non-panicking, thread tried to print a backtrace at the same time as the panic handler, we may have UB, especially on windows.
    - we have the option of changing backtrace to enable locking when `backtrace_in_std` is set so we can reuse their lock instead of trying to add our own.
2024-07-13 03:42:24 +00:00
..
assembly Auto merge of #123351 - beetrees:x86-ret-snan-rust, r=nikic,workingjubilee 2024-07-12 20:36:43 +00:00
auxiliary
codegen Auto merge of #123351 - beetrees:x86-ret-snan-rust, r=nikic,workingjubilee 2024-07-12 20:36:43 +00:00
codegen-units Avoid MIR bloat in inlining 2024-07-01 05:17:13 -07:00
coverage coverage. Fix panic when generating mcdc code for inlined functions 2024-07-09 14:28:40 +08:00
coverage-run-rustdoc coverage: Extract hole spans from HIR instead of MIR 2024-07-08 21:22:56 +10:00
crashes Avoid follow-up errors and ICEs after missing lifetime errors on data structures 2024-07-11 11:00:15 +00:00
debuginfo Add Natvis visualiser and debuginfo tests for f16 2024-07-09 03:47:50 +01:00
incremental Auto merge of #126409 - pacak:incr-uplorry, r=michaelwoerister 2024-06-20 09:06:16 +00:00
mir-opt Rollup merge of #126502 - cuviper:dump-mir-exclude-alloc-bytes, r=estebank 2024-07-12 13:47:05 -07:00
pretty Mark format! with must_use hint 2024-07-06 14:24:20 +02:00
run-make Rollup merge of #127381 - Oneirical:testalt-consciousness, r=jieyouxu 2024-07-12 13:47:08 -07:00
run-pass-valgrind
rustdoc Add rustdoc support for use<> in (local) RPITs 2024-07-12 05:24:51 -04:00
rustdoc-gui Don't call switch-theme function 2024-06-29 11:56:06 +02:00
rustdoc-js
rustdoc-js-std
rustdoc-json Add rustdoc-json support for use<> 2024-07-12 05:24:51 -04:00
rustdoc-ui Auto merge of #127311 - oli-obk:do_not_count_errors, r=compiler-errors 2024-07-11 11:51:33 +00:00
ui Auto merge of #127397 - jyn514:multi-thread-panic-hook, r=workingjubilee 2024-07-13 03:42:24 +00:00
ui-fulldeps Always use a colon in //@ normalize-*: headers 2024-07-11 12:23:44 +10:00
COMPILER_TESTS.md