improve process::abort rendering in Miri backtraces
This commit is contained in:
parent
05abce5d05
commit
a6c0519fae
28 changed files with 54 additions and 90 deletions
|
|
@ -819,7 +819,7 @@ fn panic_with_hook(
|
|||
rtprintpanic!("aborting due to panic at {location}:\n{payload}\n");
|
||||
}
|
||||
}
|
||||
crate::sys::abort_internal();
|
||||
crate::process::abort();
|
||||
}
|
||||
|
||||
match *HOOK.read().unwrap_or_else(PoisonError::into_inner) {
|
||||
|
|
@ -853,7 +853,7 @@ fn panic_with_hook(
|
|||
// through a nounwind function (e.g. extern "C") then we cannot continue
|
||||
// unwinding and have to abort immediately.
|
||||
rtprintpanic!("thread caused non-unwinding panic. aborting.\n");
|
||||
crate::sys::abort_internal();
|
||||
crate::process::abort();
|
||||
}
|
||||
|
||||
rust_panic(payload)
|
||||
|
|
|
|||
|
|
@ -2495,6 +2495,7 @@ pub fn exit(code: i32) -> ! {
|
|||
#[stable(feature = "process_abort", since = "1.17.0")]
|
||||
#[cold]
|
||||
#[cfg_attr(not(test), rustc_diagnostic_item = "process_abort")]
|
||||
#[cfg_attr(miri, track_caller)] // even without panics, this helps for Miri backtraces
|
||||
pub fn abort() -> ! {
|
||||
crate::sys::abort_internal();
|
||||
}
|
||||
|
|
|
|||
|
|
@ -364,6 +364,7 @@ pub fn cvt_nz(error: libc::c_int) -> crate::io::Result<()> {
|
|||
// multithreaded C program. It is much less severe for Rust, because Rust
|
||||
// stdlib doesn't use libc stdio buffering. In a typical Rust program, which
|
||||
// does not use C stdio, even a buggy libc::abort() is, in fact, safe.
|
||||
#[cfg_attr(miri, track_caller)] // even without panics, this helps for Miri backtraces
|
||||
pub fn abort_internal() -> ! {
|
||||
unsafe { libc::abort() }
|
||||
}
|
||||
|
|
|
|||
|
|
@ -356,6 +356,7 @@ pub fn abort_internal() -> ! {
|
|||
}
|
||||
|
||||
#[cfg(miri)]
|
||||
#[track_caller] // even without panics, this helps for Miri backtraces
|
||||
pub fn abort_internal() -> ! {
|
||||
crate::intrinsics::abort();
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,6 +1,4 @@
|
|||
//@error-in-other-file: aborted
|
||||
//@normalize-stderr-test: "\|.*::abort\(\).*" -> "| ABORT()"
|
||||
//@normalize-stderr-test: "\| +\^+" -> "| ^"
|
||||
#![feature(allocator_api)]
|
||||
|
||||
use std::alloc::*;
|
||||
|
|
|
|||
|
|
@ -1,13 +1,11 @@
|
|||
memory allocation of 4 bytes failed
|
||||
error: abnormal termination: the program aborted execution
|
||||
--> RUSTLIB/std/src/sys/pal/PLATFORM/mod.rs:LL:CC
|
||||
--> RUSTLIB/std/src/alloc.rs:LL:CC
|
||||
|
|
||||
LL | ABORT()
|
||||
| ^ abnormal termination occurred here
|
||||
LL | crate::process::abort()
|
||||
| ^^^^^^^^^^^^^^^^^^^^^^^ abnormal termination occurred here
|
||||
|
|
||||
= note: BACKTRACE:
|
||||
= note: inside `std::sys::pal::PLATFORM::abort_internal` at RUSTLIB/std/src/sys/pal/PLATFORM/mod.rs:LL:CC
|
||||
= note: inside `std::process::abort` at RUSTLIB/std/src/process.rs:LL:CC
|
||||
= note: inside `std::alloc::rust_oom` at RUSTLIB/std/src/alloc.rs:LL:CC
|
||||
= note: inside `std::alloc::_::__rg_oom` at RUSTLIB/std/src/alloc.rs:LL:CC
|
||||
= note: inside `std::alloc::handle_alloc_error::rt_error` at RUSTLIB/alloc/src/alloc.rs:LL:CC
|
||||
|
|
@ -16,7 +14,7 @@ note: inside `main`
|
|||
--> tests/fail/alloc/alloc_error_handler.rs:LL:CC
|
||||
|
|
||||
LL | handle_alloc_error(Layout::for_value(&0));
|
||||
| ^
|
||||
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||
|
||||
note: some details are omitted, run with `MIRIFLAGS=-Zmiri-backtrace=full` for a verbose backtrace
|
||||
|
||||
|
|
|
|||
|
|
@ -9,13 +9,12 @@ panic in a function that cannot unwind
|
|||
stack backtrace:
|
||||
thread caused non-unwinding panic. aborting.
|
||||
error: abnormal termination: the program aborted execution
|
||||
--> RUSTLIB/std/src/sys/pal/PLATFORM/mod.rs:LL:CC
|
||||
--> RUSTLIB/std/src/panicking.rs:LL:CC
|
||||
|
|
||||
LL | ABORT()
|
||||
| ^ abnormal termination occurred here
|
||||
LL | crate::process::abort();
|
||||
| ^^^^^^^^^^^^^^^^^^^^^^^ abnormal termination occurred here
|
||||
|
|
||||
= note: BACKTRACE:
|
||||
= note: inside `std::sys::pal::PLATFORM::abort_internal` at RUSTLIB/std/src/sys/pal/PLATFORM/mod.rs:LL:CC
|
||||
= note: inside `std::panicking::panic_with_hook` at RUSTLIB/std/src/panicking.rs:LL:CC
|
||||
= note: inside closure at RUSTLIB/std/src/panicking.rs:LL:CC
|
||||
= note: inside `std::sys::backtrace::__rust_end_short_backtrace::<{closure@std::panicking::panic_handler::{closure#0}}, !>` at RUSTLIB/std/src/sys/backtrace.rs:LL:CC
|
||||
|
|
@ -33,7 +32,7 @@ note: inside `main`
|
|||
--> tests/fail/function_calls/exported_symbol_bad_unwind2.rs:LL:CC
|
||||
|
|
||||
LL | unsafe { nounwind() }
|
||||
| ^
|
||||
| ^^^^^^^^^^
|
||||
|
||||
note: some details are omitted, run with `MIRIFLAGS=-Zmiri-backtrace=full` for a verbose backtrace
|
||||
|
||||
|
|
|
|||
|
|
@ -9,13 +9,12 @@ panic in a function that cannot unwind
|
|||
stack backtrace:
|
||||
thread caused non-unwinding panic. aborting.
|
||||
error: abnormal termination: the program aborted execution
|
||||
--> RUSTLIB/std/src/sys/pal/PLATFORM/mod.rs:LL:CC
|
||||
--> RUSTLIB/std/src/panicking.rs:LL:CC
|
||||
|
|
||||
LL | ABORT()
|
||||
| ^ abnormal termination occurred here
|
||||
LL | crate::process::abort();
|
||||
| ^^^^^^^^^^^^^^^^^^^^^^^ abnormal termination occurred here
|
||||
|
|
||||
= note: BACKTRACE:
|
||||
= note: inside `std::sys::pal::PLATFORM::abort_internal` at RUSTLIB/std/src/sys/pal/PLATFORM/mod.rs:LL:CC
|
||||
= note: inside `std::panicking::panic_with_hook` at RUSTLIB/std/src/panicking.rs:LL:CC
|
||||
= note: inside closure at RUSTLIB/std/src/panicking.rs:LL:CC
|
||||
= note: inside `std::sys::backtrace::__rust_end_short_backtrace::<{closure@std::panicking::panic_handler::{closure#0}}, !>` at RUSTLIB/std/src/sys/backtrace.rs:LL:CC
|
||||
|
|
@ -33,7 +32,7 @@ note: inside `main`
|
|||
--> tests/fail/function_calls/exported_symbol_bad_unwind2.rs:LL:CC
|
||||
|
|
||||
LL | unsafe { nounwind() }
|
||||
| ^
|
||||
| ^^^^^^^^^^
|
||||
|
||||
note: some details are omitted, run with `MIRIFLAGS=-Zmiri-backtrace=full` for a verbose backtrace
|
||||
|
||||
|
|
|
|||
|
|
@ -7,7 +7,7 @@ error: Undefined Behavior: unwinding past a stack frame that does not allow unwi
|
|||
--> tests/fail/function_calls/exported_symbol_bad_unwind2.rs:LL:CC
|
||||
|
|
||||
LL | unsafe { nounwind() }
|
||||
| ^ Undefined Behavior occurred here
|
||||
| ^^^^^^^^^^ Undefined Behavior occurred here
|
||||
|
|
||||
= help: this indicates a bug in the program: it performed an invalid operation, and caused Undefined Behavior
|
||||
= help: see https://doc.rust-lang.org/nightly/reference/behavior-considered-undefined.html for further information
|
||||
|
|
|
|||
|
|
@ -1,6 +1,4 @@
|
|||
//@revisions: extern_block definition both
|
||||
//@normalize-stderr-test: "\|.*::abort\(\).*" -> "| ABORT()"
|
||||
//@normalize-stderr-test: "\| +\^+" -> "| ^"
|
||||
//@normalize-stderr-test: "\n +[0-9]+:[^\n]+" -> ""
|
||||
//@normalize-stderr-test: "\n +at [^\n]+" -> ""
|
||||
//@[definition,both]error-in-other-file: aborted execution
|
||||
|
|
|
|||
|
|
@ -1,6 +1,4 @@
|
|||
//@error-in-other-file: the program aborted execution
|
||||
//@normalize-stderr-test: "\|.*::abort\(\).*" -> "| ABORT()"
|
||||
//@normalize-stderr-test: "\| +\^+" -> "| ^"
|
||||
//@normalize-stderr-test: "\n +[0-9]+:[^\n]+" -> ""
|
||||
//@normalize-stderr-test: "\n +at [^\n]+" -> ""
|
||||
|
||||
|
|
|
|||
|
|
@ -9,13 +9,12 @@ panic in a function that cannot unwind
|
|||
stack backtrace:
|
||||
thread caused non-unwinding panic. aborting.
|
||||
error: abnormal termination: the program aborted execution
|
||||
--> RUSTLIB/std/src/sys/pal/PLATFORM/mod.rs:LL:CC
|
||||
--> RUSTLIB/std/src/panicking.rs:LL:CC
|
||||
|
|
||||
LL | ABORT()
|
||||
| ^ abnormal termination occurred here
|
||||
LL | crate::process::abort();
|
||||
| ^^^^^^^^^^^^^^^^^^^^^^^ abnormal termination occurred here
|
||||
|
|
||||
= note: BACKTRACE:
|
||||
= note: inside `std::sys::pal::PLATFORM::abort_internal` at RUSTLIB/std/src/sys/pal/PLATFORM/mod.rs:LL:CC
|
||||
= note: inside `std::panicking::panic_with_hook` at RUSTLIB/std/src/panicking.rs:LL:CC
|
||||
= note: inside closure at RUSTLIB/std/src/panicking.rs:LL:CC
|
||||
= note: inside `std::sys::backtrace::__rust_end_short_backtrace::<{closure@std::panicking::panic_handler::{closure#0}}, !>` at RUSTLIB/std/src/sys/backtrace.rs:LL:CC
|
||||
|
|
@ -27,7 +26,7 @@ note: inside `main`
|
|||
--> tests/fail/panic/abort_unwind.rs:LL:CC
|
||||
|
|
||||
LL | std::panic::abort_unwind(|| panic!("PANIC!!!"));
|
||||
| ^
|
||||
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||
|
||||
note: some details are omitted, run with `MIRIFLAGS=-Zmiri-backtrace=full` for a verbose backtrace
|
||||
|
||||
|
|
|
|||
|
|
@ -1,5 +1,3 @@
|
|||
//@normalize-stderr-test: "\|.*::abort\(\).*" -> "| ABORT()"
|
||||
//@normalize-stderr-test: "\| +\^+" -> "| ^"
|
||||
//@normalize-stderr-test: "\n +[0-9]+:[^\n]+" -> ""
|
||||
//@normalize-stderr-test: "\n +at [^\n]+" -> ""
|
||||
//@error-in-other-file: aborted execution
|
||||
|
|
|
|||
|
|
@ -12,13 +12,12 @@ thread 'main' ($TID) panicked at RUSTLIB/core/src/panicking.rs:LL:CC:
|
|||
panic in a destructor during cleanup
|
||||
thread caused non-unwinding panic. aborting.
|
||||
error: abnormal termination: the program aborted execution
|
||||
--> RUSTLIB/std/src/sys/pal/PLATFORM/mod.rs:LL:CC
|
||||
--> RUSTLIB/std/src/panicking.rs:LL:CC
|
||||
|
|
||||
LL | ABORT()
|
||||
| ^ abnormal termination occurred here
|
||||
LL | crate::process::abort();
|
||||
| ^^^^^^^^^^^^^^^^^^^^^^^ abnormal termination occurred here
|
||||
|
|
||||
= note: BACKTRACE:
|
||||
= note: inside `std::sys::pal::PLATFORM::abort_internal` at RUSTLIB/std/src/sys/pal/PLATFORM/mod.rs:LL:CC
|
||||
= note: inside `std::panicking::panic_with_hook` at RUSTLIB/std/src/panicking.rs:LL:CC
|
||||
= note: inside closure at RUSTLIB/std/src/panicking.rs:LL:CC
|
||||
= note: inside `std::sys::backtrace::__rust_end_short_backtrace::<{closure@std::panicking::panic_handler::{closure#0}}, !>` at RUSTLIB/std/src/sys/backtrace.rs:LL:CC
|
||||
|
|
|
|||
|
|
@ -1,6 +1,4 @@
|
|||
//@error-in-other-file: the program aborted execution
|
||||
//@normalize-stderr-test: "\| +\^+" -> "| ^"
|
||||
//@normalize-stderr-test: "\|.*::abort\(\).*" -> "| ABORT()"
|
||||
//@compile-flags: -C panic=abort
|
||||
|
||||
fn main() {
|
||||
|
|
|
|||
|
|
@ -4,14 +4,12 @@ panicking from libstd
|
|||
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace
|
||||
note: in Miri, you may have to set `MIRIFLAGS=-Zmiri-env-forward=RUST_BACKTRACE` for the environment variable to have an effect
|
||||
error: abnormal termination: the program aborted execution
|
||||
--> RUSTLIB/std/src/sys/pal/PLATFORM/mod.rs:LL:CC
|
||||
--> RUSTLIB/std/src/rt.rs:LL:CC
|
||||
|
|
||||
LL | ABORT()
|
||||
| ^ abnormal termination occurred here
|
||||
LL | crate::process::abort();
|
||||
| ^^^^^^^^^^^^^^^^^^^^^^^ abnormal termination occurred here
|
||||
|
|
||||
= note: BACKTRACE:
|
||||
= note: inside `std::sys::pal::PLATFORM::abort_internal` at RUSTLIB/std/src/sys/pal/PLATFORM/mod.rs:LL:CC
|
||||
= note: inside `std::process::abort` at RUSTLIB/std/src/process.rs:LL:CC
|
||||
= note: inside `std::rt::__rust_abort` at RUSTLIB/std/src/rt.rs:LL:CC
|
||||
= note: inside `panic_abort::__rust_start_panic` at RUSTLIB/panic_abort/src/lib.rs:LL:CC
|
||||
= note: inside `std::panicking::rust_panic` at RUSTLIB/std/src/panicking.rs:LL:CC
|
||||
|
|
@ -23,7 +21,7 @@ note: inside `main`
|
|||
--> tests/fail/panic/panic_abort1.rs:LL:CC
|
||||
|
|
||||
LL | std::panic!("panicking from libstd");
|
||||
| ^
|
||||
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||
|
||||
note: some details are omitted, run with `MIRIFLAGS=-Zmiri-backtrace=full` for a verbose backtrace
|
||||
|
||||
|
|
|
|||
|
|
@ -1,6 +1,4 @@
|
|||
//@error-in-other-file: the program aborted execution
|
||||
//@normalize-stderr-test: "\| +\^+" -> "| ^"
|
||||
//@normalize-stderr-test: "\|.*::abort\(\).*" -> "| ABORT()"
|
||||
//@compile-flags: -C panic=abort
|
||||
|
||||
fn main() {
|
||||
|
|
|
|||
|
|
@ -4,14 +4,12 @@ thread 'main' ($TID) panicked at tests/fail/panic/panic_abort2.rs:LL:CC:
|
|||
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace
|
||||
note: in Miri, you may have to set `MIRIFLAGS=-Zmiri-env-forward=RUST_BACKTRACE` for the environment variable to have an effect
|
||||
error: abnormal termination: the program aborted execution
|
||||
--> RUSTLIB/std/src/sys/pal/PLATFORM/mod.rs:LL:CC
|
||||
--> RUSTLIB/std/src/rt.rs:LL:CC
|
||||
|
|
||||
LL | ABORT()
|
||||
| ^ abnormal termination occurred here
|
||||
LL | crate::process::abort();
|
||||
| ^^^^^^^^^^^^^^^^^^^^^^^ abnormal termination occurred here
|
||||
|
|
||||
= note: BACKTRACE:
|
||||
= note: inside `std::sys::pal::PLATFORM::abort_internal` at RUSTLIB/std/src/sys/pal/PLATFORM/mod.rs:LL:CC
|
||||
= note: inside `std::process::abort` at RUSTLIB/std/src/process.rs:LL:CC
|
||||
= note: inside `std::rt::__rust_abort` at RUSTLIB/std/src/rt.rs:LL:CC
|
||||
= note: inside `panic_abort::__rust_start_panic` at RUSTLIB/panic_abort/src/lib.rs:LL:CC
|
||||
= note: inside `std::panicking::rust_panic` at RUSTLIB/std/src/panicking.rs:LL:CC
|
||||
|
|
@ -23,7 +21,7 @@ note: inside `main`
|
|||
--> tests/fail/panic/panic_abort2.rs:LL:CC
|
||||
|
|
||||
LL | std::panic!("{}-panicking from libstd", 42);
|
||||
| ^
|
||||
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||
|
||||
note: some details are omitted, run with `MIRIFLAGS=-Zmiri-backtrace=full` for a verbose backtrace
|
||||
|
||||
|
|
|
|||
|
|
@ -1,6 +1,4 @@
|
|||
//@error-in-other-file: the program aborted execution
|
||||
//@normalize-stderr-test: "\| +\^+" -> "| ^"
|
||||
//@normalize-stderr-test: "\|.*::abort\(\).*" -> "| ABORT()"
|
||||
//@compile-flags: -C panic=abort
|
||||
|
||||
fn main() {
|
||||
|
|
|
|||
|
|
@ -4,14 +4,12 @@ panicking from libcore
|
|||
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace
|
||||
note: in Miri, you may have to set `MIRIFLAGS=-Zmiri-env-forward=RUST_BACKTRACE` for the environment variable to have an effect
|
||||
error: abnormal termination: the program aborted execution
|
||||
--> RUSTLIB/std/src/sys/pal/PLATFORM/mod.rs:LL:CC
|
||||
--> RUSTLIB/std/src/rt.rs:LL:CC
|
||||
|
|
||||
LL | ABORT()
|
||||
| ^ abnormal termination occurred here
|
||||
LL | crate::process::abort();
|
||||
| ^^^^^^^^^^^^^^^^^^^^^^^ abnormal termination occurred here
|
||||
|
|
||||
= note: BACKTRACE:
|
||||
= note: inside `std::sys::pal::PLATFORM::abort_internal` at RUSTLIB/std/src/sys/pal/PLATFORM/mod.rs:LL:CC
|
||||
= note: inside `std::process::abort` at RUSTLIB/std/src/process.rs:LL:CC
|
||||
= note: inside `std::rt::__rust_abort` at RUSTLIB/std/src/rt.rs:LL:CC
|
||||
= note: inside `panic_abort::__rust_start_panic` at RUSTLIB/panic_abort/src/lib.rs:LL:CC
|
||||
= note: inside `std::panicking::rust_panic` at RUSTLIB/std/src/panicking.rs:LL:CC
|
||||
|
|
@ -23,7 +21,7 @@ note: inside `main`
|
|||
--> tests/fail/panic/panic_abort3.rs:LL:CC
|
||||
|
|
||||
LL | core::panic!("panicking from libcore");
|
||||
| ^
|
||||
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||
|
||||
note: some details are omitted, run with `MIRIFLAGS=-Zmiri-backtrace=full` for a verbose backtrace
|
||||
|
||||
|
|
|
|||
|
|
@ -1,6 +1,4 @@
|
|||
//@error-in-other-file: the program aborted execution
|
||||
//@normalize-stderr-test: "\| +\^+" -> "| ^"
|
||||
//@normalize-stderr-test: "\|.*::abort\(\).*" -> "| ABORT()"
|
||||
//@compile-flags: -C panic=abort
|
||||
|
||||
fn main() {
|
||||
|
|
|
|||
|
|
@ -4,14 +4,12 @@ thread 'main' ($TID) panicked at tests/fail/panic/panic_abort4.rs:LL:CC:
|
|||
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace
|
||||
note: in Miri, you may have to set `MIRIFLAGS=-Zmiri-env-forward=RUST_BACKTRACE` for the environment variable to have an effect
|
||||
error: abnormal termination: the program aborted execution
|
||||
--> RUSTLIB/std/src/sys/pal/PLATFORM/mod.rs:LL:CC
|
||||
--> RUSTLIB/std/src/rt.rs:LL:CC
|
||||
|
|
||||
LL | ABORT()
|
||||
| ^ abnormal termination occurred here
|
||||
LL | crate::process::abort();
|
||||
| ^^^^^^^^^^^^^^^^^^^^^^^ abnormal termination occurred here
|
||||
|
|
||||
= note: BACKTRACE:
|
||||
= note: inside `std::sys::pal::PLATFORM::abort_internal` at RUSTLIB/std/src/sys/pal/PLATFORM/mod.rs:LL:CC
|
||||
= note: inside `std::process::abort` at RUSTLIB/std/src/process.rs:LL:CC
|
||||
= note: inside `std::rt::__rust_abort` at RUSTLIB/std/src/rt.rs:LL:CC
|
||||
= note: inside `panic_abort::__rust_start_panic` at RUSTLIB/panic_abort/src/lib.rs:LL:CC
|
||||
= note: inside `std::panicking::rust_panic` at RUSTLIB/std/src/panicking.rs:LL:CC
|
||||
|
|
@ -23,7 +21,7 @@ note: inside `main`
|
|||
--> tests/fail/panic/panic_abort4.rs:LL:CC
|
||||
|
|
||||
LL | core::panic!("{}-panicking from libcore", 42);
|
||||
| ^
|
||||
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||
|
||||
note: some details are omitted, run with `MIRIFLAGS=-Zmiri-backtrace=full` for a verbose backtrace
|
||||
|
||||
|
|
|
|||
|
|
@ -1,7 +1,5 @@
|
|||
//! This is a regression test for <https://github.com/rust-lang/miri/issues/4188>: The precondition
|
||||
//! check in `ptr::swap_nonoverlapping` was incorrectly disabled in Miri.
|
||||
//@normalize-stderr-test: "\|.*::abort\(\).*" -> "| ABORT()"
|
||||
//@normalize-stderr-test: "\| +\^+" -> "| ^"
|
||||
//@normalize-stderr-test: "\n +[0-9]+:[^\n]+" -> ""
|
||||
//@normalize-stderr-test: "\n +at [^\n]+" -> ""
|
||||
//@error-in-other-file: aborted execution
|
||||
|
|
|
|||
|
|
@ -7,13 +7,12 @@ note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace
|
|||
note: in Miri, you may have to set `MIRIFLAGS=-Zmiri-env-forward=RUST_BACKTRACE` for the environment variable to have an effect
|
||||
thread caused non-unwinding panic. aborting.
|
||||
error: abnormal termination: the program aborted execution
|
||||
--> RUSTLIB/std/src/sys/pal/PLATFORM/mod.rs:LL:CC
|
||||
--> RUSTLIB/std/src/panicking.rs:LL:CC
|
||||
|
|
||||
LL | ABORT()
|
||||
| ^ abnormal termination occurred here
|
||||
LL | crate::process::abort();
|
||||
| ^^^^^^^^^^^^^^^^^^^^^^^ abnormal termination occurred here
|
||||
|
|
||||
= note: BACKTRACE:
|
||||
= note: inside `std::sys::pal::PLATFORM::abort_internal` at RUSTLIB/std/src/sys/pal/PLATFORM/mod.rs:LL:CC
|
||||
= note: inside `std::panicking::panic_with_hook` at RUSTLIB/std/src/panicking.rs:LL:CC
|
||||
= note: inside closure at RUSTLIB/std/src/panicking.rs:LL:CC
|
||||
= note: inside `std::sys::backtrace::__rust_end_short_backtrace::<{closure@std::panicking::panic_handler::{closure#0}}, !>` at RUSTLIB/std/src/sys/backtrace.rs:LL:CC
|
||||
|
|
@ -22,7 +21,7 @@ note: inside `main`
|
|||
--> tests/fail/ptr_swap_nonoverlapping.rs:LL:CC
|
||||
|
|
||||
LL | std::ptr::swap_nonoverlapping(ptr, ptr, 1);
|
||||
| ^
|
||||
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||
|
||||
note: some details are omitted, run with `MIRIFLAGS=-Zmiri-backtrace=full` for a verbose backtrace
|
||||
|
||||
|
|
|
|||
|
|
@ -1,6 +1,4 @@
|
|||
//@compile-flags: -Zmir-opt-level=3 -Zinline-mir-hint-threshold=1000
|
||||
//@normalize-stderr-test: "\|.*::abort\(\).*" -> "| ABORT()"
|
||||
//@normalize-stderr-test: "\| +\^+" -> "| ^"
|
||||
//@normalize-stderr-test: "\n +[0-9]+:[^\n]+" -> ""
|
||||
//@normalize-stderr-test: "\n +at [^\n]+" -> ""
|
||||
//@error-in-other-file: aborted execution
|
||||
|
|
|
|||
|
|
@ -11,13 +11,12 @@ panic in a function that cannot unwind
|
|||
stack backtrace:
|
||||
thread caused non-unwinding panic. aborting.
|
||||
error: abnormal termination: the program aborted execution
|
||||
--> RUSTLIB/std/src/sys/pal/PLATFORM/mod.rs:LL:CC
|
||||
--> RUSTLIB/std/src/panicking.rs:LL:CC
|
||||
|
|
||||
LL | ABORT()
|
||||
| ^ abnormal termination occurred here
|
||||
LL | crate::process::abort();
|
||||
| ^^^^^^^^^^^^^^^^^^^^^^^ abnormal termination occurred here
|
||||
|
|
||||
= note: BACKTRACE:
|
||||
= note: inside `std::sys::pal::PLATFORM::abort_internal` at RUSTLIB/std/src/sys/pal/PLATFORM/mod.rs:LL:CC
|
||||
= note: inside `std::panicking::panic_with_hook` at RUSTLIB/std/src/panicking.rs:LL:CC
|
||||
= note: inside closure at RUSTLIB/std/src/panicking.rs:LL:CC
|
||||
= note: inside `std::sys::backtrace::__rust_end_short_backtrace::<{closure@std::panicking::panic_handler::{closure#0}}, !>` at RUSTLIB/std/src/sys/backtrace.rs:LL:CC
|
||||
|
|
@ -36,12 +35,12 @@ note: inside `panic_abort`
|
|||
--> tests/fail/terminate-terminator.rs:LL:CC
|
||||
|
|
||||
LL | has_cleanup();
|
||||
| ^
|
||||
| ^^^^^^^^^^^^^
|
||||
note: inside `main`
|
||||
--> tests/fail/terminate-terminator.rs:LL:CC
|
||||
|
|
||||
LL | panic_abort();
|
||||
| ^
|
||||
| ^^^^^^^^^^^^^
|
||||
|
||||
note: some details are omitted, run with `MIRIFLAGS=-Zmiri-backtrace=full` for a verbose backtrace
|
||||
|
||||
|
|
|
|||
|
|
@ -1,6 +1,4 @@
|
|||
//@error-in-other-file: aborted execution
|
||||
//@normalize-stderr-test: "\|.*::abort\(\).*" -> "| ABORT()"
|
||||
//@normalize-stderr-test: "\| +\^+" -> "| ^"
|
||||
//@normalize-stderr-test: "\n +[0-9]+:[^\n]+" -> ""
|
||||
//@normalize-stderr-test: "\n +at [^\n]+" -> ""
|
||||
extern "C" fn panic_abort() {
|
||||
|
|
|
|||
|
|
@ -9,13 +9,12 @@ panic in a function that cannot unwind
|
|||
stack backtrace:
|
||||
thread caused non-unwinding panic. aborting.
|
||||
error: abnormal termination: the program aborted execution
|
||||
--> RUSTLIB/std/src/sys/pal/PLATFORM/mod.rs:LL:CC
|
||||
--> RUSTLIB/std/src/panicking.rs:LL:CC
|
||||
|
|
||||
LL | ABORT()
|
||||
| ^ abnormal termination occurred here
|
||||
LL | crate::process::abort();
|
||||
| ^^^^^^^^^^^^^^^^^^^^^^^ abnormal termination occurred here
|
||||
|
|
||||
= note: BACKTRACE:
|
||||
= note: inside `std::sys::pal::PLATFORM::abort_internal` at RUSTLIB/std/src/sys/pal/PLATFORM/mod.rs:LL:CC
|
||||
= note: inside `std::panicking::panic_with_hook` at RUSTLIB/std/src/panicking.rs:LL:CC
|
||||
= note: inside closure at RUSTLIB/std/src/panicking.rs:LL:CC
|
||||
= note: inside `std::sys::backtrace::__rust_end_short_backtrace::<{closure@std::panicking::panic_handler::{closure#0}}, !>` at RUSTLIB/std/src/sys/backtrace.rs:LL:CC
|
||||
|
|
@ -33,7 +32,7 @@ note: inside `main`
|
|||
--> tests/fail/unwind-action-terminate.rs:LL:CC
|
||||
|
|
||||
LL | panic_abort();
|
||||
| ^
|
||||
| ^^^^^^^^^^^^^
|
||||
|
||||
note: some details are omitted, run with `MIRIFLAGS=-Zmiri-backtrace=full` for a verbose backtrace
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue