-
Notifications
You must be signed in to change notification settings - Fork 352
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Auto merge of #1589 - Aaron1011:enable-normal-backtrace, r=RalfJung
Enable `backtrace` feature in the generated `Xargo.toml` This allows the normal std panic hook to print a backtrace if `RUST_BACKTRACE=1` and `-Z miri-disable-isolation` are set
- Loading branch information
Showing
15 changed files
with
54 additions
and
2 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,5 @@ | ||
warning: thread support is experimental. For example, Miri does not detect data races yet. | ||
|
||
thread '<unnamed>' panicked at 'Hello!', $DIR/simple.rs:54:9 | ||
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace | ||
thread 'childthread' panicked at 'Hello, world!', $DIR/simple.rs:64:9 |
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 |
---|---|---|
@@ -1 +1,2 @@ | ||
thread 'main' panicked at 'attempt to divide by zero', $DIR/div-by-zero-2.rs:4:14 | ||
note: run with `RUST_BACKTRACE=1` environment variable to display a 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 |
---|---|---|
@@ -1 +1,2 @@ | ||
thread 'main' panicked at 'attempt to shift left with overflow', $DIR/overflowing-lsh-neg.rs:4:14 | ||
note: run with `RUST_BACKTRACE=1` environment variable to display a 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 |
---|---|---|
@@ -1 +1,2 @@ | ||
thread 'main' panicked at 'attempt to shift right with overflow', $DIR/overflowing-rsh-1.rs:4:14 | ||
note: run with `RUST_BACKTRACE=1` environment variable to display a 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 |
---|---|---|
@@ -1 +1,2 @@ | ||
thread 'main' panicked at 'attempt to shift right with overflow', $DIR/overflowing-rsh-2.rs:5:14 | ||
note: run with `RUST_BACKTRACE=1` environment variable to display a 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 |
---|---|---|
@@ -1,3 +1,9 @@ | ||
// rustc-env: RUST_BACKTRACE=1 | ||
// compile-flags: -Zmiri-disable-isolation | ||
// normalize-stderr-test ".*/(rust|checkout)/library/" -> "RUSTLIB/" | ||
// normalize-stderr-test "RUSTLIB/(.*):\d+:\d+ "-> "RUSTLIB/$1:LL:COL " | ||
// normalize-stderr-test "::<.*>" -> "" | ||
|
||
fn main() { | ||
std::panic!("panicking from libstd"); | ||
} |
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 |
---|---|---|
@@ -1 +1,23 @@ | ||
thread 'main' panicked at 'panicking from libstd', $DIR/panic1.rs:2:5 | ||
thread 'main' panicked at 'panicking from libstd', $DIR/panic1.rs:8:5 | ||
stack backtrace: | ||
0: std::rt::begin_panic | ||
RUSTLIB/std/src/panicking.rs:505:12 | ||
1: main | ||
at $DIR/panic1.rs:8:5 | ||
2: <fn() as std::ops::FnOnce<()>>::call_once - shim(fn()) | ||
RUSTLIB/core/src/ops/function.rs:227:5 | ||
3: std::rt::lang_start::{closure#0} | ||
RUSTLIB/std/src/rt.rs:66:18 | ||
4: std::ops::function::impls::call_once | ||
RUSTLIB/core/src/ops/function.rs:259:13 | ||
5: std::panicking::r#try::do_call | ||
RUSTLIB/std/src/panicking.rs:381:40 | ||
6: std::panicking::r#try | ||
RUSTLIB/std/src/panicking.rs:345:19 | ||
7: std::panic::catch_unwind | ||
RUSTLIB/std/src/panic.rs:382:14 | ||
8: std::rt::lang_start_internal | ||
RUSTLIB/std/src/rt.rs:51:25 | ||
9: std::rt::lang_start | ||
RUSTLIB/std/src/rt.rs:65:5 | ||
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 |
---|---|---|
@@ -1 +1,2 @@ | ||
thread 'main' panicked at '42-panicking from libstd', $DIR/panic2.rs:2:5 | ||
note: run with `RUST_BACKTRACE=1` environment variable to display a 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 |
---|---|---|
@@ -1 +1,2 @@ | ||
thread 'main' panicked at 'panicking from libcore', $DIR/panic3.rs:2:5 | ||
note: run with `RUST_BACKTRACE=1` environment variable to display a 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 |
---|---|---|
@@ -1 +1,2 @@ | ||
thread 'main' panicked at '42-panicking from libcore', $DIR/panic4.rs:2:5 | ||
note: run with `RUST_BACKTRACE=1` environment variable to display a 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 |
---|---|---|
@@ -1 +1,2 @@ | ||
thread 'main' panicked at 'index out of bounds: the len is 0 but the index is 0', $DIR/transmute_fat2.rs:15:5 | ||
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace |