diff options
| author | jyn <github@jyn.dev> | 2024-07-05 17:24:10 -0400 |
|---|---|---|
| committer | jyn <github@jyn.dev> | 2024-07-12 11:52:04 -0400 |
| commit | 1c8f9bb84d5956abe6671bf77ccaba64505266a5 (patch) | |
| tree | 392bbbc17025cf590dea0819277c294f6e07149d /tests/ui/backtrace/synchronized-panic-handler.rs | |
| parent | de14f1f932f4f11130be3fed5cd370bd0936032e (diff) | |
| download | rust-1c8f9bb84d5956abe6671bf77ccaba64505266a5.tar.gz rust-1c8f9bb84d5956abe6671bf77ccaba64505266a5.zip | |
fix interleaved panic output
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 would be interleaved with the backtrace. now, we hold the lock for the full duration of the hook, and the output is ordered.
Diffstat (limited to 'tests/ui/backtrace/synchronized-panic-handler.rs')
| -rw-r--r-- | tests/ui/backtrace/synchronized-panic-handler.rs | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/tests/ui/backtrace/synchronized-panic-handler.rs b/tests/ui/backtrace/synchronized-panic-handler.rs index 0ea285968d5..00eb249da1d 100644 --- a/tests/ui/backtrace/synchronized-panic-handler.rs +++ b/tests/ui/backtrace/synchronized-panic-handler.rs @@ -1,6 +1,8 @@ //@ run-pass //@ check-run-results //@ edition:2021 +//@ exec-env:RUST_BACKTRACE=0 +//@ needs-threads use std::thread; const PANIC_MESSAGE: &str = "oops oh no woe is me"; |
