-
Notifications
You must be signed in to change notification settings - Fork 13k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Configure panic hook backtrace behavior
- Loading branch information
1 parent
51126be
commit 368a83d
Showing
7 changed files
with
164 additions
and
65 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
thread 'main' panicked at 'explicit panic', $DIR/runtime-switch.rs:23:5 | ||
stack backtrace: | ||
0: std::panicking::begin_panic | ||
1: runtime_switch::main | ||
note: Some details are omitted, run with `RUST_BACKTRACE=full` for a verbose backtrace. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
// Test for std::panic::set_backtrace_style. | ||
|
||
// run-fail | ||
// check-run-results | ||
// exec-env:RUST_BACKTRACE=0 | ||
|
||
// ignore-msvc see #62897 and `backtrace-debuginfo.rs` test | ||
// ignore-android FIXME #17520 | ||
// ignore-openbsd no support for libbacktrace without filename | ||
// ignore-wasm no panic or subprocess support | ||
// ignore-emscripten no panic or subprocess support | ||
// ignore-sgx no subprocess support | ||
|
||
// NOTE(eddyb) output differs between symbol mangling schemes | ||
// revisions: legacy v0 | ||
// [legacy] compile-flags: -Zunstable-options -Csymbol-mangling-version=legacy | ||
// [v0] compile-flags: -Csymbol-mangling-version=v0 | ||
|
||
#![feature(panic_backtrace_config)] | ||
|
||
fn main() { | ||
std::panic::set_backtrace_style(std::panic::BacktraceStyle::Short); | ||
panic!() | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
thread 'main' panicked at 'explicit panic', $DIR/runtime-switch.rs:23:5 | ||
stack backtrace: | ||
0: std::panicking::begin_panic::<&str> | ||
1: runtime_switch::main | ||
note: Some details are omitted, run with `RUST_BACKTRACE=full` for a verbose backtrace. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters