paper over platform differences

This commit is contained in:
Ralf Jung 2022-05-31 19:00:14 -04:00
parent 9a448744a2
commit 8997db2ec9
12 changed files with 30 additions and 18 deletions

View File

@ -3,6 +3,8 @@
// error-pattern: which is Rust heap memory, using
// normalize-stderr-test: "using [A-Za-z]+ heap deallocation operation" -> "using PLATFORM heap deallocation operation"
// normalize-stderr-test: "\| +\^+" -> "| ^"
// normalize-stderr-test: "libc::free\([^()]*\)|unsafe \{ HeapFree\([^()]*\) \};" -> "FREE();"
#![feature(allocator_api, slice_ptr_get)]

View File

@ -1,8 +1,8 @@
error: Undefined Behavior: deallocating ALLOC, which is Rust heap memory, using PLATFORM heap deallocation operation
--> RUSTLIB/std/src/sys/PLATFORM/alloc.rs:LL:CC
|
LL | libc::free(ptr as *mut libc::c_void)
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ deallocating ALLOC, which is Rust heap memory, using PLATFORM heap deallocation operation
LL | FREE();
| ^ deallocating ALLOC, which is Rust heap memory, using PLATFORM heap deallocation operation
|
= 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
@ -13,7 +13,7 @@ note: inside `main` at $DIR/global_system_mixup.rs:LL:CC
--> $DIR/global_system_mixup.rs:LL:CC
|
LL | unsafe { System.deallocate(ptr, l); }
| ^^^^^^^^^^^^^^^^^^^^^^^^^
| ^
note: some details are omitted, run with `MIRIFLAGS=-Zmiri-backtrace=full` for a verbose backtrace

View File

@ -1,4 +1,6 @@
// error-pattern: the program aborted
// normalize-stderr-test: "\| +\^+" -> "| ^"
// normalize-stderr-test: "unsafe \{ libc::abort\(\) \}|crate::intrinsics::abort\(\);" -> "ABORT();"
struct Foo;
impl Drop for Foo {

View File

@ -68,8 +68,8 @@ thread panicked while panicking. aborting.
error: abnormal termination: the program aborted execution
--> RUSTLIB/std/src/sys/PLATFORM/mod.rs:LL:CC
|
LL | unsafe { libc::abort() }
| ^^^^^^^^^^^^^ the program aborted execution
LL | ABORT();
| ^ the program aborted execution
|
= note: inside `std::sys::PLATFORM::abort_internal` at RUSTLIB/std/src/sys/PLATFORM/mod.rs:LL:CC
= note: inside `std::panicking::rust_panic_with_hook` at RUSTLIB/std/src/panicking.rs:LL:CC
@ -80,7 +80,7 @@ note: inside `<Foo as std::ops::Drop>::drop` at RUSTLIB/std/src/panic.rs:LL:CC
--> $DIR/double_panic.rs:LL:CC
|
LL | panic!("second");
| ^^^^^^^^^^^^^^^^
| ^
= note: inside `std::ptr::drop_in_place::<Foo> - shim(Some(Foo))` at RUSTLIB/core/src/ptr/mod.rs:LL:CC
note: inside `main` at $DIR/double_panic.rs:LL:CC
--> $DIR/double_panic.rs:LL:CC

View File

@ -1,4 +1,6 @@
// error-pattern: the program aborted execution
// normalize-stderr-test: "\| +\^+" -> "| ^"
// normalize-stderr-test: "libc::abort\(\);|core::intrinsics::abort\(\);" -> "ABORT();"
// compile-flags: -C panic=abort
fn main() {

View File

@ -3,8 +3,8 @@ note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace
error: abnormal termination: the program aborted execution
--> RUSTLIB/panic_abort/src/lib.rs:LL:CC
|
LL | libc::abort();
| ^^^^^^^^^^^^^ the program aborted execution
LL | ABORT();
| ^ the program aborted execution
|
= note: inside `panic_abort::__rust_start_panic::abort` at RUSTLIB/panic_abort/src/lib.rs:LL:CC
= note: inside `panic_abort::__rust_start_panic` at RUSTLIB/panic_abort/src/lib.rs:LL:CC
@ -17,7 +17,7 @@ note: inside `main` at RUSTLIB/std/src/panic.rs:LL:CC
--> $DIR/panic_abort1.rs:LL:CC
|
LL | std::panic!("panicking from libstd");
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
| ^
= note: this error originates in the macro `$crate::panic::panic_2015` (in Nightly builds, run with -Z macro-backtrace for more info)
note: some details are omitted, run with `MIRIFLAGS=-Zmiri-backtrace=full` for a verbose backtrace

View File

@ -1,4 +1,6 @@
// error-pattern: the program aborted execution
// normalize-stderr-test: "\| +\^+" -> "| ^"
// normalize-stderr-test: "libc::abort\(\);|core::intrinsics::abort\(\);" -> "ABORT();"
// compile-flags: -C panic=abort
fn main() {

View File

@ -3,8 +3,8 @@ note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace
error: abnormal termination: the program aborted execution
--> RUSTLIB/panic_abort/src/lib.rs:LL:CC
|
LL | libc::abort();
| ^^^^^^^^^^^^^ the program aborted execution
LL | ABORT();
| ^ the program aborted execution
|
= note: inside `panic_abort::__rust_start_panic::abort` at RUSTLIB/panic_abort/src/lib.rs:LL:CC
= note: inside `panic_abort::__rust_start_panic` at RUSTLIB/panic_abort/src/lib.rs:LL:CC
@ -18,7 +18,7 @@ note: inside `main` at RUSTLIB/std/src/panic.rs:LL:CC
--> $DIR/panic_abort2.rs:LL:CC
|
LL | std::panic!("{}-panicking from libstd", 42);
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
| ^
= note: this error originates in the macro `$crate::panic::panic_2015` (in Nightly builds, run with -Z macro-backtrace for more info)
note: some details are omitted, run with `MIRIFLAGS=-Zmiri-backtrace=full` for a verbose backtrace

View File

@ -1,4 +1,6 @@
// error-pattern: the program aborted execution
// normalize-stderr-test: "\| +\^+" -> "| ^"
// normalize-stderr-test: "libc::abort\(\);|core::intrinsics::abort\(\);" -> "ABORT();"
// compile-flags: -C panic=abort
fn main() {

View File

@ -3,8 +3,8 @@ note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace
error: abnormal termination: the program aborted execution
--> RUSTLIB/panic_abort/src/lib.rs:LL:CC
|
LL | libc::abort();
| ^^^^^^^^^^^^^ the program aborted execution
LL | ABORT();
| ^ the program aborted execution
|
= note: inside `panic_abort::__rust_start_panic::abort` at RUSTLIB/panic_abort/src/lib.rs:LL:CC
= note: inside `panic_abort::__rust_start_panic` at RUSTLIB/panic_abort/src/lib.rs:LL:CC
@ -19,7 +19,7 @@ note: inside `main` at RUSTLIB/core/src/panic.rs:LL:CC
--> $DIR/panic_abort3.rs:LL:CC
|
LL | core::panic!("panicking from libcore");
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
| ^
= note: this error originates in the macro `$crate::panic::panic_2015` (in Nightly builds, run with -Z macro-backtrace for more info)
note: some details are omitted, run with `MIRIFLAGS=-Zmiri-backtrace=full` for a verbose backtrace

View File

@ -1,4 +1,6 @@
// error-pattern: the program aborted execution
// normalize-stderr-test: "\| +\^+" -> "| ^"
// normalize-stderr-test: "libc::abort\(\);|core::intrinsics::abort\(\);" -> "ABORT();"
// compile-flags: -C panic=abort
fn main() {

View File

@ -3,8 +3,8 @@ note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace
error: abnormal termination: the program aborted execution
--> RUSTLIB/panic_abort/src/lib.rs:LL:CC
|
LL | libc::abort();
| ^^^^^^^^^^^^^ the program aborted execution
LL | ABORT();
| ^ the program aborted execution
|
= note: inside `panic_abort::__rust_start_panic::abort` at RUSTLIB/panic_abort/src/lib.rs:LL:CC
= note: inside `panic_abort::__rust_start_panic` at RUSTLIB/panic_abort/src/lib.rs:LL:CC
@ -18,7 +18,7 @@ note: inside `main` at RUSTLIB/core/src/panic.rs:LL:CC
--> $DIR/panic_abort4.rs:LL:CC
|
LL | core::panic!("{}-panicking from libcore", 42);
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
| ^
= note: this error originates in the macro `$crate::panic::panic_2015` (in Nightly builds, run with -Z macro-backtrace for more info)
note: some details are omitted, run with `MIRIFLAGS=-Zmiri-backtrace=full` for a verbose backtrace