diff --git a/Cargo.lock b/Cargo.lock index e4bfd9bd12..e4ff63ce72 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -39,22 +39,19 @@ dependencies = [ [[package]] name = "annotate-snippets" -version = "0.9.2" +version = "0.11.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ccaf7e9dfbb6ab22c82e473cd1a8a7bd313c19a5b7e40970f3d89ef5a5c9e81e" +checksum = "24e35ed54e5ea7997c14ed4c70ba043478db1112e98263b3b035907aa197d991" dependencies = [ + "anstyle", "unicode-width", - "yansi-term", ] [[package]] -name = "ansi_term" -version = "0.12.1" +name = "anstyle" +version = "1.0.8" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d52a9bb7ec0cf484c551830a7ce27bd20d67eac647e1befb56b0be4ee39a55d2" -dependencies = [ - "winapi", -] +checksum = "1bec1de6f59aedf83baf9ff929c98f2ad654b97c9510f4e70cf6f661d49fd5b1" [[package]] name = "anyhow" @@ -126,9 +123,9 @@ dependencies = [ [[package]] name = "cargo_metadata" -version = "0.15.4" +version = "0.18.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "eee4243f1f26fc7a42710e7439c149e2b10b05472f88090acce52632f231a73a" +checksum = "2d886547e41f740c616ae73108f6eb70afe6d940c7bc697cb30f13daec073037" dependencies = [ "camino", "cargo-platform", @@ -262,6 +259,19 @@ dependencies = [ "libc", ] +[[package]] +name = "crossbeam" +version = "0.8.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1137cd7e7fc0fb5d3c5a8678be38ec56e819125d8d7907411fe24ccb943faca8" +dependencies = [ + "crossbeam-channel", + "crossbeam-deque", + "crossbeam-epoch", + "crossbeam-queue", + "crossbeam-utils", +] + [[package]] name = "crossbeam-channel" version = "0.5.13" @@ -271,6 +281,34 @@ dependencies = [ "crossbeam-utils", ] +[[package]] +name = "crossbeam-deque" +version = "0.8.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "613f8cc01fe9cf1a3eb3d7f488fd2fa8388403e97039e2f73692932e291a770d" +dependencies = [ + "crossbeam-epoch", + "crossbeam-utils", +] + +[[package]] +name = "crossbeam-epoch" +version = "0.9.18" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5b82ac4a3c2ca9c3460964f020e1402edd5753411d7737aa39c3714ad1b5420e" +dependencies = [ + "crossbeam-utils", +] + +[[package]] +name = "crossbeam-queue" +version = "0.3.11" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "df0346b5d5e76ac2fe4e327c5fd1118d6be7c51dfb18f9b7922923f287471e35" +dependencies = [ + "crossbeam-utils", +] + [[package]] name = "crossbeam-utils" version = "0.8.20" @@ -555,6 +593,7 @@ dependencies = [ "chrono", "chrono-tz", "colored", + "crossbeam", "ctrlc", "directories", "getrandom", @@ -737,11 +776,11 @@ dependencies = [ [[package]] name = "prettydiff" -version = "0.6.4" +version = "0.7.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8ff1fec61082821f8236cf6c0c14e8172b62ce8a72a0eedc30d3b247bb68dc11" +checksum = "abec3fb083c10660b3854367697da94c674e9e82aa7511014dc958beeb7215e9" dependencies = [ - "ansi_term", + "owo-colors", "pad", ] @@ -865,14 +904,14 @@ dependencies = [ [[package]] name = "rustfix" -version = "0.6.1" +version = "0.8.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ecd2853d9e26988467753bd9912c3a126f642d05d229a4b53f5752ee36c56481" +checksum = "70f5b7fc8060f4f8373f9381a630304b42e1183535d9beb1d3f596b236c9106a" dependencies = [ - "anyhow", - "log", "serde", "serde_json", + "thiserror", + "tracing", ] [[package]] @@ -962,6 +1001,16 @@ version = "1.13.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "3c5e1a9a646d36c3599cd173a41282daf47c44583ad367b8e6837255952e5c67" +[[package]] +name = "spanned" +version = "0.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "86af297923fbcfd107c20a189a6e9c872160df71a7190ae4a7a6c5dce4b2feb6" +dependencies = [ + "bstr", + "color-eyre", +] + [[package]] name = "syn" version = "2.0.72" @@ -1065,9 +1114,9 @@ checksum = "42ff0bf0c66b8238c6f3b578df37d0b7848e55df8577b3f74f92a69acceeb825" [[package]] name = "ui_test" -version = "0.21.2" +version = "0.26.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "aaf4bf7c184b8dfc7a4d3b90df789b1eb992ee42811cd115f32a7a1eb781058d" +checksum = "fdbe981faae7583382bd2cb45692ffe80207166eca8ffe5bbdaaa3e25bb052d5" dependencies = [ "annotate-snippets", "anyhow", @@ -1087,7 +1136,7 @@ dependencies = [ "rustfix", "serde", "serde_json", - "tempfile", + "spanned", ] [[package]] @@ -1120,28 +1169,6 @@ version = "0.11.0+wasi-snapshot-preview1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "9c8d87e72b64a3b4db28d11ce29237c246188f4f51057d65a7eab63b7987e423" -[[package]] -name = "winapi" -version = "0.3.9" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5c839a674fcd7a98952e593242ea400abe93992746761e38641405d28b00f419" -dependencies = [ - "winapi-i686-pc-windows-gnu", - "winapi-x86_64-pc-windows-gnu", -] - -[[package]] -name = "winapi-i686-pc-windows-gnu" -version = "0.4.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ac3b87c63620426dd9b991e5ce0329eff545bccbbb34f3be09ff6fb6ab51b7b6" - -[[package]] -name = "winapi-x86_64-pc-windows-gnu" -version = "0.4.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "712e227841d057c1ee1cd2fb22fa7e5a5461ae8e48fa2ca79ec42cfc1931183f" - [[package]] name = "windows-sys" version = "0.48.0" @@ -1281,15 +1308,6 @@ version = "0.52.6" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "589f6da84c646204747d1270a2a5661ea66ed1cced2631d546fdfb155959f9ec" -[[package]] -name = "yansi-term" -version = "0.1.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fe5c30ade05e61656247b2e334a031dfd0cc466fadef865bdcdea8d537951bf1" -dependencies = [ - "winapi", -] - [[package]] name = "zerocopy" version = "0.7.35" diff --git a/Cargo.toml b/Cargo.toml index d8cfa5b886..dfb53bf8fa 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -27,6 +27,7 @@ ctrlc = "3.2.5" chrono = { version = "0.4.38", default-features = false } chrono-tz = "0.9" directories = "5" +crossbeam = "0.8.4" # Copied from `compiler/rustc/Cargo.toml`. # But only for some targets, it fails for others. Rustc configures this in its CI, but we can't @@ -49,7 +50,7 @@ windows-sys = { version = "0.52", features = [ [dev-dependencies] colored = "2" -ui_test = "0.21.1" +ui_test = "0.26.3" rustc_version = "0.4" regex = "1.5.5" tempfile = "3" diff --git a/tests/fail-dep/concurrency/apple_os_unfair_lock_assert_not_owner.rs b/tests/fail-dep/concurrency/apple_os_unfair_lock_assert_not_owner.rs index d6604f3713..1fa419a08d 100644 --- a/tests/fail-dep/concurrency/apple_os_unfair_lock_assert_not_owner.rs +++ b/tests/fail-dep/concurrency/apple_os_unfair_lock_assert_not_owner.rs @@ -1,4 +1,4 @@ -//@ only-target-darwin +//@ only-target: darwin use std::cell::UnsafeCell; diff --git a/tests/fail-dep/concurrency/apple_os_unfair_lock_assert_not_owner.stderr b/tests/fail-dep/concurrency/apple_os_unfair_lock_assert_not_owner.stderr index 7e890681c4..3fd02d38aa 100644 --- a/tests/fail-dep/concurrency/apple_os_unfair_lock_assert_not_owner.stderr +++ b/tests/fail-dep/concurrency/apple_os_unfair_lock_assert_not_owner.stderr @@ -1,11 +1,11 @@ error: abnormal termination: called os_unfair_lock_assert_not_owner on an os_unfair_lock owned by the current thread - --> $DIR/apple_os_unfair_lock_assert_not_owner.rs:LL:CC + --> tests/fail-dep/concurrency/apple_os_unfair_lock_assert_not_owner.rs:LL:CC | LL | libc::os_unfair_lock_assert_not_owner(lock.get()); | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ called os_unfair_lock_assert_not_owner on an os_unfair_lock owned by the current thread | = note: BACKTRACE: - = note: inside `main` at $DIR/apple_os_unfair_lock_assert_not_owner.rs:LL:CC + = note: inside `main` at tests/fail-dep/concurrency/apple_os_unfair_lock_assert_not_owner.rs:LL:CC note: some details are omitted, run with `MIRIFLAGS=-Zmiri-backtrace=full` for a verbose backtrace diff --git a/tests/fail-dep/concurrency/apple_os_unfair_lock_assert_owner.rs b/tests/fail-dep/concurrency/apple_os_unfair_lock_assert_owner.rs index ddd8b572ea..609e683c7f 100644 --- a/tests/fail-dep/concurrency/apple_os_unfair_lock_assert_owner.rs +++ b/tests/fail-dep/concurrency/apple_os_unfair_lock_assert_owner.rs @@ -1,4 +1,4 @@ -//@ only-target-darwin +//@ only-target: darwin use std::cell::UnsafeCell; diff --git a/tests/fail-dep/concurrency/apple_os_unfair_lock_assert_owner.stderr b/tests/fail-dep/concurrency/apple_os_unfair_lock_assert_owner.stderr index 3724f7996f..0b5dfe4ba6 100644 --- a/tests/fail-dep/concurrency/apple_os_unfair_lock_assert_owner.stderr +++ b/tests/fail-dep/concurrency/apple_os_unfair_lock_assert_owner.stderr @@ -1,11 +1,11 @@ error: abnormal termination: called os_unfair_lock_assert_owner on an os_unfair_lock not owned by the current thread - --> $DIR/apple_os_unfair_lock_assert_owner.rs:LL:CC + --> tests/fail-dep/concurrency/apple_os_unfair_lock_assert_owner.rs:LL:CC | LL | libc::os_unfair_lock_assert_owner(lock.get()); | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ called os_unfair_lock_assert_owner on an os_unfair_lock not owned by the current thread | = note: BACKTRACE: - = note: inside `main` at $DIR/apple_os_unfair_lock_assert_owner.rs:LL:CC + = note: inside `main` at tests/fail-dep/concurrency/apple_os_unfair_lock_assert_owner.rs:LL:CC note: some details are omitted, run with `MIRIFLAGS=-Zmiri-backtrace=full` for a verbose backtrace diff --git a/tests/fail-dep/concurrency/apple_os_unfair_lock_reentrant.rs b/tests/fail-dep/concurrency/apple_os_unfair_lock_reentrant.rs index eb98adeba0..d7003e0102 100644 --- a/tests/fail-dep/concurrency/apple_os_unfair_lock_reentrant.rs +++ b/tests/fail-dep/concurrency/apple_os_unfair_lock_reentrant.rs @@ -1,4 +1,4 @@ -//@ only-target-darwin +//@ only-target: darwin use std::cell::UnsafeCell; diff --git a/tests/fail-dep/concurrency/apple_os_unfair_lock_reentrant.stderr b/tests/fail-dep/concurrency/apple_os_unfair_lock_reentrant.stderr index 644462a1b0..3b02936b1f 100644 --- a/tests/fail-dep/concurrency/apple_os_unfair_lock_reentrant.stderr +++ b/tests/fail-dep/concurrency/apple_os_unfair_lock_reentrant.stderr @@ -1,11 +1,11 @@ error: abnormal termination: attempted to lock an os_unfair_lock that is already locked by the current thread - --> $DIR/apple_os_unfair_lock_reentrant.rs:LL:CC + --> tests/fail-dep/concurrency/apple_os_unfair_lock_reentrant.rs:LL:CC | LL | libc::os_unfair_lock_lock(lock.get()); | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ attempted to lock an os_unfair_lock that is already locked by the current thread | = note: BACKTRACE: - = note: inside `main` at $DIR/apple_os_unfair_lock_reentrant.rs:LL:CC + = note: inside `main` at tests/fail-dep/concurrency/apple_os_unfair_lock_reentrant.rs:LL:CC note: some details are omitted, run with `MIRIFLAGS=-Zmiri-backtrace=full` for a verbose backtrace diff --git a/tests/fail-dep/concurrency/apple_os_unfair_lock_unowned.rs b/tests/fail-dep/concurrency/apple_os_unfair_lock_unowned.rs index aed467552a..d6b739d91f 100644 --- a/tests/fail-dep/concurrency/apple_os_unfair_lock_unowned.rs +++ b/tests/fail-dep/concurrency/apple_os_unfair_lock_unowned.rs @@ -1,4 +1,4 @@ -//@ only-target-darwin +//@ only-target: darwin use std::cell::UnsafeCell; diff --git a/tests/fail-dep/concurrency/apple_os_unfair_lock_unowned.stderr b/tests/fail-dep/concurrency/apple_os_unfair_lock_unowned.stderr index 6a8d12fa80..192e1cdc47 100644 --- a/tests/fail-dep/concurrency/apple_os_unfair_lock_unowned.stderr +++ b/tests/fail-dep/concurrency/apple_os_unfair_lock_unowned.stderr @@ -1,11 +1,11 @@ error: abnormal termination: attempted to unlock an os_unfair_lock not owned by the current thread - --> $DIR/apple_os_unfair_lock_unowned.rs:LL:CC + --> tests/fail-dep/concurrency/apple_os_unfair_lock_unowned.rs:LL:CC | LL | libc::os_unfair_lock_unlock(lock.get()); | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ attempted to unlock an os_unfair_lock not owned by the current thread | = note: BACKTRACE: - = note: inside `main` at $DIR/apple_os_unfair_lock_unowned.rs:LL:CC + = note: inside `main` at tests/fail-dep/concurrency/apple_os_unfair_lock_unowned.rs:LL:CC note: some details are omitted, run with `MIRIFLAGS=-Zmiri-backtrace=full` for a verbose backtrace diff --git a/tests/fail-dep/concurrency/libc_pthread_cond_double_destroy.rs b/tests/fail-dep/concurrency/libc_pthread_cond_double_destroy.rs index f22f17be0d..590638c33b 100644 --- a/tests/fail-dep/concurrency/libc_pthread_cond_double_destroy.rs +++ b/tests/fail-dep/concurrency/libc_pthread_cond_double_destroy.rs @@ -1,4 +1,5 @@ -//@ignore-target-windows: No pthreads on Windows +// No pthreads on Windows +//@ignore-target: windows /// Test that destroying a pthread_cond twice fails, even without a check for number validity diff --git a/tests/fail-dep/concurrency/libc_pthread_cond_double_destroy.stderr b/tests/fail-dep/concurrency/libc_pthread_cond_double_destroy.stderr index 899c217efb..4cf1b4af12 100644 --- a/tests/fail-dep/concurrency/libc_pthread_cond_double_destroy.stderr +++ b/tests/fail-dep/concurrency/libc_pthread_cond_double_destroy.stderr @@ -1,5 +1,5 @@ error: Undefined Behavior: using uninitialized data, but this operation requires initialized memory - --> $DIR/libc_pthread_cond_double_destroy.rs:LL:CC + --> tests/fail-dep/concurrency/libc_pthread_cond_double_destroy.rs:LL:CC | LL | libc::pthread_cond_destroy(cond.as_mut_ptr()); | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ using uninitialized data, but this operation requires initialized memory @@ -7,7 +7,7 @@ LL | libc::pthread_cond_destroy(cond.as_mut_ptr()); = 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 = note: BACKTRACE: - = note: inside `main` at $DIR/libc_pthread_cond_double_destroy.rs:LL:CC + = note: inside `main` at tests/fail-dep/concurrency/libc_pthread_cond_double_destroy.rs:LL:CC note: some details are omitted, run with `MIRIFLAGS=-Zmiri-backtrace=full` for a verbose backtrace diff --git a/tests/fail-dep/concurrency/libc_pthread_condattr_double_destroy.rs b/tests/fail-dep/concurrency/libc_pthread_condattr_double_destroy.rs index d0ccab4de5..5ff075a2d6 100644 --- a/tests/fail-dep/concurrency/libc_pthread_condattr_double_destroy.rs +++ b/tests/fail-dep/concurrency/libc_pthread_condattr_double_destroy.rs @@ -1,5 +1,7 @@ -//@ignore-target-windows: No pthreads on Windows -//@ignore-target-apple: Our macOS condattr don't have any fields so we do not notice this. +// No pthreads on Windows +//@ignore-target: windows +// Our macOS condattr don't have any fields so we do not notice this. +//@ignore-target: apple /// Test that destroying a pthread_condattr twice fails, even without a check for number validity diff --git a/tests/fail-dep/concurrency/libc_pthread_condattr_double_destroy.stderr b/tests/fail-dep/concurrency/libc_pthread_condattr_double_destroy.stderr index ef75b03162..f2ddf9ae92 100644 --- a/tests/fail-dep/concurrency/libc_pthread_condattr_double_destroy.stderr +++ b/tests/fail-dep/concurrency/libc_pthread_condattr_double_destroy.stderr @@ -1,5 +1,5 @@ error: Undefined Behavior: using uninitialized data, but this operation requires initialized memory - --> $DIR/libc_pthread_condattr_double_destroy.rs:LL:CC + --> tests/fail-dep/concurrency/libc_pthread_condattr_double_destroy.rs:LL:CC | LL | libc::pthread_condattr_destroy(attr.as_mut_ptr()); | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ using uninitialized data, but this operation requires initialized memory @@ -7,7 +7,7 @@ LL | libc::pthread_condattr_destroy(attr.as_mut_ptr()); = 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 = note: BACKTRACE: - = note: inside `main` at $DIR/libc_pthread_condattr_double_destroy.rs:LL:CC + = note: inside `main` at tests/fail-dep/concurrency/libc_pthread_condattr_double_destroy.rs:LL:CC note: some details are omitted, run with `MIRIFLAGS=-Zmiri-backtrace=full` for a verbose backtrace diff --git a/tests/fail-dep/concurrency/libc_pthread_create_main_terminate.rs b/tests/fail-dep/concurrency/libc_pthread_create_main_terminate.rs index 9cd0a35d36..2014727a12 100644 --- a/tests/fail-dep/concurrency/libc_pthread_create_main_terminate.rs +++ b/tests/fail-dep/concurrency/libc_pthread_create_main_terminate.rs @@ -1,4 +1,5 @@ -//@ignore-target-windows: No pthreads on Windows +// No pthreads on Windows +//@ignore-target: windows //@error-in-other-file: the main thread terminated without waiting for all remaining threads // Check that we terminate the program when the main thread terminates. diff --git a/tests/fail-dep/concurrency/libc_pthread_create_too_few_args.rs b/tests/fail-dep/concurrency/libc_pthread_create_too_few_args.rs index 39b1c3007c..7c6bc91258 100644 --- a/tests/fail-dep/concurrency/libc_pthread_create_too_few_args.rs +++ b/tests/fail-dep/concurrency/libc_pthread_create_too_few_args.rs @@ -1,5 +1,6 @@ -//@ignore-target-windows: No pthreads on Windows -//~^ERROR: calling a function with more arguments than it expected +// No pthreads on Windows +//@ignore-target: windows +//~^^ERROR: calling a function with more arguments than it expected //! The thread function must have exactly one argument. diff --git a/tests/fail-dep/concurrency/libc_pthread_create_too_many_args.rs b/tests/fail-dep/concurrency/libc_pthread_create_too_many_args.rs index fc2ab71dff..13dc7c02af 100644 --- a/tests/fail-dep/concurrency/libc_pthread_create_too_many_args.rs +++ b/tests/fail-dep/concurrency/libc_pthread_create_too_many_args.rs @@ -1,5 +1,6 @@ -//@ignore-target-windows: No pthreads on Windows -//~^ERROR: calling a function with fewer arguments than it requires +// No pthreads on Windows +//@ignore-target: windows +//~^^ERROR: calling a function with fewer arguments than it requires //! The thread function must have exactly one argument. diff --git a/tests/fail-dep/concurrency/libc_pthread_join_detached.rs b/tests/fail-dep/concurrency/libc_pthread_join_detached.rs index e89d7a9f02..cdaf4f3ddb 100644 --- a/tests/fail-dep/concurrency/libc_pthread_join_detached.rs +++ b/tests/fail-dep/concurrency/libc_pthread_join_detached.rs @@ -1,4 +1,5 @@ -//@ignore-target-windows: No pthreads on Windows +// No pthreads on Windows +//@ignore-target: windows // Joining a detached thread is undefined behavior. diff --git a/tests/fail-dep/concurrency/libc_pthread_join_detached.stderr b/tests/fail-dep/concurrency/libc_pthread_join_detached.stderr index 7238dfb40b..327737a0b3 100644 --- a/tests/fail-dep/concurrency/libc_pthread_join_detached.stderr +++ b/tests/fail-dep/concurrency/libc_pthread_join_detached.stderr @@ -1,5 +1,5 @@ error: Undefined Behavior: trying to join a detached thread - --> $DIR/libc_pthread_join_detached.rs:LL:CC + --> tests/fail-dep/concurrency/libc_pthread_join_detached.rs:LL:CC | LL | assert_eq!(libc::pthread_join(native, ptr::null_mut()), 0); | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ trying to join a detached thread @@ -7,7 +7,7 @@ LL | assert_eq!(libc::pthread_join(native, ptr::null_mut()), 0); = 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 = note: BACKTRACE: - = note: inside `main` at $DIR/libc_pthread_join_detached.rs:LL:CC + = note: inside `main` at tests/fail-dep/concurrency/libc_pthread_join_detached.rs:LL:CC note: some details are omitted, run with `MIRIFLAGS=-Zmiri-backtrace=full` for a verbose backtrace diff --git a/tests/fail-dep/concurrency/libc_pthread_join_joined.rs b/tests/fail-dep/concurrency/libc_pthread_join_joined.rs index cbad743ca5..7588543408 100644 --- a/tests/fail-dep/concurrency/libc_pthread_join_joined.rs +++ b/tests/fail-dep/concurrency/libc_pthread_join_joined.rs @@ -1,4 +1,5 @@ -//@ignore-target-windows: No pthreads on Windows +// No pthreads on Windows +//@ignore-target: windows // Joining an already joined thread is undefined behavior. diff --git a/tests/fail-dep/concurrency/libc_pthread_join_joined.stderr b/tests/fail-dep/concurrency/libc_pthread_join_joined.stderr index e501a086cc..1dd1cb9f73 100644 --- a/tests/fail-dep/concurrency/libc_pthread_join_joined.stderr +++ b/tests/fail-dep/concurrency/libc_pthread_join_joined.stderr @@ -1,5 +1,5 @@ error: Undefined Behavior: trying to join an already joined thread - --> $DIR/libc_pthread_join_joined.rs:LL:CC + --> tests/fail-dep/concurrency/libc_pthread_join_joined.rs:LL:CC | LL | assert_eq!(libc::pthread_join(native, ptr::null_mut()), 0); | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ trying to join an already joined thread @@ -7,7 +7,7 @@ LL | assert_eq!(libc::pthread_join(native, ptr::null_mut()), 0); = 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 = note: BACKTRACE: - = note: inside `main` at $DIR/libc_pthread_join_joined.rs:LL:CC + = note: inside `main` at tests/fail-dep/concurrency/libc_pthread_join_joined.rs:LL:CC note: some details are omitted, run with `MIRIFLAGS=-Zmiri-backtrace=full` for a verbose backtrace diff --git a/tests/fail-dep/concurrency/libc_pthread_join_main.rs b/tests/fail-dep/concurrency/libc_pthread_join_main.rs index 002498e6c8..ce3ffb4798 100644 --- a/tests/fail-dep/concurrency/libc_pthread_join_main.rs +++ b/tests/fail-dep/concurrency/libc_pthread_join_main.rs @@ -1,4 +1,5 @@ -//@ignore-target-windows: No pthreads on Windows +// No pthreads on Windows +//@ignore-target: windows // Joining the main thread is undefined behavior. diff --git a/tests/fail-dep/concurrency/libc_pthread_join_main.stderr b/tests/fail-dep/concurrency/libc_pthread_join_main.stderr index e27e88dda2..b04a18561f 100644 --- a/tests/fail-dep/concurrency/libc_pthread_join_main.stderr +++ b/tests/fail-dep/concurrency/libc_pthread_join_main.stderr @@ -1,5 +1,5 @@ error: Undefined Behavior: trying to join a detached thread - --> $DIR/libc_pthread_join_main.rs:LL:CC + --> tests/fail-dep/concurrency/libc_pthread_join_main.rs:LL:CC | LL | assert_eq!(libc::pthread_join(thread_id, ptr::null_mut()), 0); | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ trying to join a detached thread @@ -7,7 +7,7 @@ LL | assert_eq!(libc::pthread_join(thread_id, ptr::null_mut()), 0); = 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 = note: BACKTRACE on thread `unnamed-ID`: - = note: inside closure at $DIR/libc_pthread_join_main.rs:LL:CC + = note: inside closure at tests/fail-dep/concurrency/libc_pthread_join_main.rs:LL:CC note: some details are omitted, run with `MIRIFLAGS=-Zmiri-backtrace=full` for a verbose backtrace diff --git a/tests/fail-dep/concurrency/libc_pthread_join_multiple.rs b/tests/fail-dep/concurrency/libc_pthread_join_multiple.rs index f5b687a623..ef5d8fc20b 100644 --- a/tests/fail-dep/concurrency/libc_pthread_join_multiple.rs +++ b/tests/fail-dep/concurrency/libc_pthread_join_multiple.rs @@ -1,4 +1,5 @@ -//@ignore-target-windows: No pthreads on Windows +// No pthreads on Windows +//@ignore-target: windows // Joining the same thread from multiple threads is undefined behavior. diff --git a/tests/fail-dep/concurrency/libc_pthread_join_multiple.stderr b/tests/fail-dep/concurrency/libc_pthread_join_multiple.stderr index 6a7b237e5b..1ada476811 100644 --- a/tests/fail-dep/concurrency/libc_pthread_join_multiple.stderr +++ b/tests/fail-dep/concurrency/libc_pthread_join_multiple.stderr @@ -1,5 +1,5 @@ error: Undefined Behavior: trying to join an already joined thread - --> $DIR/libc_pthread_join_multiple.rs:LL:CC + --> tests/fail-dep/concurrency/libc_pthread_join_multiple.rs:LL:CC | LL | ... assert_eq!(libc::pthread_join(native_copy, ptr::null_mut()), 0); | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ trying to join an already joined thread @@ -7,7 +7,7 @@ LL | ... assert_eq!(libc::pthread_join(native_copy, ptr::null_mut()), 0); = 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 = note: BACKTRACE on thread `unnamed-ID`: - = note: inside closure at $DIR/libc_pthread_join_multiple.rs:LL:CC + = note: inside closure at tests/fail-dep/concurrency/libc_pthread_join_multiple.rs:LL:CC note: some details are omitted, run with `MIRIFLAGS=-Zmiri-backtrace=full` for a verbose backtrace diff --git a/tests/fail-dep/concurrency/libc_pthread_join_self.rs b/tests/fail-dep/concurrency/libc_pthread_join_self.rs index 4bc1c82a25..5ca217eef9 100644 --- a/tests/fail-dep/concurrency/libc_pthread_join_self.rs +++ b/tests/fail-dep/concurrency/libc_pthread_join_self.rs @@ -1,4 +1,5 @@ -//@ignore-target-windows: No pthreads on Windows +// No pthreads on Windows +//@ignore-target: windows // We are making scheduler assumptions here. //@compile-flags: -Zmiri-preemption-rate=0 diff --git a/tests/fail-dep/concurrency/libc_pthread_join_self.stderr b/tests/fail-dep/concurrency/libc_pthread_join_self.stderr index 258c5f26c7..6aa85086a8 100644 --- a/tests/fail-dep/concurrency/libc_pthread_join_self.stderr +++ b/tests/fail-dep/concurrency/libc_pthread_join_self.stderr @@ -1,5 +1,5 @@ error: Undefined Behavior: trying to join itself - --> $DIR/libc_pthread_join_self.rs:LL:CC + --> tests/fail-dep/concurrency/libc_pthread_join_self.rs:LL:CC | LL | assert_eq!(libc::pthread_join(native, ptr::null_mut()), 0); | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ trying to join itself @@ -7,7 +7,7 @@ LL | assert_eq!(libc::pthread_join(native, ptr::null_mut()), 0); = 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 = note: BACKTRACE on thread `unnamed-ID`: - = note: inside closure at $DIR/libc_pthread_join_self.rs:LL:CC + = note: inside closure at tests/fail-dep/concurrency/libc_pthread_join_self.rs:LL:CC note: some details are omitted, run with `MIRIFLAGS=-Zmiri-backtrace=full` for a verbose backtrace diff --git a/tests/fail-dep/concurrency/libc_pthread_mutex_NULL_deadlock.rs b/tests/fail-dep/concurrency/libc_pthread_mutex_NULL_deadlock.rs index 0a494c53b4..81306d1f94 100644 --- a/tests/fail-dep/concurrency/libc_pthread_mutex_NULL_deadlock.rs +++ b/tests/fail-dep/concurrency/libc_pthread_mutex_NULL_deadlock.rs @@ -1,4 +1,5 @@ -//@ignore-target-windows: No pthreads on Windows +// No pthreads on Windows +//@ignore-target: windows // // Check that if we pass NULL attribute, then we get the default mutex type. diff --git a/tests/fail-dep/concurrency/libc_pthread_mutex_NULL_deadlock.stderr b/tests/fail-dep/concurrency/libc_pthread_mutex_NULL_deadlock.stderr index 3675ce49f3..e9961ed413 100644 --- a/tests/fail-dep/concurrency/libc_pthread_mutex_NULL_deadlock.stderr +++ b/tests/fail-dep/concurrency/libc_pthread_mutex_NULL_deadlock.stderr @@ -1,5 +1,5 @@ error: Undefined Behavior: trying to acquire already locked default mutex - --> $DIR/libc_pthread_mutex_NULL_deadlock.rs:LL:CC + --> tests/fail-dep/concurrency/libc_pthread_mutex_NULL_deadlock.rs:LL:CC | LL | libc::pthread_mutex_lock(&mut mutex as *mut _); | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ trying to acquire already locked default mutex @@ -7,7 +7,7 @@ LL | libc::pthread_mutex_lock(&mut mutex as *mut _); = 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 = note: BACKTRACE: - = note: inside `main` at $DIR/libc_pthread_mutex_NULL_deadlock.rs:LL:CC + = note: inside `main` at tests/fail-dep/concurrency/libc_pthread_mutex_NULL_deadlock.rs:LL:CC note: some details are omitted, run with `MIRIFLAGS=-Zmiri-backtrace=full` for a verbose backtrace diff --git a/tests/fail-dep/concurrency/libc_pthread_mutex_deadlock.rs b/tests/fail-dep/concurrency/libc_pthread_mutex_deadlock.rs index 0328115c63..39e29a5134 100644 --- a/tests/fail-dep/concurrency/libc_pthread_mutex_deadlock.rs +++ b/tests/fail-dep/concurrency/libc_pthread_mutex_deadlock.rs @@ -1,4 +1,5 @@ -//@ignore-target-windows: No pthreads on Windows +// No pthreads on Windows +//@ignore-target: windows //@error-in-other-file: deadlock use std::cell::UnsafeCell; diff --git a/tests/fail-dep/concurrency/libc_pthread_mutex_deadlock.stderr b/tests/fail-dep/concurrency/libc_pthread_mutex_deadlock.stderr index 079c1729b6..534cacaed5 100644 --- a/tests/fail-dep/concurrency/libc_pthread_mutex_deadlock.stderr +++ b/tests/fail-dep/concurrency/libc_pthread_mutex_deadlock.stderr @@ -1,11 +1,11 @@ error: deadlock: the evaluated program deadlocked - --> $DIR/libc_pthread_mutex_deadlock.rs:LL:CC + --> tests/fail-dep/concurrency/libc_pthread_mutex_deadlock.rs:LL:CC | LL | assert_eq!(libc::pthread_mutex_lock(lock_copy.0.get() as *mut _), 0); | ^ the evaluated program deadlocked | = note: BACKTRACE on thread `unnamed-ID`: - = note: inside closure at $DIR/libc_pthread_mutex_deadlock.rs:LL:CC + = note: inside closure at tests/fail-dep/concurrency/libc_pthread_mutex_deadlock.rs:LL:CC error: deadlock: the evaluated program deadlocked --> RUSTLIB/std/src/sys/pal/PLATFORM/thread.rs:LL:CC @@ -18,7 +18,7 @@ LL | let ret = unsafe { libc::pthread_join(id, ptr::null_mut()) }; = note: inside `std::thread::JoinInner::<'_, ()>::join` at RUSTLIB/std/src/thread/mod.rs:LL:CC = note: inside `std::thread::JoinHandle::<()>::join` at RUSTLIB/std/src/thread/mod.rs:LL:CC note: inside `main` - --> $DIR/libc_pthread_mutex_deadlock.rs:LL:CC + --> tests/fail-dep/concurrency/libc_pthread_mutex_deadlock.rs:LL:CC | LL | / thread::spawn(move || { LL | | assert_eq!(libc::pthread_mutex_lock(lock_copy.0.get() as *mut _), 0); diff --git a/tests/fail-dep/concurrency/libc_pthread_mutex_default_deadlock.rs b/tests/fail-dep/concurrency/libc_pthread_mutex_default_deadlock.rs index 1038b8988f..88a3e72035 100644 --- a/tests/fail-dep/concurrency/libc_pthread_mutex_default_deadlock.rs +++ b/tests/fail-dep/concurrency/libc_pthread_mutex_default_deadlock.rs @@ -1,4 +1,5 @@ -//@ignore-target-windows: No pthreads on Windows +// No pthreads on Windows +//@ignore-target: windows // // Check that if we do not set the mutex type, it is the default. diff --git a/tests/fail-dep/concurrency/libc_pthread_mutex_default_deadlock.stderr b/tests/fail-dep/concurrency/libc_pthread_mutex_default_deadlock.stderr index 4d41141b54..a57d10753d 100644 --- a/tests/fail-dep/concurrency/libc_pthread_mutex_default_deadlock.stderr +++ b/tests/fail-dep/concurrency/libc_pthread_mutex_default_deadlock.stderr @@ -1,5 +1,5 @@ error: Undefined Behavior: trying to acquire already locked default mutex - --> $DIR/libc_pthread_mutex_default_deadlock.rs:LL:CC + --> tests/fail-dep/concurrency/libc_pthread_mutex_default_deadlock.rs:LL:CC | LL | libc::pthread_mutex_lock(&mut mutex as *mut _); | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ trying to acquire already locked default mutex @@ -7,7 +7,7 @@ LL | libc::pthread_mutex_lock(&mut mutex as *mut _); = 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 = note: BACKTRACE: - = note: inside `main` at $DIR/libc_pthread_mutex_default_deadlock.rs:LL:CC + = note: inside `main` at tests/fail-dep/concurrency/libc_pthread_mutex_default_deadlock.rs:LL:CC note: some details are omitted, run with `MIRIFLAGS=-Zmiri-backtrace=full` for a verbose backtrace diff --git a/tests/fail-dep/concurrency/libc_pthread_mutex_destroy_locked.rs b/tests/fail-dep/concurrency/libc_pthread_mutex_destroy_locked.rs index e474712cfd..c8c444ae11 100644 --- a/tests/fail-dep/concurrency/libc_pthread_mutex_destroy_locked.rs +++ b/tests/fail-dep/concurrency/libc_pthread_mutex_destroy_locked.rs @@ -1,4 +1,5 @@ -//@ignore-target-windows: No pthreads on Windows +// No pthreads on Windows +//@ignore-target: windows fn main() { unsafe { diff --git a/tests/fail-dep/concurrency/libc_pthread_mutex_destroy_locked.stderr b/tests/fail-dep/concurrency/libc_pthread_mutex_destroy_locked.stderr index ed5e27b607..38f38b4283 100644 --- a/tests/fail-dep/concurrency/libc_pthread_mutex_destroy_locked.stderr +++ b/tests/fail-dep/concurrency/libc_pthread_mutex_destroy_locked.stderr @@ -1,5 +1,5 @@ error: Undefined Behavior: destroyed a locked mutex - --> $DIR/libc_pthread_mutex_destroy_locked.rs:LL:CC + --> tests/fail-dep/concurrency/libc_pthread_mutex_destroy_locked.rs:LL:CC | LL | libc::pthread_mutex_destroy(&mut mutex as *mut _); | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ destroyed a locked mutex @@ -7,7 +7,7 @@ LL | libc::pthread_mutex_destroy(&mut mutex as *mut _); = 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 = note: BACKTRACE: - = note: inside `main` at $DIR/libc_pthread_mutex_destroy_locked.rs:LL:CC + = note: inside `main` at tests/fail-dep/concurrency/libc_pthread_mutex_destroy_locked.rs:LL:CC note: some details are omitted, run with `MIRIFLAGS=-Zmiri-backtrace=full` for a verbose backtrace diff --git a/tests/fail-dep/concurrency/libc_pthread_mutex_double_destroy.rs b/tests/fail-dep/concurrency/libc_pthread_mutex_double_destroy.rs index 46f0c5f8d7..aa613a18df 100644 --- a/tests/fail-dep/concurrency/libc_pthread_mutex_double_destroy.rs +++ b/tests/fail-dep/concurrency/libc_pthread_mutex_double_destroy.rs @@ -1,4 +1,5 @@ -//@ignore-target-windows: No pthreads on Windows +// No pthreads on Windows +//@ignore-target: windows /// Test that destroying a pthread_mutex twice fails, even without a check for number validity diff --git a/tests/fail-dep/concurrency/libc_pthread_mutex_double_destroy.stderr b/tests/fail-dep/concurrency/libc_pthread_mutex_double_destroy.stderr index 05b35ee3b3..72ad2db75a 100644 --- a/tests/fail-dep/concurrency/libc_pthread_mutex_double_destroy.stderr +++ b/tests/fail-dep/concurrency/libc_pthread_mutex_double_destroy.stderr @@ -1,5 +1,5 @@ error: Undefined Behavior: using uninitialized data, but this operation requires initialized memory - --> $DIR/libc_pthread_mutex_double_destroy.rs:LL:CC + --> tests/fail-dep/concurrency/libc_pthread_mutex_double_destroy.rs:LL:CC | LL | libc::pthread_mutex_destroy(mutex.as_mut_ptr()); | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ using uninitialized data, but this operation requires initialized memory @@ -7,7 +7,7 @@ LL | libc::pthread_mutex_destroy(mutex.as_mut_ptr()); = 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 = note: BACKTRACE: - = note: inside `main` at $DIR/libc_pthread_mutex_double_destroy.rs:LL:CC + = note: inside `main` at tests/fail-dep/concurrency/libc_pthread_mutex_double_destroy.rs:LL:CC note: some details are omitted, run with `MIRIFLAGS=-Zmiri-backtrace=full` for a verbose backtrace diff --git a/tests/fail-dep/concurrency/libc_pthread_mutex_move.init.stderr b/tests/fail-dep/concurrency/libc_pthread_mutex_move.init.stderr index 5ca6acc3fb..15f397d4ac 100644 --- a/tests/fail-dep/concurrency/libc_pthread_mutex_move.init.stderr +++ b/tests/fail-dep/concurrency/libc_pthread_mutex_move.init.stderr @@ -1,5 +1,5 @@ error: Undefined Behavior: pthread_mutex_t can't be moved after first use - --> $DIR/libc_pthread_mutex_move.rs:LL:CC + --> tests/fail-dep/concurrency/libc_pthread_mutex_move.rs:LL:CC | LL | libc::pthread_mutex_lock(&mut m2 as *mut _); | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ pthread_mutex_t can't be moved after first use @@ -7,9 +7,9 @@ LL | libc::pthread_mutex_lock(&mut m2 as *mut _); = 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 = note: BACKTRACE: - = note: inside `check` at $DIR/libc_pthread_mutex_move.rs:LL:CC + = note: inside `check` at tests/fail-dep/concurrency/libc_pthread_mutex_move.rs:LL:CC note: inside `main` - --> $DIR/libc_pthread_mutex_move.rs:LL:CC + --> tests/fail-dep/concurrency/libc_pthread_mutex_move.rs:LL:CC | LL | check(); | ^^^^^^^ diff --git a/tests/fail-dep/concurrency/libc_pthread_mutex_move.rs b/tests/fail-dep/concurrency/libc_pthread_mutex_move.rs index 229335c97c..dbe04bffb1 100644 --- a/tests/fail-dep/concurrency/libc_pthread_mutex_move.rs +++ b/tests/fail-dep/concurrency/libc_pthread_mutex_move.rs @@ -1,4 +1,5 @@ -//@ignore-target-windows: No pthreads on Windows +// No pthreads on Windows +//@ignore-target: windows //@revisions: static_initializer init fn main() { diff --git a/tests/fail-dep/concurrency/libc_pthread_mutex_move.static_initializer.stderr b/tests/fail-dep/concurrency/libc_pthread_mutex_move.static_initializer.stderr index c3632eca43..ebc253bf7a 100644 --- a/tests/fail-dep/concurrency/libc_pthread_mutex_move.static_initializer.stderr +++ b/tests/fail-dep/concurrency/libc_pthread_mutex_move.static_initializer.stderr @@ -1,5 +1,5 @@ error: Undefined Behavior: pthread_mutex_t can't be moved after first use - --> $DIR/libc_pthread_mutex_move.rs:LL:CC + --> tests/fail-dep/concurrency/libc_pthread_mutex_move.rs:LL:CC | LL | libc::pthread_mutex_unlock(&mut m2 as *mut _); | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ pthread_mutex_t can't be moved after first use @@ -7,9 +7,9 @@ LL | libc::pthread_mutex_unlock(&mut m2 as *mut _); = 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 = note: BACKTRACE: - = note: inside `check` at $DIR/libc_pthread_mutex_move.rs:LL:CC + = note: inside `check` at tests/fail-dep/concurrency/libc_pthread_mutex_move.rs:LL:CC note: inside `main` - --> $DIR/libc_pthread_mutex_move.rs:LL:CC + --> tests/fail-dep/concurrency/libc_pthread_mutex_move.rs:LL:CC | LL | check(); | ^^^^^^^ diff --git a/tests/fail-dep/concurrency/libc_pthread_mutex_normal_deadlock.rs b/tests/fail-dep/concurrency/libc_pthread_mutex_normal_deadlock.rs index f311934e28..2154a24d66 100644 --- a/tests/fail-dep/concurrency/libc_pthread_mutex_normal_deadlock.rs +++ b/tests/fail-dep/concurrency/libc_pthread_mutex_normal_deadlock.rs @@ -1,4 +1,5 @@ -//@ignore-target-windows: No pthreads on Windows +// No pthreads on Windows +//@ignore-target: windows fn main() { unsafe { diff --git a/tests/fail-dep/concurrency/libc_pthread_mutex_normal_deadlock.stderr b/tests/fail-dep/concurrency/libc_pthread_mutex_normal_deadlock.stderr index 334c14ebf0..4337475963 100644 --- a/tests/fail-dep/concurrency/libc_pthread_mutex_normal_deadlock.stderr +++ b/tests/fail-dep/concurrency/libc_pthread_mutex_normal_deadlock.stderr @@ -1,11 +1,11 @@ error: deadlock: the evaluated program deadlocked - --> $DIR/libc_pthread_mutex_normal_deadlock.rs:LL:CC + --> tests/fail-dep/concurrency/libc_pthread_mutex_normal_deadlock.rs:LL:CC | LL | libc::pthread_mutex_lock(&mut mutex as *mut _); | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ the evaluated program deadlocked | = note: BACKTRACE: - = note: inside `main` at $DIR/libc_pthread_mutex_normal_deadlock.rs:LL:CC + = note: inside `main` at tests/fail-dep/concurrency/libc_pthread_mutex_normal_deadlock.rs:LL:CC note: some details are omitted, run with `MIRIFLAGS=-Zmiri-backtrace=full` for a verbose backtrace diff --git a/tests/fail-dep/concurrency/libc_pthread_mutex_normal_unlock_unlocked.rs b/tests/fail-dep/concurrency/libc_pthread_mutex_normal_unlock_unlocked.rs index 2b5886dc16..a86c469da9 100644 --- a/tests/fail-dep/concurrency/libc_pthread_mutex_normal_unlock_unlocked.rs +++ b/tests/fail-dep/concurrency/libc_pthread_mutex_normal_unlock_unlocked.rs @@ -1,4 +1,5 @@ -//@ignore-target-windows: No pthreads on Windows +// No pthreads on Windows +//@ignore-target: windows fn main() { unsafe { diff --git a/tests/fail-dep/concurrency/libc_pthread_mutex_normal_unlock_unlocked.stderr b/tests/fail-dep/concurrency/libc_pthread_mutex_normal_unlock_unlocked.stderr index d717b4ec56..db08496889 100644 --- a/tests/fail-dep/concurrency/libc_pthread_mutex_normal_unlock_unlocked.stderr +++ b/tests/fail-dep/concurrency/libc_pthread_mutex_normal_unlock_unlocked.stderr @@ -1,5 +1,5 @@ error: Undefined Behavior: unlocked a PTHREAD_MUTEX_NORMAL mutex that was not locked by the current thread - --> $DIR/libc_pthread_mutex_normal_unlock_unlocked.rs:LL:CC + --> tests/fail-dep/concurrency/libc_pthread_mutex_normal_unlock_unlocked.rs:LL:CC | LL | libc::pthread_mutex_unlock(&mut mutex as *mut _); | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ unlocked a PTHREAD_MUTEX_NORMAL mutex that was not locked by the current thread @@ -7,7 +7,7 @@ LL | libc::pthread_mutex_unlock(&mut mutex as *mut _); = 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 = note: BACKTRACE: - = note: inside `main` at $DIR/libc_pthread_mutex_normal_unlock_unlocked.rs:LL:CC + = note: inside `main` at tests/fail-dep/concurrency/libc_pthread_mutex_normal_unlock_unlocked.rs:LL:CC note: some details are omitted, run with `MIRIFLAGS=-Zmiri-backtrace=full` for a verbose backtrace diff --git a/tests/fail-dep/concurrency/libc_pthread_mutex_wrong_owner.rs b/tests/fail-dep/concurrency/libc_pthread_mutex_wrong_owner.rs index 686a394f7c..bf09363a7b 100644 --- a/tests/fail-dep/concurrency/libc_pthread_mutex_wrong_owner.rs +++ b/tests/fail-dep/concurrency/libc_pthread_mutex_wrong_owner.rs @@ -1,4 +1,5 @@ -//@ignore-target-windows: No pthreads on Windows +// No pthreads on Windows +//@ignore-target: windows use std::cell::UnsafeCell; use std::sync::Arc; diff --git a/tests/fail-dep/concurrency/libc_pthread_mutex_wrong_owner.stderr b/tests/fail-dep/concurrency/libc_pthread_mutex_wrong_owner.stderr index b8ec2d6d01..97c92e828e 100644 --- a/tests/fail-dep/concurrency/libc_pthread_mutex_wrong_owner.stderr +++ b/tests/fail-dep/concurrency/libc_pthread_mutex_wrong_owner.stderr @@ -1,5 +1,5 @@ error: Undefined Behavior: unlocked a default mutex that was not locked by the current thread - --> $DIR/libc_pthread_mutex_wrong_owner.rs:LL:CC + --> tests/fail-dep/concurrency/libc_pthread_mutex_wrong_owner.rs:LL:CC | LL | ...t_eq!(libc::pthread_mutex_unlock(lock_copy.0.get() as *mut _), 0); | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ unlocked a default mutex that was not locked by the current thread @@ -7,7 +7,7 @@ LL | ...t_eq!(libc::pthread_mutex_unlock(lock_copy.0.get() as *mut _), 0); = 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 = note: BACKTRACE on thread `unnamed-ID`: - = note: inside closure at $DIR/libc_pthread_mutex_wrong_owner.rs:LL:CC + = note: inside closure at tests/fail-dep/concurrency/libc_pthread_mutex_wrong_owner.rs:LL:CC note: some details are omitted, run with `MIRIFLAGS=-Zmiri-backtrace=full` for a verbose backtrace diff --git a/tests/fail-dep/concurrency/libc_pthread_mutexattr_double_destroy.rs b/tests/fail-dep/concurrency/libc_pthread_mutexattr_double_destroy.rs index 51f00d62b7..cc133b3d2d 100644 --- a/tests/fail-dep/concurrency/libc_pthread_mutexattr_double_destroy.rs +++ b/tests/fail-dep/concurrency/libc_pthread_mutexattr_double_destroy.rs @@ -1,4 +1,5 @@ -//@ignore-target-windows: No pthreads on Windows +// No pthreads on Windows +//@ignore-target: windows /// Test that destroying a pthread_mutexattr twice fails, even without a check for number validity diff --git a/tests/fail-dep/concurrency/libc_pthread_mutexattr_double_destroy.stderr b/tests/fail-dep/concurrency/libc_pthread_mutexattr_double_destroy.stderr index a8425e6f81..4c39ca003e 100644 --- a/tests/fail-dep/concurrency/libc_pthread_mutexattr_double_destroy.stderr +++ b/tests/fail-dep/concurrency/libc_pthread_mutexattr_double_destroy.stderr @@ -1,5 +1,5 @@ error: Undefined Behavior: using uninitialized data, but this operation requires initialized memory - --> $DIR/libc_pthread_mutexattr_double_destroy.rs:LL:CC + --> tests/fail-dep/concurrency/libc_pthread_mutexattr_double_destroy.rs:LL:CC | LL | libc::pthread_mutexattr_destroy(attr.as_mut_ptr()); | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ using uninitialized data, but this operation requires initialized memory @@ -7,7 +7,7 @@ LL | libc::pthread_mutexattr_destroy(attr.as_mut_ptr()); = 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 = note: BACKTRACE: - = note: inside `main` at $DIR/libc_pthread_mutexattr_double_destroy.rs:LL:CC + = note: inside `main` at tests/fail-dep/concurrency/libc_pthread_mutexattr_double_destroy.rs:LL:CC note: some details are omitted, run with `MIRIFLAGS=-Zmiri-backtrace=full` for a verbose backtrace diff --git a/tests/fail-dep/concurrency/libc_pthread_rwlock_destroy_read_locked.rs b/tests/fail-dep/concurrency/libc_pthread_rwlock_destroy_read_locked.rs index fa4575bc1d..af634e25fe 100644 --- a/tests/fail-dep/concurrency/libc_pthread_rwlock_destroy_read_locked.rs +++ b/tests/fail-dep/concurrency/libc_pthread_rwlock_destroy_read_locked.rs @@ -1,4 +1,5 @@ -//@ignore-target-windows: No pthreads on Windows +// No pthreads on Windows +//@ignore-target: windows fn main() { let rw = std::cell::UnsafeCell::new(libc::PTHREAD_RWLOCK_INITIALIZER); diff --git a/tests/fail-dep/concurrency/libc_pthread_rwlock_destroy_read_locked.stderr b/tests/fail-dep/concurrency/libc_pthread_rwlock_destroy_read_locked.stderr index bb90545c50..0a964da82a 100644 --- a/tests/fail-dep/concurrency/libc_pthread_rwlock_destroy_read_locked.stderr +++ b/tests/fail-dep/concurrency/libc_pthread_rwlock_destroy_read_locked.stderr @@ -1,5 +1,5 @@ error: Undefined Behavior: destroyed a locked rwlock - --> $DIR/libc_pthread_rwlock_destroy_read_locked.rs:LL:CC + --> tests/fail-dep/concurrency/libc_pthread_rwlock_destroy_read_locked.rs:LL:CC | LL | libc::pthread_rwlock_destroy(rw.get()); | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ destroyed a locked rwlock @@ -7,7 +7,7 @@ LL | libc::pthread_rwlock_destroy(rw.get()); = 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 = note: BACKTRACE: - = note: inside `main` at $DIR/libc_pthread_rwlock_destroy_read_locked.rs:LL:CC + = note: inside `main` at tests/fail-dep/concurrency/libc_pthread_rwlock_destroy_read_locked.rs:LL:CC note: some details are omitted, run with `MIRIFLAGS=-Zmiri-backtrace=full` for a verbose backtrace diff --git a/tests/fail-dep/concurrency/libc_pthread_rwlock_destroy_write_locked.rs b/tests/fail-dep/concurrency/libc_pthread_rwlock_destroy_write_locked.rs index e734a62bca..5f26aebd68 100644 --- a/tests/fail-dep/concurrency/libc_pthread_rwlock_destroy_write_locked.rs +++ b/tests/fail-dep/concurrency/libc_pthread_rwlock_destroy_write_locked.rs @@ -1,4 +1,5 @@ -//@ignore-target-windows: No pthreads on Windows +// No pthreads on Windows +//@ignore-target: windows fn main() { let rw = std::cell::UnsafeCell::new(libc::PTHREAD_RWLOCK_INITIALIZER); diff --git a/tests/fail-dep/concurrency/libc_pthread_rwlock_destroy_write_locked.stderr b/tests/fail-dep/concurrency/libc_pthread_rwlock_destroy_write_locked.stderr index 7210c6a742..cfdadbefe4 100644 --- a/tests/fail-dep/concurrency/libc_pthread_rwlock_destroy_write_locked.stderr +++ b/tests/fail-dep/concurrency/libc_pthread_rwlock_destroy_write_locked.stderr @@ -1,5 +1,5 @@ error: Undefined Behavior: destroyed a locked rwlock - --> $DIR/libc_pthread_rwlock_destroy_write_locked.rs:LL:CC + --> tests/fail-dep/concurrency/libc_pthread_rwlock_destroy_write_locked.rs:LL:CC | LL | libc::pthread_rwlock_destroy(rw.get()); | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ destroyed a locked rwlock @@ -7,7 +7,7 @@ LL | libc::pthread_rwlock_destroy(rw.get()); = 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 = note: BACKTRACE: - = note: inside `main` at $DIR/libc_pthread_rwlock_destroy_write_locked.rs:LL:CC + = note: inside `main` at tests/fail-dep/concurrency/libc_pthread_rwlock_destroy_write_locked.rs:LL:CC note: some details are omitted, run with `MIRIFLAGS=-Zmiri-backtrace=full` for a verbose backtrace diff --git a/tests/fail-dep/concurrency/libc_pthread_rwlock_double_destroy.rs b/tests/fail-dep/concurrency/libc_pthread_rwlock_double_destroy.rs index e96f7fc680..ccf06679b3 100644 --- a/tests/fail-dep/concurrency/libc_pthread_rwlock_double_destroy.rs +++ b/tests/fail-dep/concurrency/libc_pthread_rwlock_double_destroy.rs @@ -1,4 +1,5 @@ -//@ignore-target-windows: No pthreads on Windows +// No pthreads on Windows +//@ignore-target: windows /// Test that destroying a pthread_rwlock twice fails, even without a check for number validity diff --git a/tests/fail-dep/concurrency/libc_pthread_rwlock_double_destroy.stderr b/tests/fail-dep/concurrency/libc_pthread_rwlock_double_destroy.stderr index 5032e98f11..41c189f3ef 100644 --- a/tests/fail-dep/concurrency/libc_pthread_rwlock_double_destroy.stderr +++ b/tests/fail-dep/concurrency/libc_pthread_rwlock_double_destroy.stderr @@ -1,5 +1,5 @@ error: Undefined Behavior: using uninitialized data, but this operation requires initialized memory - --> $DIR/libc_pthread_rwlock_double_destroy.rs:LL:CC + --> tests/fail-dep/concurrency/libc_pthread_rwlock_double_destroy.rs:LL:CC | LL | libc::pthread_rwlock_destroy(&mut lock); | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ using uninitialized data, but this operation requires initialized memory @@ -7,7 +7,7 @@ LL | libc::pthread_rwlock_destroy(&mut lock); = 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 = note: BACKTRACE: - = note: inside `main` at $DIR/libc_pthread_rwlock_double_destroy.rs:LL:CC + = note: inside `main` at tests/fail-dep/concurrency/libc_pthread_rwlock_double_destroy.rs:LL:CC note: some details are omitted, run with `MIRIFLAGS=-Zmiri-backtrace=full` for a verbose backtrace diff --git a/tests/fail-dep/concurrency/libc_pthread_rwlock_read_write_deadlock_single_thread.rs b/tests/fail-dep/concurrency/libc_pthread_rwlock_read_write_deadlock_single_thread.rs index dffeee2b79..7cf42de79b 100644 --- a/tests/fail-dep/concurrency/libc_pthread_rwlock_read_write_deadlock_single_thread.rs +++ b/tests/fail-dep/concurrency/libc_pthread_rwlock_read_write_deadlock_single_thread.rs @@ -1,4 +1,5 @@ -//@ignore-target-windows: No pthreads on Windows +// No pthreads on Windows +//@ignore-target: windows fn main() { let rw = std::cell::UnsafeCell::new(libc::PTHREAD_RWLOCK_INITIALIZER); diff --git a/tests/fail-dep/concurrency/libc_pthread_rwlock_read_write_deadlock_single_thread.stderr b/tests/fail-dep/concurrency/libc_pthread_rwlock_read_write_deadlock_single_thread.stderr index 957458a7ba..5b5d35bf19 100644 --- a/tests/fail-dep/concurrency/libc_pthread_rwlock_read_write_deadlock_single_thread.stderr +++ b/tests/fail-dep/concurrency/libc_pthread_rwlock_read_write_deadlock_single_thread.stderr @@ -1,11 +1,11 @@ error: deadlock: the evaluated program deadlocked - --> $DIR/libc_pthread_rwlock_read_write_deadlock_single_thread.rs:LL:CC + --> tests/fail-dep/concurrency/libc_pthread_rwlock_read_write_deadlock_single_thread.rs:LL:CC | LL | libc::pthread_rwlock_wrlock(rw.get()); | ^ the evaluated program deadlocked | = note: BACKTRACE: - = note: inside `main` at $DIR/libc_pthread_rwlock_read_write_deadlock_single_thread.rs:LL:CC + = note: inside `main` at tests/fail-dep/concurrency/libc_pthread_rwlock_read_write_deadlock_single_thread.rs:LL:CC note: some details are omitted, run with `MIRIFLAGS=-Zmiri-backtrace=full` for a verbose backtrace diff --git a/tests/fail-dep/concurrency/libc_pthread_rwlock_read_wrong_owner.rs b/tests/fail-dep/concurrency/libc_pthread_rwlock_read_wrong_owner.rs index 328372b22e..77c62957a3 100644 --- a/tests/fail-dep/concurrency/libc_pthread_rwlock_read_wrong_owner.rs +++ b/tests/fail-dep/concurrency/libc_pthread_rwlock_read_wrong_owner.rs @@ -1,4 +1,5 @@ -//@ignore-target-windows: No pthreads on Windows +// No pthreads on Windows +//@ignore-target: windows use std::cell::UnsafeCell; use std::sync::Arc; diff --git a/tests/fail-dep/concurrency/libc_pthread_rwlock_read_wrong_owner.stderr b/tests/fail-dep/concurrency/libc_pthread_rwlock_read_wrong_owner.stderr index a964a64284..d2fccfcc3f 100644 --- a/tests/fail-dep/concurrency/libc_pthread_rwlock_read_wrong_owner.stderr +++ b/tests/fail-dep/concurrency/libc_pthread_rwlock_read_wrong_owner.stderr @@ -1,5 +1,5 @@ error: Undefined Behavior: unlocked an rwlock that was not locked by the active thread - --> $DIR/libc_pthread_rwlock_read_wrong_owner.rs:LL:CC + --> tests/fail-dep/concurrency/libc_pthread_rwlock_read_wrong_owner.rs:LL:CC | LL | ... assert_eq!(libc::pthread_rwlock_unlock(lock_copy.0.get() as *mut _), 0); | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ unlocked an rwlock that was not locked by the active thread @@ -7,7 +7,7 @@ LL | ... assert_eq!(libc::pthread_rwlock_unlock(lock_copy.0.get() as *mut _), = 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 = note: BACKTRACE on thread `unnamed-ID`: - = note: inside closure at $DIR/libc_pthread_rwlock_read_wrong_owner.rs:LL:CC + = note: inside closure at tests/fail-dep/concurrency/libc_pthread_rwlock_read_wrong_owner.rs:LL:CC note: some details are omitted, run with `MIRIFLAGS=-Zmiri-backtrace=full` for a verbose backtrace diff --git a/tests/fail-dep/concurrency/libc_pthread_rwlock_unlock_unlocked.rs b/tests/fail-dep/concurrency/libc_pthread_rwlock_unlock_unlocked.rs index ced6b7a4f6..f949e0305a 100644 --- a/tests/fail-dep/concurrency/libc_pthread_rwlock_unlock_unlocked.rs +++ b/tests/fail-dep/concurrency/libc_pthread_rwlock_unlock_unlocked.rs @@ -1,4 +1,5 @@ -//@ignore-target-windows: No pthreads on Windows +// No pthreads on Windows +//@ignore-target: windows fn main() { let rw = std::cell::UnsafeCell::new(libc::PTHREAD_RWLOCK_INITIALIZER); diff --git a/tests/fail-dep/concurrency/libc_pthread_rwlock_unlock_unlocked.stderr b/tests/fail-dep/concurrency/libc_pthread_rwlock_unlock_unlocked.stderr index 98b0947290..da2a650151 100644 --- a/tests/fail-dep/concurrency/libc_pthread_rwlock_unlock_unlocked.stderr +++ b/tests/fail-dep/concurrency/libc_pthread_rwlock_unlock_unlocked.stderr @@ -1,5 +1,5 @@ error: Undefined Behavior: unlocked an rwlock that was not locked by the active thread - --> $DIR/libc_pthread_rwlock_unlock_unlocked.rs:LL:CC + --> tests/fail-dep/concurrency/libc_pthread_rwlock_unlock_unlocked.rs:LL:CC | LL | libc::pthread_rwlock_unlock(rw.get()); | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ unlocked an rwlock that was not locked by the active thread @@ -7,7 +7,7 @@ LL | libc::pthread_rwlock_unlock(rw.get()); = 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 = note: BACKTRACE: - = note: inside `main` at $DIR/libc_pthread_rwlock_unlock_unlocked.rs:LL:CC + = note: inside `main` at tests/fail-dep/concurrency/libc_pthread_rwlock_unlock_unlocked.rs:LL:CC note: some details are omitted, run with `MIRIFLAGS=-Zmiri-backtrace=full` for a verbose backtrace diff --git a/tests/fail-dep/concurrency/libc_pthread_rwlock_write_read_deadlock.rs b/tests/fail-dep/concurrency/libc_pthread_rwlock_write_read_deadlock.rs index 4174751926..3f5922c603 100644 --- a/tests/fail-dep/concurrency/libc_pthread_rwlock_write_read_deadlock.rs +++ b/tests/fail-dep/concurrency/libc_pthread_rwlock_write_read_deadlock.rs @@ -1,4 +1,5 @@ -//@ignore-target-windows: No pthreads on Windows +// No pthreads on Windows +//@ignore-target: windows //@error-in-other-file: deadlock use std::cell::UnsafeCell; diff --git a/tests/fail-dep/concurrency/libc_pthread_rwlock_write_read_deadlock.stderr b/tests/fail-dep/concurrency/libc_pthread_rwlock_write_read_deadlock.stderr index d03c6402d6..ae77d79fcd 100644 --- a/tests/fail-dep/concurrency/libc_pthread_rwlock_write_read_deadlock.stderr +++ b/tests/fail-dep/concurrency/libc_pthread_rwlock_write_read_deadlock.stderr @@ -1,11 +1,11 @@ error: deadlock: the evaluated program deadlocked - --> $DIR/libc_pthread_rwlock_write_read_deadlock.rs:LL:CC + --> tests/fail-dep/concurrency/libc_pthread_rwlock_write_read_deadlock.rs:LL:CC | LL | assert_eq!(libc::pthread_rwlock_wrlock(lock_copy.0.get() as *mut _), 0); | ^ the evaluated program deadlocked | = note: BACKTRACE on thread `unnamed-ID`: - = note: inside closure at $DIR/libc_pthread_rwlock_write_read_deadlock.rs:LL:CC + = note: inside closure at tests/fail-dep/concurrency/libc_pthread_rwlock_write_read_deadlock.rs:LL:CC error: deadlock: the evaluated program deadlocked --> RUSTLIB/std/src/sys/pal/PLATFORM/thread.rs:LL:CC @@ -18,7 +18,7 @@ LL | let ret = unsafe { libc::pthread_join(id, ptr::null_mut()) }; = note: inside `std::thread::JoinInner::<'_, ()>::join` at RUSTLIB/std/src/thread/mod.rs:LL:CC = note: inside `std::thread::JoinHandle::<()>::join` at RUSTLIB/std/src/thread/mod.rs:LL:CC note: inside `main` - --> $DIR/libc_pthread_rwlock_write_read_deadlock.rs:LL:CC + --> tests/fail-dep/concurrency/libc_pthread_rwlock_write_read_deadlock.rs:LL:CC | LL | / thread::spawn(move || { LL | | assert_eq!(libc::pthread_rwlock_wrlock(lock_copy.0.get() as *mut _), 0); diff --git a/tests/fail-dep/concurrency/libc_pthread_rwlock_write_read_deadlock_single_thread.rs b/tests/fail-dep/concurrency/libc_pthread_rwlock_write_read_deadlock_single_thread.rs index 099b8dcd10..3216db4d8d 100644 --- a/tests/fail-dep/concurrency/libc_pthread_rwlock_write_read_deadlock_single_thread.rs +++ b/tests/fail-dep/concurrency/libc_pthread_rwlock_write_read_deadlock_single_thread.rs @@ -1,4 +1,5 @@ -//@ignore-target-windows: No pthreads on Windows +// No pthreads on Windows +//@ignore-target: windows fn main() { let rw = std::cell::UnsafeCell::new(libc::PTHREAD_RWLOCK_INITIALIZER); diff --git a/tests/fail-dep/concurrency/libc_pthread_rwlock_write_read_deadlock_single_thread.stderr b/tests/fail-dep/concurrency/libc_pthread_rwlock_write_read_deadlock_single_thread.stderr index d6cceaff16..24c1a99365 100644 --- a/tests/fail-dep/concurrency/libc_pthread_rwlock_write_read_deadlock_single_thread.stderr +++ b/tests/fail-dep/concurrency/libc_pthread_rwlock_write_read_deadlock_single_thread.stderr @@ -1,11 +1,11 @@ error: deadlock: the evaluated program deadlocked - --> $DIR/libc_pthread_rwlock_write_read_deadlock_single_thread.rs:LL:CC + --> tests/fail-dep/concurrency/libc_pthread_rwlock_write_read_deadlock_single_thread.rs:LL:CC | LL | libc::pthread_rwlock_rdlock(rw.get()); | ^ the evaluated program deadlocked | = note: BACKTRACE: - = note: inside `main` at $DIR/libc_pthread_rwlock_write_read_deadlock_single_thread.rs:LL:CC + = note: inside `main` at tests/fail-dep/concurrency/libc_pthread_rwlock_write_read_deadlock_single_thread.rs:LL:CC note: some details are omitted, run with `MIRIFLAGS=-Zmiri-backtrace=full` for a verbose backtrace diff --git a/tests/fail-dep/concurrency/libc_pthread_rwlock_write_write_deadlock.rs b/tests/fail-dep/concurrency/libc_pthread_rwlock_write_write_deadlock.rs index 43b3ab09bb..c1010bc5b5 100644 --- a/tests/fail-dep/concurrency/libc_pthread_rwlock_write_write_deadlock.rs +++ b/tests/fail-dep/concurrency/libc_pthread_rwlock_write_write_deadlock.rs @@ -1,4 +1,5 @@ -//@ignore-target-windows: No pthreads on Windows +// No pthreads on Windows +//@ignore-target: windows //@error-in-other-file: deadlock use std::cell::UnsafeCell; diff --git a/tests/fail-dep/concurrency/libc_pthread_rwlock_write_write_deadlock.stderr b/tests/fail-dep/concurrency/libc_pthread_rwlock_write_write_deadlock.stderr index 73c5e77a1b..4f46346413 100644 --- a/tests/fail-dep/concurrency/libc_pthread_rwlock_write_write_deadlock.stderr +++ b/tests/fail-dep/concurrency/libc_pthread_rwlock_write_write_deadlock.stderr @@ -1,11 +1,11 @@ error: deadlock: the evaluated program deadlocked - --> $DIR/libc_pthread_rwlock_write_write_deadlock.rs:LL:CC + --> tests/fail-dep/concurrency/libc_pthread_rwlock_write_write_deadlock.rs:LL:CC | LL | assert_eq!(libc::pthread_rwlock_wrlock(lock_copy.0.get() as *mut _), 0); | ^ the evaluated program deadlocked | = note: BACKTRACE on thread `unnamed-ID`: - = note: inside closure at $DIR/libc_pthread_rwlock_write_write_deadlock.rs:LL:CC + = note: inside closure at tests/fail-dep/concurrency/libc_pthread_rwlock_write_write_deadlock.rs:LL:CC error: deadlock: the evaluated program deadlocked --> RUSTLIB/std/src/sys/pal/PLATFORM/thread.rs:LL:CC @@ -18,7 +18,7 @@ LL | let ret = unsafe { libc::pthread_join(id, ptr::null_mut()) }; = note: inside `std::thread::JoinInner::<'_, ()>::join` at RUSTLIB/std/src/thread/mod.rs:LL:CC = note: inside `std::thread::JoinHandle::<()>::join` at RUSTLIB/std/src/thread/mod.rs:LL:CC note: inside `main` - --> $DIR/libc_pthread_rwlock_write_write_deadlock.rs:LL:CC + --> tests/fail-dep/concurrency/libc_pthread_rwlock_write_write_deadlock.rs:LL:CC | LL | / thread::spawn(move || { LL | | assert_eq!(libc::pthread_rwlock_wrlock(lock_copy.0.get() as *mut _), 0); diff --git a/tests/fail-dep/concurrency/libc_pthread_rwlock_write_write_deadlock_single_thread.rs b/tests/fail-dep/concurrency/libc_pthread_rwlock_write_write_deadlock_single_thread.rs index 2704ff1544..42e94bf6a0 100644 --- a/tests/fail-dep/concurrency/libc_pthread_rwlock_write_write_deadlock_single_thread.rs +++ b/tests/fail-dep/concurrency/libc_pthread_rwlock_write_write_deadlock_single_thread.rs @@ -1,4 +1,5 @@ -//@ignore-target-windows: No pthreads on Windows +// No pthreads on Windows +//@ignore-target: windows fn main() { let rw = std::cell::UnsafeCell::new(libc::PTHREAD_RWLOCK_INITIALIZER); diff --git a/tests/fail-dep/concurrency/libc_pthread_rwlock_write_write_deadlock_single_thread.stderr b/tests/fail-dep/concurrency/libc_pthread_rwlock_write_write_deadlock_single_thread.stderr index 3ba99e3db4..e76ce84e75 100644 --- a/tests/fail-dep/concurrency/libc_pthread_rwlock_write_write_deadlock_single_thread.stderr +++ b/tests/fail-dep/concurrency/libc_pthread_rwlock_write_write_deadlock_single_thread.stderr @@ -1,11 +1,11 @@ error: deadlock: the evaluated program deadlocked - --> $DIR/libc_pthread_rwlock_write_write_deadlock_single_thread.rs:LL:CC + --> tests/fail-dep/concurrency/libc_pthread_rwlock_write_write_deadlock_single_thread.rs:LL:CC | LL | libc::pthread_rwlock_wrlock(rw.get()); | ^ the evaluated program deadlocked | = note: BACKTRACE: - = note: inside `main` at $DIR/libc_pthread_rwlock_write_write_deadlock_single_thread.rs:LL:CC + = note: inside `main` at tests/fail-dep/concurrency/libc_pthread_rwlock_write_write_deadlock_single_thread.rs:LL:CC note: some details are omitted, run with `MIRIFLAGS=-Zmiri-backtrace=full` for a verbose backtrace diff --git a/tests/fail-dep/concurrency/libc_pthread_rwlock_write_wrong_owner.rs b/tests/fail-dep/concurrency/libc_pthread_rwlock_write_wrong_owner.rs index 9a2cd09f08..658fd2b756 100644 --- a/tests/fail-dep/concurrency/libc_pthread_rwlock_write_wrong_owner.rs +++ b/tests/fail-dep/concurrency/libc_pthread_rwlock_write_wrong_owner.rs @@ -1,4 +1,5 @@ -//@ignore-target-windows: No pthreads on Windows +// No pthreads on Windows +//@ignore-target: windows use std::cell::UnsafeCell; use std::sync::Arc; diff --git a/tests/fail-dep/concurrency/libc_pthread_rwlock_write_wrong_owner.stderr b/tests/fail-dep/concurrency/libc_pthread_rwlock_write_wrong_owner.stderr index c9c22dea65..906311144e 100644 --- a/tests/fail-dep/concurrency/libc_pthread_rwlock_write_wrong_owner.stderr +++ b/tests/fail-dep/concurrency/libc_pthread_rwlock_write_wrong_owner.stderr @@ -1,5 +1,5 @@ error: Undefined Behavior: unlocked an rwlock that was not locked by the active thread - --> $DIR/libc_pthread_rwlock_write_wrong_owner.rs:LL:CC + --> tests/fail-dep/concurrency/libc_pthread_rwlock_write_wrong_owner.rs:LL:CC | LL | ... assert_eq!(libc::pthread_rwlock_unlock(lock_copy.0.get() as *mut _), 0); | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ unlocked an rwlock that was not locked by the active thread @@ -7,7 +7,7 @@ LL | ... assert_eq!(libc::pthread_rwlock_unlock(lock_copy.0.get() as *mut _), = 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 = note: BACKTRACE on thread `unnamed-ID`: - = note: inside closure at $DIR/libc_pthread_rwlock_write_wrong_owner.rs:LL:CC + = note: inside closure at tests/fail-dep/concurrency/libc_pthread_rwlock_write_wrong_owner.rs:LL:CC note: some details are omitted, run with `MIRIFLAGS=-Zmiri-backtrace=full` for a verbose backtrace diff --git a/tests/fail-dep/concurrency/windows_join_detached.rs b/tests/fail-dep/concurrency/windows_join_detached.rs index 0e9eb24459..578c9ebd39 100644 --- a/tests/fail-dep/concurrency/windows_join_detached.rs +++ b/tests/fail-dep/concurrency/windows_join_detached.rs @@ -1,4 +1,5 @@ -//@only-target-windows: Uses win32 api functions +// Uses win32 api functions +//@only-target: windows //@error-in-other-file: Undefined Behavior: trying to join a detached thread // Joining a detached thread is undefined behavior. diff --git a/tests/fail-dep/concurrency/windows_join_detached.stderr b/tests/fail-dep/concurrency/windows_join_detached.stderr index 19bfe56395..947d665b95 100644 --- a/tests/fail-dep/concurrency/windows_join_detached.stderr +++ b/tests/fail-dep/concurrency/windows_join_detached.stderr @@ -11,7 +11,7 @@ LL | let rc = unsafe { c::WaitForSingleObject(self.handle.as_raw_handle( = note: inside `std::thread::JoinInner::<'_, ()>::join` at RUSTLIB/std/src/thread/mod.rs:LL:CC = note: inside `std::thread::JoinHandle::<()>::join` at RUSTLIB/std/src/thread/mod.rs:LL:CC note: inside `main` - --> $DIR/windows_join_detached.rs:LL:CC + --> tests/fail-dep/concurrency/windows_join_detached.rs:LL:CC | LL | thread.join().unwrap(); | ^^^^^^^^^^^^^ diff --git a/tests/fail-dep/concurrency/windows_join_main.rs b/tests/fail-dep/concurrency/windows_join_main.rs index 532bda2013..3eaf534b54 100644 --- a/tests/fail-dep/concurrency/windows_join_main.rs +++ b/tests/fail-dep/concurrency/windows_join_main.rs @@ -1,4 +1,5 @@ -//@only-target-windows: Uses win32 api functions +// Uses win32 api functions +//@only-target: windows // We are making scheduler assumptions here. //@compile-flags: -Zmiri-preemption-rate=0 //@error-in-other-file: deadlock diff --git a/tests/fail-dep/concurrency/windows_join_main.stderr b/tests/fail-dep/concurrency/windows_join_main.stderr index 12f35fdeb0..23a9f8f9c2 100644 --- a/tests/fail-dep/concurrency/windows_join_main.stderr +++ b/tests/fail-dep/concurrency/windows_join_main.stderr @@ -1,5 +1,5 @@ error: deadlock: the evaluated program deadlocked - --> $DIR/windows_join_main.rs:LL:CC + --> tests/fail-dep/concurrency/windows_join_main.rs:LL:CC | LL | assert_eq!(WaitForSingleObject(MAIN_THREAD, INFINITE), WAIT_OBJECT_0); | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ the evaluated program deadlocked @@ -19,7 +19,7 @@ LL | let rc = unsafe { c::WaitForSingleObject(self.handle.as_raw_handle( = note: inside `std::thread::JoinInner::<'_, ()>::join` at RUSTLIB/std/src/thread/mod.rs:LL:CC = note: inside `std::thread::JoinHandle::<()>::join` at RUSTLIB/std/src/thread/mod.rs:LL:CC note: inside `main` - --> $DIR/windows_join_main.rs:LL:CC + --> tests/fail-dep/concurrency/windows_join_main.rs:LL:CC | LL | / thread::spawn(|| { LL | | unsafe { diff --git a/tests/fail-dep/concurrency/windows_join_self.rs b/tests/fail-dep/concurrency/windows_join_self.rs index a64265ca0c..fa134c1ec4 100644 --- a/tests/fail-dep/concurrency/windows_join_self.rs +++ b/tests/fail-dep/concurrency/windows_join_self.rs @@ -1,4 +1,5 @@ -//@only-target-windows: Uses win32 api functions +// Uses win32 api functions +//@only-target: windows // We are making scheduler assumptions here. //@compile-flags: -Zmiri-preemption-rate=0 //@error-in-other-file: deadlock diff --git a/tests/fail-dep/concurrency/windows_join_self.stderr b/tests/fail-dep/concurrency/windows_join_self.stderr index 8d26c35de8..4e640296db 100644 --- a/tests/fail-dep/concurrency/windows_join_self.stderr +++ b/tests/fail-dep/concurrency/windows_join_self.stderr @@ -1,11 +1,11 @@ error: deadlock: the evaluated program deadlocked - --> $DIR/windows_join_self.rs:LL:CC + --> tests/fail-dep/concurrency/windows_join_self.rs:LL:CC | LL | assert_eq!(WaitForSingleObject(native, INFINITE), WAIT_OBJECT_0); | ^ the evaluated program deadlocked | = note: BACKTRACE on thread `unnamed-ID`: - = note: inside closure at $DIR/windows_join_self.rs:LL:CC + = note: inside closure at tests/fail-dep/concurrency/windows_join_self.rs:LL:CC error: deadlock: the evaluated program deadlocked --> RUSTLIB/std/src/sys/pal/PLATFORM/thread.rs:LL:CC @@ -18,7 +18,7 @@ LL | let rc = unsafe { c::WaitForSingleObject(self.handle.as_raw_handle( = note: inside `std::thread::JoinInner::<'_, ()>::join` at RUSTLIB/std/src/thread/mod.rs:LL:CC = note: inside `std::thread::JoinHandle::<()>::join` at RUSTLIB/std/src/thread/mod.rs:LL:CC note: inside `main` - --> $DIR/windows_join_self.rs:LL:CC + --> tests/fail-dep/concurrency/windows_join_self.rs:LL:CC | LL | / thread::spawn(|| { LL | | unsafe { diff --git a/tests/fail-dep/libc/affinity.rs b/tests/fail-dep/libc/affinity.rs index c41d1d1801..f5508a97f6 100644 --- a/tests/fail-dep/libc/affinity.rs +++ b/tests/fail-dep/libc/affinity.rs @@ -1,5 +1,7 @@ -//@ignore-target-windows: only very limited libc on Windows -//@ignore-target-apple: `sched_setaffinity` is not supported on macOS +// only very limited libc on Windows +//@ignore-target: windows +// `sched_setaffinity` is not supported on macOS +//@ignore-target: apple //@compile-flags: -Zmiri-disable-isolation -Zmiri-num-cpus=4 fn main() { diff --git a/tests/fail-dep/libc/affinity.stderr b/tests/fail-dep/libc/affinity.stderr index 38414623cc..5a226c6a44 100644 --- a/tests/fail-dep/libc/affinity.stderr +++ b/tests/fail-dep/libc/affinity.stderr @@ -1,5 +1,5 @@ error: Undefined Behavior: memory access failed: expected a pointer to 129 bytes of memory, but got ALLOC which is only 128 bytes from the end of the allocation - --> $DIR/affinity.rs:LL:CC + --> tests/fail-dep/libc/affinity.rs:LL:CC | LL | let err = unsafe { sched_setaffinity(PID, size_of::() + 1, &cpuset) }; | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ memory access failed: expected a pointer to 129 bytes of memory, but got ALLOC which is only 128 bytes from the end of the allocation @@ -7,12 +7,12 @@ LL | let err = unsafe { sched_setaffinity(PID, size_of::() + 1, & = 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 help: ALLOC was allocated here: - --> $DIR/affinity.rs:LL:CC + --> tests/fail-dep/libc/affinity.rs:LL:CC | LL | let cpuset: cpu_set_t = unsafe { core::mem::MaybeUninit::zeroed().assume_init() }; | ^^^^^^ = note: BACKTRACE (of the first span): - = note: inside `main` at $DIR/affinity.rs:LL:CC + = note: inside `main` at tests/fail-dep/libc/affinity.rs:LL:CC note: some details are omitted, run with `MIRIFLAGS=-Zmiri-backtrace=full` for a verbose backtrace diff --git a/tests/fail-dep/libc/aligned_alloc_size_zero_leak.rs b/tests/fail-dep/libc/aligned_alloc_size_zero_leak.rs index 9a33cdccd2..ab3f0214a7 100644 --- a/tests/fail-dep/libc/aligned_alloc_size_zero_leak.rs +++ b/tests/fail-dep/libc/aligned_alloc_size_zero_leak.rs @@ -1,4 +1,5 @@ -//@ignore-target-windows: Windows does not support the standard C11 aligned_alloc. +// Windows does not support the standard C11 aligned_alloc. +//@ignore-target: windows fn main() { // libc doesn't have this function (https://github.com/rust-lang/libc/issues/3689), diff --git a/tests/fail-dep/libc/aligned_alloc_size_zero_leak.stderr b/tests/fail-dep/libc/aligned_alloc_size_zero_leak.stderr index 91c6782332..bde7f5b515 100644 --- a/tests/fail-dep/libc/aligned_alloc_size_zero_leak.stderr +++ b/tests/fail-dep/libc/aligned_alloc_size_zero_leak.stderr @@ -1,11 +1,11 @@ error: memory leaked: ALLOC (C heap, size: 0, align: 2), allocated here: - --> $DIR/aligned_alloc_size_zero_leak.rs:LL:CC + --> tests/fail-dep/libc/aligned_alloc_size_zero_leak.rs:LL:CC | LL | aligned_alloc(2, 0); | ^^^^^^^^^^^^^^^^^^^ | = note: BACKTRACE: - = note: inside `main` at $DIR/aligned_alloc_size_zero_leak.rs:LL:CC + = note: inside `main` at tests/fail-dep/libc/aligned_alloc_size_zero_leak.rs:LL:CC note: some details are omitted, run with `MIRIFLAGS=-Zmiri-backtrace=full` for a verbose backtrace diff --git a/tests/fail-dep/libc/env-set_var-data-race.rs b/tests/fail-dep/libc/env-set_var-data-race.rs index a1895feb95..2d379320c1 100644 --- a/tests/fail-dep/libc/env-set_var-data-race.rs +++ b/tests/fail-dep/libc/env-set_var-data-race.rs @@ -1,5 +1,6 @@ //@compile-flags: -Zmiri-disable-isolation -Zmiri-preemption-rate=0 -//@ignore-target-windows: No libc env support on Windows +// No libc env support on Windows +//@ignore-target: windows use std::env; use std::thread; diff --git a/tests/fail-dep/libc/env-set_var-data-race.stderr b/tests/fail-dep/libc/env-set_var-data-race.stderr index f85234f562..904a1677b8 100644 --- a/tests/fail-dep/libc/env-set_var-data-race.stderr +++ b/tests/fail-dep/libc/env-set_var-data-race.stderr @@ -1,18 +1,18 @@ error: Undefined Behavior: Data race detected between (1) non-atomic write on thread `main` and (2) non-atomic read on thread `unnamed-ID` at ALLOC. (2) just happened here - --> $DIR/env-set_var-data-race.rs:LL:CC + --> tests/fail-dep/libc/env-set_var-data-race.rs:LL:CC | LL | libc::getenv(b"TZ/0".as_ptr().cast()); | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ Data race detected between (1) non-atomic write on thread `main` and (2) non-atomic read on thread `unnamed-ID` at ALLOC. (2) just happened here | help: and (1) occurred earlier here - --> $DIR/env-set_var-data-race.rs:LL:CC + --> tests/fail-dep/libc/env-set_var-data-race.rs:LL:CC | LL | env::set_var("MY_RUST_VAR", "Ferris"); | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ = 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 = note: BACKTRACE (of the first span) on thread `unnamed-ID`: - = note: inside closure at $DIR/env-set_var-data-race.rs:LL:CC + = note: inside closure at tests/fail-dep/libc/env-set_var-data-race.rs:LL:CC note: some details are omitted, run with `MIRIFLAGS=-Zmiri-backtrace=full` for a verbose backtrace diff --git a/tests/fail-dep/libc/fs/close_stdout.rs b/tests/fail-dep/libc/fs/close_stdout.rs index 42b7e2b783..b88cf81c1e 100644 --- a/tests/fail-dep/libc/fs/close_stdout.rs +++ b/tests/fail-dep/libc/fs/close_stdout.rs @@ -1,4 +1,5 @@ -//@ignore-target-windows: No libc IO on Windows +// No libc IO on Windows +//@ignore-target: windows //@compile-flags: -Zmiri-disable-isolation // FIXME: standard handles cannot be closed (https://github.com/rust-lang/rust/issues/40032) diff --git a/tests/fail-dep/libc/fs/close_stdout.stderr b/tests/fail-dep/libc/fs/close_stdout.stderr index e1b1b053bb..029eeab404 100644 --- a/tests/fail-dep/libc/fs/close_stdout.stderr +++ b/tests/fail-dep/libc/fs/close_stdout.stderr @@ -1,12 +1,12 @@ error: unsupported operation: cannot close stdout - --> $DIR/close_stdout.rs:LL:CC + --> tests/fail-dep/libc/fs/close_stdout.rs:LL:CC | LL | libc::close(1); | ^^^^^^^^^^^^^^ cannot close stdout | = help: this is likely not a bug in the program; it indicates that the program performed an operation that Miri does not support = note: BACKTRACE: - = note: inside `main` at $DIR/close_stdout.rs:LL:CC + = note: inside `main` at tests/fail-dep/libc/fs/close_stdout.rs:LL:CC note: some details are omitted, run with `MIRIFLAGS=-Zmiri-backtrace=full` for a verbose backtrace diff --git a/tests/fail-dep/libc/fs/isolated_stdin.rs b/tests/fail-dep/libc/fs/isolated_stdin.rs index 3c62015a05..c13231b6f4 100644 --- a/tests/fail-dep/libc/fs/isolated_stdin.rs +++ b/tests/fail-dep/libc/fs/isolated_stdin.rs @@ -1,4 +1,5 @@ -//@ignore-target-windows: No libc IO on Windows +// No libc IO on Windows +//@ignore-target: windows fn main() -> std::io::Result<()> { let mut bytes = [0u8; 512]; diff --git a/tests/fail-dep/libc/fs/isolated_stdin.stderr b/tests/fail-dep/libc/fs/isolated_stdin.stderr index 9abe145ea9..bb7e8cef5d 100644 --- a/tests/fail-dep/libc/fs/isolated_stdin.stderr +++ b/tests/fail-dep/libc/fs/isolated_stdin.stderr @@ -1,5 +1,5 @@ error: unsupported operation: `read` from stdin not available when isolation is enabled - --> $DIR/isolated_stdin.rs:LL:CC + --> tests/fail-dep/libc/fs/isolated_stdin.rs:LL:CC | LL | libc::read(0, bytes.as_mut_ptr() as *mut libc::c_void, 512); | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ `read` from stdin not available when isolation is enabled @@ -7,7 +7,7 @@ LL | libc::read(0, bytes.as_mut_ptr() as *mut libc::c_void, 512); = help: set `MIRIFLAGS=-Zmiri-disable-isolation` to disable isolation; = help: or set `MIRIFLAGS=-Zmiri-isolation-error=warn` to make Miri return an error code from isolated operations (if supported for that operation) and continue with a warning = note: BACKTRACE: - = note: inside `main` at $DIR/isolated_stdin.rs:LL:CC + = note: inside `main` at tests/fail-dep/libc/fs/isolated_stdin.rs:LL:CC note: some details are omitted, run with `MIRIFLAGS=-Zmiri-backtrace=full` for a verbose backtrace diff --git a/tests/fail-dep/libc/fs/mkstemp_immutable_arg.rs b/tests/fail-dep/libc/fs/mkstemp_immutable_arg.rs index 6d951a3a7b..14df0c43f7 100644 --- a/tests/fail-dep/libc/fs/mkstemp_immutable_arg.rs +++ b/tests/fail-dep/libc/fs/mkstemp_immutable_arg.rs @@ -1,4 +1,5 @@ -//@ignore-target-windows: No mkstemp on Windows +// No mkstemp on Windows +//@ignore-target: windows //@compile-flags: -Zmiri-disable-isolation fn main() { diff --git a/tests/fail-dep/libc/fs/mkstemp_immutable_arg.stderr b/tests/fail-dep/libc/fs/mkstemp_immutable_arg.stderr index 7a2757557e..9227bddf5a 100644 --- a/tests/fail-dep/libc/fs/mkstemp_immutable_arg.stderr +++ b/tests/fail-dep/libc/fs/mkstemp_immutable_arg.stderr @@ -1,5 +1,5 @@ error: Undefined Behavior: writing to ALLOC which is read-only - --> $DIR/mkstemp_immutable_arg.rs:LL:CC + --> tests/fail-dep/libc/fs/mkstemp_immutable_arg.rs:LL:CC | LL | let _fd = unsafe { libc::mkstemp(s) }; | ^^^^^^^^^^^^^^^^ writing to ALLOC which is read-only @@ -7,9 +7,9 @@ LL | let _fd = unsafe { libc::mkstemp(s) }; = 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 = note: BACKTRACE: - = note: inside `test_mkstemp_immutable_arg` at $DIR/mkstemp_immutable_arg.rs:LL:CC + = note: inside `test_mkstemp_immutable_arg` at tests/fail-dep/libc/fs/mkstemp_immutable_arg.rs:LL:CC note: inside `main` - --> $DIR/mkstemp_immutable_arg.rs:LL:CC + --> tests/fail-dep/libc/fs/mkstemp_immutable_arg.rs:LL:CC | LL | test_mkstemp_immutable_arg(); | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ diff --git a/tests/fail-dep/libc/fs/read_from_stdout.rs b/tests/fail-dep/libc/fs/read_from_stdout.rs index 624f584a0c..778f96da78 100644 --- a/tests/fail-dep/libc/fs/read_from_stdout.rs +++ b/tests/fail-dep/libc/fs/read_from_stdout.rs @@ -1,5 +1,6 @@ //@compile-flags: -Zmiri-disable-isolation -//@ignore-target-windows: No libc IO on Windows +// No libc IO on Windows +//@ignore-target: windows fn main() -> std::io::Result<()> { let mut bytes = [0u8; 512]; diff --git a/tests/fail-dep/libc/fs/read_from_stdout.stderr b/tests/fail-dep/libc/fs/read_from_stdout.stderr index baa6eb5ad6..1be2f08dd8 100644 --- a/tests/fail-dep/libc/fs/read_from_stdout.stderr +++ b/tests/fail-dep/libc/fs/read_from_stdout.stderr @@ -1,12 +1,12 @@ error: unsupported operation: cannot read from stdout - --> $DIR/read_from_stdout.rs:LL:CC + --> tests/fail-dep/libc/fs/read_from_stdout.rs:LL:CC | LL | libc::read(1, bytes.as_mut_ptr() as *mut libc::c_void, 512); | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ cannot read from stdout | = help: this is likely not a bug in the program; it indicates that the program performed an operation that Miri does not support = note: BACKTRACE: - = note: inside `main` at $DIR/read_from_stdout.rs:LL:CC + = note: inside `main` at tests/fail-dep/libc/fs/read_from_stdout.rs:LL:CC note: some details are omitted, run with `MIRIFLAGS=-Zmiri-backtrace=full` for a verbose backtrace diff --git a/tests/fail-dep/libc/fs/unix_open_missing_required_mode.rs b/tests/fail-dep/libc/fs/unix_open_missing_required_mode.rs index d783967f95..9cf01a34ac 100644 --- a/tests/fail-dep/libc/fs/unix_open_missing_required_mode.rs +++ b/tests/fail-dep/libc/fs/unix_open_missing_required_mode.rs @@ -1,4 +1,5 @@ -//@ignore-target-windows: No libc IO on Windows +// No libc IO on Windows +//@ignore-target: windows //@compile-flags: -Zmiri-disable-isolation fn main() { diff --git a/tests/fail-dep/libc/fs/unix_open_missing_required_mode.stderr b/tests/fail-dep/libc/fs/unix_open_missing_required_mode.stderr index 0988eefe22..971a2d7605 100644 --- a/tests/fail-dep/libc/fs/unix_open_missing_required_mode.stderr +++ b/tests/fail-dep/libc/fs/unix_open_missing_required_mode.stderr @@ -1,5 +1,5 @@ error: Undefined Behavior: incorrect number of arguments for `open` with `O_CREAT`: got 2, expected at least 3 - --> $DIR/unix_open_missing_required_mode.rs:LL:CC + --> tests/fail-dep/libc/fs/unix_open_missing_required_mode.rs:LL:CC | LL | ...safe { libc::open(name_ptr, libc::O_CREAT) }; | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ incorrect number of arguments for `open` with `O_CREAT`: got 2, expected at least 3 @@ -7,9 +7,9 @@ LL | ...safe { libc::open(name_ptr, libc::O_CREAT) }; = 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 = note: BACKTRACE: - = note: inside `test_file_open_missing_needed_mode` at $DIR/unix_open_missing_required_mode.rs:LL:CC + = note: inside `test_file_open_missing_needed_mode` at tests/fail-dep/libc/fs/unix_open_missing_required_mode.rs:LL:CC note: inside `main` - --> $DIR/unix_open_missing_required_mode.rs:LL:CC + --> tests/fail-dep/libc/fs/unix_open_missing_required_mode.rs:LL:CC | LL | test_file_open_missing_needed_mode(); | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ diff --git a/tests/fail-dep/libc/fs/write_to_stdin.rs b/tests/fail-dep/libc/fs/write_to_stdin.rs index 683c55e90e..683b8806a1 100644 --- a/tests/fail-dep/libc/fs/write_to_stdin.rs +++ b/tests/fail-dep/libc/fs/write_to_stdin.rs @@ -1,4 +1,5 @@ -//@ignore-target-windows: No libc IO on Windows +// No libc IO on Windows +//@ignore-target: windows fn main() -> std::io::Result<()> { let bytes = b"hello"; diff --git a/tests/fail-dep/libc/fs/write_to_stdin.stderr b/tests/fail-dep/libc/fs/write_to_stdin.stderr index 37323faf56..9726a1d2a9 100644 --- a/tests/fail-dep/libc/fs/write_to_stdin.stderr +++ b/tests/fail-dep/libc/fs/write_to_stdin.stderr @@ -1,12 +1,12 @@ error: unsupported operation: cannot write to stdin - --> $DIR/write_to_stdin.rs:LL:CC + --> tests/fail-dep/libc/fs/write_to_stdin.rs:LL:CC | LL | libc::write(0, bytes.as_ptr() as *const libc::c_void, 5); | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ cannot write to stdin | = help: this is likely not a bug in the program; it indicates that the program performed an operation that Miri does not support = note: BACKTRACE: - = note: inside `main` at $DIR/write_to_stdin.rs:LL:CC + = note: inside `main` at tests/fail-dep/libc/fs/write_to_stdin.rs:LL:CC note: some details are omitted, run with `MIRIFLAGS=-Zmiri-backtrace=full` for a verbose backtrace diff --git a/tests/fail-dep/libc/libc-read-and-uninit-premature-eof.rs b/tests/fail-dep/libc/libc-read-and-uninit-premature-eof.rs index 98ef454c88..e149fba2c3 100644 --- a/tests/fail-dep/libc/libc-read-and-uninit-premature-eof.rs +++ b/tests/fail-dep/libc/libc-read-and-uninit-premature-eof.rs @@ -1,6 +1,7 @@ //! We test that if we requested to read 4 bytes, but actually read 3 bytes, //! then 3 bytes (not 4) will be initialized. -//@ignore-target-windows: no file system support on Windows +// no file system support on Windows +//@ignore-target: windows //@compile-flags: -Zmiri-disable-isolation use std::ffi::CString; diff --git a/tests/fail-dep/libc/libc-read-and-uninit-premature-eof.stderr b/tests/fail-dep/libc/libc-read-and-uninit-premature-eof.stderr index e4c7aba07e..980d9810ab 100644 --- a/tests/fail-dep/libc/libc-read-and-uninit-premature-eof.stderr +++ b/tests/fail-dep/libc/libc-read-and-uninit-premature-eof.stderr @@ -1,5 +1,5 @@ error: Undefined Behavior: constructing invalid value at .value[3]: encountered uninitialized memory, but expected an integer - --> $DIR/libc-read-and-uninit-premature-eof.rs:LL:CC + --> tests/fail-dep/libc/libc-read-and-uninit-premature-eof.rs:LL:CC | LL | ... buf.assume_init(); | ^^^^^^^^^^^^^^^^^ constructing invalid value at .value[3]: encountered uninitialized memory, but expected an integer @@ -7,7 +7,7 @@ LL | ... buf.assume_init(); = 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 = note: BACKTRACE: - = note: inside `main` at $DIR/libc-read-and-uninit-premature-eof.rs:LL:CC + = note: inside `main` at tests/fail-dep/libc/libc-read-and-uninit-premature-eof.rs:LL:CC note: some details are omitted, run with `MIRIFLAGS=-Zmiri-backtrace=full` for a verbose backtrace diff --git a/tests/fail-dep/libc/libc_epoll_unsupported_fd.rs b/tests/fail-dep/libc/libc_epoll_unsupported_fd.rs index fb2426f7b6..03d4b2d663 100644 --- a/tests/fail-dep/libc/libc_epoll_unsupported_fd.rs +++ b/tests/fail-dep/libc/libc_epoll_unsupported_fd.rs @@ -1,4 +1,4 @@ -//@only-target-linux +//@only-target: linux // This is a test for registering unsupported fd with epoll. // Register epoll fd with epoll is allowed in real system, but we do not support this. diff --git a/tests/fail-dep/libc/libc_epoll_unsupported_fd.stderr b/tests/fail-dep/libc/libc_epoll_unsupported_fd.stderr index 6f9b988d4e..59797145c2 100644 --- a/tests/fail-dep/libc/libc_epoll_unsupported_fd.stderr +++ b/tests/fail-dep/libc/libc_epoll_unsupported_fd.stderr @@ -1,12 +1,12 @@ error: unsupported operation: epoll: epoll does not support this file description - --> $DIR/libc_epoll_unsupported_fd.rs:LL:CC + --> tests/fail-dep/libc/libc_epoll_unsupported_fd.rs:LL:CC | LL | let res = unsafe { libc::epoll_ctl(epfd0, libc::EPOLL_CTL_ADD, epfd1, &mut ev) }; | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ epoll: epoll does not support this file description | = help: this is likely not a bug in the program; it indicates that the program performed an operation that Miri does not support = note: BACKTRACE: - = note: inside `main` at $DIR/libc_epoll_unsupported_fd.rs:LL:CC + = note: inside `main` at tests/fail-dep/libc/libc_epoll_unsupported_fd.rs:LL:CC note: some details are omitted, run with `MIRIFLAGS=-Zmiri-backtrace=full` for a verbose backtrace diff --git a/tests/fail-dep/libc/libc_eventfd_read_block.rs b/tests/fail-dep/libc/libc_eventfd_read_block.rs index fb9a23206c..0212a63bd0 100644 --- a/tests/fail-dep/libc/libc_eventfd_read_block.rs +++ b/tests/fail-dep/libc/libc_eventfd_read_block.rs @@ -1,4 +1,4 @@ -//@only-target-linux +//@only-target: linux fn main() { // eventfd read will block when EFD_NONBLOCK flag is clear and counter = 0. // This will pass when blocking is implemented. diff --git a/tests/fail-dep/libc/libc_eventfd_read_block.stderr b/tests/fail-dep/libc/libc_eventfd_read_block.stderr index fdd0b4272c..aff30c81eb 100644 --- a/tests/fail-dep/libc/libc_eventfd_read_block.stderr +++ b/tests/fail-dep/libc/libc_eventfd_read_block.stderr @@ -1,12 +1,12 @@ error: unsupported operation: eventfd: blocking is unsupported - --> $DIR/libc_eventfd_read_block.rs:LL:CC + --> tests/fail-dep/libc/libc_eventfd_read_block.rs:LL:CC | LL | libc::read(fd, buf.as_mut_ptr().cast(), buf.len() as libc::size_t).try_into().unwrap() | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ eventfd: blocking is unsupported | = help: this is likely not a bug in the program; it indicates that the program performed an operation that Miri does not support = note: BACKTRACE: - = note: inside `main` at $DIR/libc_eventfd_read_block.rs:LL:CC + = note: inside `main` at tests/fail-dep/libc/libc_eventfd_read_block.rs:LL:CC note: some details are omitted, run with `MIRIFLAGS=-Zmiri-backtrace=full` for a verbose backtrace diff --git a/tests/fail-dep/libc/libc_eventfd_write_block.rs b/tests/fail-dep/libc/libc_eventfd_write_block.rs index 2037a516de..ed6ad46690 100644 --- a/tests/fail-dep/libc/libc_eventfd_write_block.rs +++ b/tests/fail-dep/libc/libc_eventfd_write_block.rs @@ -1,4 +1,4 @@ -//@only-target-linux +//@only-target: linux fn main() { // eventfd write will block when EFD_NONBLOCK flag is clear // and the addition caused counter to exceed u64::MAX - 1. diff --git a/tests/fail-dep/libc/libc_eventfd_write_block.stderr b/tests/fail-dep/libc/libc_eventfd_write_block.stderr index f12c0ddfb1..2b60660579 100644 --- a/tests/fail-dep/libc/libc_eventfd_write_block.stderr +++ b/tests/fail-dep/libc/libc_eventfd_write_block.stderr @@ -1,12 +1,12 @@ error: unsupported operation: eventfd: blocking is unsupported - --> $DIR/libc_eventfd_write_block.rs:LL:CC + --> tests/fail-dep/libc/libc_eventfd_write_block.rs:LL:CC | LL | libc::write(fd, sized_8_data.as_ptr() as *const libc::c_void, 8).try_into().unwrap() | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ eventfd: blocking is unsupported | = help: this is likely not a bug in the program; it indicates that the program performed an operation that Miri does not support = note: BACKTRACE: - = note: inside `main` at $DIR/libc_eventfd_write_block.rs:LL:CC + = note: inside `main` at tests/fail-dep/libc/libc_eventfd_write_block.rs:LL:CC note: some details are omitted, run with `MIRIFLAGS=-Zmiri-backtrace=full` for a verbose backtrace diff --git a/tests/fail-dep/libc/malloc_zero_double_free.stderr b/tests/fail-dep/libc/malloc_zero_double_free.stderr index 6437c9dbeb..d6337c059b 100644 --- a/tests/fail-dep/libc/malloc_zero_double_free.stderr +++ b/tests/fail-dep/libc/malloc_zero_double_free.stderr @@ -1,5 +1,5 @@ error: Undefined Behavior: memory access failed: ALLOC has been freed, so this pointer is dangling - --> $DIR/malloc_zero_double_free.rs:LL:CC + --> tests/fail-dep/libc/malloc_zero_double_free.rs:LL:CC | LL | libc::free(ptr); | ^^^^^^^^^^^^^^^ memory access failed: ALLOC has been freed, so this pointer is dangling @@ -7,17 +7,17 @@ LL | libc::free(ptr); = 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 help: ALLOC was allocated here: - --> $DIR/malloc_zero_double_free.rs:LL:CC + --> tests/fail-dep/libc/malloc_zero_double_free.rs:LL:CC | LL | let ptr = libc::malloc(0); | ^^^^^^^^^^^^^^^ help: ALLOC was deallocated here: - --> $DIR/malloc_zero_double_free.rs:LL:CC + --> tests/fail-dep/libc/malloc_zero_double_free.rs:LL:CC | LL | libc::free(ptr); | ^^^^^^^^^^^^^^^ = note: BACKTRACE (of the first span): - = note: inside `main` at $DIR/malloc_zero_double_free.rs:LL:CC + = note: inside `main` at tests/fail-dep/libc/malloc_zero_double_free.rs:LL:CC note: some details are omitted, run with `MIRIFLAGS=-Zmiri-backtrace=full` for a verbose backtrace diff --git a/tests/fail-dep/libc/malloc_zero_memory_leak.stderr b/tests/fail-dep/libc/malloc_zero_memory_leak.stderr index 657262b8d4..6f3d7fa7a4 100644 --- a/tests/fail-dep/libc/malloc_zero_memory_leak.stderr +++ b/tests/fail-dep/libc/malloc_zero_memory_leak.stderr @@ -1,11 +1,11 @@ error: memory leaked: ALLOC (C heap, size: 0, align: 1), allocated here: - --> $DIR/malloc_zero_memory_leak.rs:LL:CC + --> tests/fail-dep/libc/malloc_zero_memory_leak.rs:LL:CC | LL | let _ptr = libc::malloc(0); | ^^^^^^^^^^^^^^^ | = note: BACKTRACE: - = note: inside `main` at $DIR/malloc_zero_memory_leak.rs:LL:CC + = note: inside `main` at tests/fail-dep/libc/malloc_zero_memory_leak.rs:LL:CC note: some details are omitted, run with `MIRIFLAGS=-Zmiri-backtrace=full` for a verbose backtrace diff --git a/tests/fail-dep/libc/memchr_null.stderr b/tests/fail-dep/libc/memchr_null.stderr index f03ae33ed9..6d3ff176c3 100644 --- a/tests/fail-dep/libc/memchr_null.stderr +++ b/tests/fail-dep/libc/memchr_null.stderr @@ -1,5 +1,5 @@ error: Undefined Behavior: out-of-bounds pointer use: expected a pointer to some allocation, but got a null pointer - --> $DIR/memchr_null.rs:LL:CC + --> tests/fail-dep/libc/memchr_null.rs:LL:CC | LL | libc::memchr(ptr::null(), 0, 0); | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ out-of-bounds pointer use: expected a pointer to some allocation, but got a null pointer @@ -7,7 +7,7 @@ LL | libc::memchr(ptr::null(), 0, 0); = 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 = note: BACKTRACE: - = note: inside `main` at $DIR/memchr_null.rs:LL:CC + = note: inside `main` at tests/fail-dep/libc/memchr_null.rs:LL:CC note: some details are omitted, run with `MIRIFLAGS=-Zmiri-backtrace=full` for a verbose backtrace diff --git a/tests/fail-dep/libc/memcmp_null.stderr b/tests/fail-dep/libc/memcmp_null.stderr index 4bca5a3db0..a4ca205c37 100644 --- a/tests/fail-dep/libc/memcmp_null.stderr +++ b/tests/fail-dep/libc/memcmp_null.stderr @@ -1,5 +1,5 @@ error: Undefined Behavior: out-of-bounds pointer use: expected a pointer to some allocation, but got a null pointer - --> $DIR/memcmp_null.rs:LL:CC + --> tests/fail-dep/libc/memcmp_null.rs:LL:CC | LL | libc::memcmp(ptr::null(), ptr::null(), 0); | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ out-of-bounds pointer use: expected a pointer to some allocation, but got a null pointer @@ -7,7 +7,7 @@ LL | libc::memcmp(ptr::null(), ptr::null(), 0); = 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 = note: BACKTRACE: - = note: inside `main` at $DIR/memcmp_null.rs:LL:CC + = note: inside `main` at tests/fail-dep/libc/memcmp_null.rs:LL:CC note: some details are omitted, run with `MIRIFLAGS=-Zmiri-backtrace=full` for a verbose backtrace diff --git a/tests/fail-dep/libc/memcmp_zero.stderr b/tests/fail-dep/libc/memcmp_zero.stderr index 6adaaeb3db..d7b046c182 100644 --- a/tests/fail-dep/libc/memcmp_zero.stderr +++ b/tests/fail-dep/libc/memcmp_zero.stderr @@ -1,5 +1,5 @@ error: Undefined Behavior: out-of-bounds pointer use: expected a pointer to some allocation, but got 0x2a[noalloc] which is a dangling pointer (it has no provenance) - --> $DIR/memcmp_zero.rs:LL:CC + --> tests/fail-dep/libc/memcmp_zero.rs:LL:CC | LL | libc::memcmp(ptr.cast(), ptr.cast(), 0); | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ out-of-bounds pointer use: expected a pointer to some allocation, but got 0x2a[noalloc] which is a dangling pointer (it has no provenance) @@ -7,7 +7,7 @@ LL | libc::memcmp(ptr.cast(), ptr.cast(), 0); = 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 = note: BACKTRACE: - = note: inside `main` at $DIR/memcmp_zero.rs:LL:CC + = note: inside `main` at tests/fail-dep/libc/memcmp_zero.rs:LL:CC note: some details are omitted, run with `MIRIFLAGS=-Zmiri-backtrace=full` for a verbose backtrace diff --git a/tests/fail-dep/libc/memcpy_zero.stderr b/tests/fail-dep/libc/memcpy_zero.stderr index b2da332df2..336113e344 100644 --- a/tests/fail-dep/libc/memcpy_zero.stderr +++ b/tests/fail-dep/libc/memcpy_zero.stderr @@ -1,5 +1,5 @@ error: Undefined Behavior: out-of-bounds pointer use: expected a pointer to some allocation, but got 0x17[noalloc] which is a dangling pointer (it has no provenance) - --> $DIR/memcpy_zero.rs:LL:CC + --> tests/fail-dep/libc/memcpy_zero.rs:LL:CC | LL | libc::memcpy(to.cast(), from.cast(), 0); | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ out-of-bounds pointer use: expected a pointer to some allocation, but got 0x17[noalloc] which is a dangling pointer (it has no provenance) @@ -7,7 +7,7 @@ LL | libc::memcpy(to.cast(), from.cast(), 0); = 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 = note: BACKTRACE: - = note: inside `main` at $DIR/memcpy_zero.rs:LL:CC + = note: inside `main` at tests/fail-dep/libc/memcpy_zero.rs:LL:CC note: some details are omitted, run with `MIRIFLAGS=-Zmiri-backtrace=full` for a verbose backtrace diff --git a/tests/fail-dep/libc/memrchr_null.rs b/tests/fail-dep/libc/memrchr_null.rs index 1fe637d6ce..6bfec6c477 100644 --- a/tests/fail-dep/libc/memrchr_null.rs +++ b/tests/fail-dep/libc/memrchr_null.rs @@ -1,5 +1,7 @@ -//@ignore-target-windows: No `memrchr` on Windows -//@ignore-target-apple: No `memrchr` on some apple targets +// No `memrchr` on Windows +//@ignore-target: windows +// No `memrchr` on some apple targets +//@ignore-target: apple use std::ptr; diff --git a/tests/fail-dep/libc/memrchr_null.stderr b/tests/fail-dep/libc/memrchr_null.stderr index a9ed58d61b..ce759f3e17 100644 --- a/tests/fail-dep/libc/memrchr_null.stderr +++ b/tests/fail-dep/libc/memrchr_null.stderr @@ -1,5 +1,5 @@ error: Undefined Behavior: out-of-bounds pointer use: expected a pointer to some allocation, but got a null pointer - --> $DIR/memrchr_null.rs:LL:CC + --> tests/fail-dep/libc/memrchr_null.rs:LL:CC | LL | libc::memrchr(ptr::null(), 0, 0); | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ out-of-bounds pointer use: expected a pointer to some allocation, but got a null pointer @@ -7,7 +7,7 @@ LL | libc::memrchr(ptr::null(), 0, 0); = 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 = note: BACKTRACE: - = note: inside `main` at $DIR/memrchr_null.rs:LL:CC + = note: inside `main` at tests/fail-dep/libc/memrchr_null.rs:LL:CC note: some details are omitted, run with `MIRIFLAGS=-Zmiri-backtrace=full` for a verbose backtrace diff --git a/tests/fail-dep/libc/mmap_invalid_dealloc.rs b/tests/fail-dep/libc/mmap_invalid_dealloc.rs index 9d55a49355..2001111ddf 100644 --- a/tests/fail-dep/libc/mmap_invalid_dealloc.rs +++ b/tests/fail-dep/libc/mmap_invalid_dealloc.rs @@ -1,5 +1,6 @@ //@compile-flags: -Zmiri-disable-isolation -//@ignore-target-windows: No mmap on Windows +// No mmap on Windows +//@ignore-target: windows #![feature(rustc_private)] diff --git a/tests/fail-dep/libc/mmap_invalid_dealloc.stderr b/tests/fail-dep/libc/mmap_invalid_dealloc.stderr index cec67b6ef8..193c9f1ecc 100644 --- a/tests/fail-dep/libc/mmap_invalid_dealloc.stderr +++ b/tests/fail-dep/libc/mmap_invalid_dealloc.stderr @@ -1,5 +1,5 @@ error: Undefined Behavior: deallocating ALLOC, which is mmap memory, using C heap deallocation operation - --> $DIR/mmap_invalid_dealloc.rs:LL:CC + --> tests/fail-dep/libc/mmap_invalid_dealloc.rs:LL:CC | LL | libc::free(ptr); | ^^^^^^^^^^^^^^^ deallocating ALLOC, which is mmap memory, using C heap deallocation operation @@ -7,7 +7,7 @@ LL | libc::free(ptr); = 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 = note: BACKTRACE: - = note: inside `main` at $DIR/mmap_invalid_dealloc.rs:LL:CC + = note: inside `main` at tests/fail-dep/libc/mmap_invalid_dealloc.rs:LL:CC note: some details are omitted, run with `MIRIFLAGS=-Zmiri-backtrace=full` for a verbose backtrace diff --git a/tests/fail-dep/libc/mmap_use_after_munmap.rs b/tests/fail-dep/libc/mmap_use_after_munmap.rs index 05ac232f5d..bbe70c9f6a 100644 --- a/tests/fail-dep/libc/mmap_use_after_munmap.rs +++ b/tests/fail-dep/libc/mmap_use_after_munmap.rs @@ -1,5 +1,6 @@ //@compile-flags: -Zmiri-disable-isolation -//@ignore-target-windows: No mmap on Windows +// No mmap on Windows +//@ignore-target: windows #![feature(rustc_private)] diff --git a/tests/fail-dep/libc/mmap_use_after_munmap.stderr b/tests/fail-dep/libc/mmap_use_after_munmap.stderr index 49f2b84baa..8404aeb5a7 100644 --- a/tests/fail-dep/libc/mmap_use_after_munmap.stderr +++ b/tests/fail-dep/libc/mmap_use_after_munmap.stderr @@ -1,5 +1,5 @@ error: Undefined Behavior: memory access failed: ALLOC has been freed, so this pointer is dangling - --> $DIR/mmap_use_after_munmap.rs:LL:CC + --> tests/fail-dep/libc/mmap_use_after_munmap.rs:LL:CC | LL | let _x = *(ptr as *mut u8); | ^^^^^^^^^^^^^^^^^ memory access failed: ALLOC has been freed, so this pointer is dangling @@ -7,7 +7,7 @@ LL | let _x = *(ptr as *mut u8); = 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 help: ALLOC was allocated here: - --> $DIR/mmap_use_after_munmap.rs:LL:CC + --> tests/fail-dep/libc/mmap_use_after_munmap.rs:LL:CC | LL | let ptr = libc::mmap( | ___________________^ @@ -19,12 +19,12 @@ LL | | 0, LL | | ); | |_________^ help: ALLOC was deallocated here: - --> $DIR/mmap_use_after_munmap.rs:LL:CC + --> tests/fail-dep/libc/mmap_use_after_munmap.rs:LL:CC | LL | libc::munmap(ptr, 4096); | ^^^^^^^^^^^^^^^^^^^^^^^ = note: BACKTRACE (of the first span): - = note: inside `main` at $DIR/mmap_use_after_munmap.rs:LL:CC + = note: inside `main` at tests/fail-dep/libc/mmap_use_after_munmap.rs:LL:CC note: some details are omitted, run with `MIRIFLAGS=-Zmiri-backtrace=full` for a verbose backtrace diff --git a/tests/fail-dep/libc/munmap_partial.rs b/tests/fail-dep/libc/munmap_partial.rs index 4386dc71af..431c71a58e 100644 --- a/tests/fail-dep/libc/munmap_partial.rs +++ b/tests/fail-dep/libc/munmap_partial.rs @@ -1,7 +1,8 @@ //! The man pages for mmap/munmap suggest that it is possible to partly unmap a previously-mapped //! region of address space, but to LLVM that would be partial deallocation, which LLVM does not //! support. So even though the man pages say this sort of use is possible, we must report UB. -//@ignore-target-windows: No mmap on Windows +// No mmap on Windows +//@ignore-target: windows //@normalize-stderr-test: "size [0-9]+ and alignment" -> "size SIZE and alignment" fn main() { diff --git a/tests/fail-dep/libc/munmap_partial.stderr b/tests/fail-dep/libc/munmap_partial.stderr index 39825eb27c..7b1703a968 100644 --- a/tests/fail-dep/libc/munmap_partial.stderr +++ b/tests/fail-dep/libc/munmap_partial.stderr @@ -1,5 +1,5 @@ error: Undefined Behavior: incorrect layout on deallocation: ALLOC has size SIZE and alignment ALIGN, but gave size SIZE and alignment ALIGN - --> $DIR/munmap_partial.rs:LL:CC + --> tests/fail-dep/libc/munmap_partial.rs:LL:CC | LL | libc::munmap(ptr, 1); | ^^^^^^^^^^^^^^^^^^^^ incorrect layout on deallocation: ALLOC has size SIZE and alignment ALIGN, but gave size SIZE and alignment ALIGN @@ -7,7 +7,7 @@ LL | libc::munmap(ptr, 1); = 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 = note: BACKTRACE: - = note: inside `main` at $DIR/munmap_partial.rs:LL:CC + = note: inside `main` at tests/fail-dep/libc/munmap_partial.rs:LL:CC note: some details are omitted, run with `MIRIFLAGS=-Zmiri-backtrace=full` for a verbose backtrace diff --git a/tests/fail-dep/libc/posix_memalign_size_zero_double_free.rs b/tests/fail-dep/libc/posix_memalign_size_zero_double_free.rs index b6b7b007f2..6011f9f332 100644 --- a/tests/fail-dep/libc/posix_memalign_size_zero_double_free.rs +++ b/tests/fail-dep/libc/posix_memalign_size_zero_double_free.rs @@ -1,4 +1,5 @@ -//@ignore-target-windows: No posix_memalign on Windows +// No posix_memalign on Windows +//@ignore-target: windows use std::ptr; diff --git a/tests/fail-dep/libc/posix_memalign_size_zero_double_free.stderr b/tests/fail-dep/libc/posix_memalign_size_zero_double_free.stderr index 3ed117c5a0..1d73ec9575 100644 --- a/tests/fail-dep/libc/posix_memalign_size_zero_double_free.stderr +++ b/tests/fail-dep/libc/posix_memalign_size_zero_double_free.stderr @@ -1,5 +1,5 @@ error: Undefined Behavior: memory access failed: ALLOC has been freed, so this pointer is dangling - --> $DIR/posix_memalign_size_zero_double_free.rs:LL:CC + --> tests/fail-dep/libc/posix_memalign_size_zero_double_free.rs:LL:CC | LL | libc::free(ptr); | ^^^^^^^^^^^^^^^ memory access failed: ALLOC has been freed, so this pointer is dangling @@ -7,17 +7,17 @@ LL | libc::free(ptr); = 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 help: ALLOC was allocated here: - --> $DIR/posix_memalign_size_zero_double_free.rs:LL:CC + --> tests/fail-dep/libc/posix_memalign_size_zero_double_free.rs:LL:CC | LL | let _ = libc::posix_memalign(&mut ptr, align, size); | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: ALLOC was deallocated here: - --> $DIR/posix_memalign_size_zero_double_free.rs:LL:CC + --> tests/fail-dep/libc/posix_memalign_size_zero_double_free.rs:LL:CC | LL | libc::free(ptr); | ^^^^^^^^^^^^^^^ = note: BACKTRACE (of the first span): - = note: inside `main` at $DIR/posix_memalign_size_zero_double_free.rs:LL:CC + = note: inside `main` at tests/fail-dep/libc/posix_memalign_size_zero_double_free.rs:LL:CC note: some details are omitted, run with `MIRIFLAGS=-Zmiri-backtrace=full` for a verbose backtrace diff --git a/tests/fail-dep/libc/posix_memalign_size_zero_leak.rs b/tests/fail-dep/libc/posix_memalign_size_zero_leak.rs index 1a4c9605fe..a1456acb6b 100644 --- a/tests/fail-dep/libc/posix_memalign_size_zero_leak.rs +++ b/tests/fail-dep/libc/posix_memalign_size_zero_leak.rs @@ -1,4 +1,5 @@ -//@ignore-target-windows: No posix_memalign on Windows +// No posix_memalign on Windows +//@ignore-target: windows use std::ptr; diff --git a/tests/fail-dep/libc/posix_memalign_size_zero_leak.stderr b/tests/fail-dep/libc/posix_memalign_size_zero_leak.stderr index 2639031f1c..4546185b13 100644 --- a/tests/fail-dep/libc/posix_memalign_size_zero_leak.stderr +++ b/tests/fail-dep/libc/posix_memalign_size_zero_leak.stderr @@ -1,11 +1,11 @@ error: memory leaked: ALLOC (C heap, size: 0, align: 64), allocated here: - --> $DIR/posix_memalign_size_zero_leak.rs:LL:CC + --> tests/fail-dep/libc/posix_memalign_size_zero_leak.rs:LL:CC | LL | let _ = unsafe { libc::posix_memalign(&mut ptr, align, size) }; | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | = note: BACKTRACE: - = note: inside `main` at $DIR/posix_memalign_size_zero_leak.rs:LL:CC + = note: inside `main` at tests/fail-dep/libc/posix_memalign_size_zero_leak.rs:LL:CC note: some details are omitted, run with `MIRIFLAGS=-Zmiri-backtrace=full` for a verbose backtrace diff --git a/tests/fail-dep/libc/realloc-zero.stderr b/tests/fail-dep/libc/realloc-zero.stderr index 749a61f739..6f8095dbba 100644 --- a/tests/fail-dep/libc/realloc-zero.stderr +++ b/tests/fail-dep/libc/realloc-zero.stderr @@ -1,5 +1,5 @@ error: Undefined Behavior: `realloc` with a size of zero - --> $DIR/realloc-zero.rs:LL:CC + --> tests/fail-dep/libc/realloc-zero.rs:LL:CC | LL | let p2 = libc::realloc(p1, 0); | ^^^^^^^^^^^^^^^^^^^^ `realloc` with a size of zero @@ -7,7 +7,7 @@ LL | let p2 = libc::realloc(p1, 0); = 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 = note: BACKTRACE: - = note: inside `main` at $DIR/realloc-zero.rs:LL:CC + = note: inside `main` at tests/fail-dep/libc/realloc-zero.rs:LL:CC note: some details are omitted, run with `MIRIFLAGS=-Zmiri-backtrace=full` for a verbose backtrace diff --git a/tests/fail-dep/libc/socketpair_read_blocking.rs b/tests/fail-dep/libc/socketpair_read_blocking.rs index c28a6d966f..5ef3be5fee 100644 --- a/tests/fail-dep/libc/socketpair_read_blocking.rs +++ b/tests/fail-dep/libc/socketpair_read_blocking.rs @@ -1,4 +1,5 @@ -//@ignore-target-windows: no libc socketpair on Windows +// no libc socketpair on Windows +//@ignore-target: windows // This is temporarily here because blocking on fd is not supported yet. // When blocking is eventually supported, this will be moved to pass-dep/libc/libc-socketpair diff --git a/tests/fail-dep/libc/socketpair_read_blocking.stderr b/tests/fail-dep/libc/socketpair_read_blocking.stderr index b5ed72d9f1..dff332f999 100644 --- a/tests/fail-dep/libc/socketpair_read_blocking.stderr +++ b/tests/fail-dep/libc/socketpair_read_blocking.stderr @@ -1,12 +1,12 @@ error: unsupported operation: socketpair read: blocking isn't supported yet - --> $DIR/socketpair_read_blocking.rs:LL:CC + --> tests/fail-dep/libc/socketpair_read_blocking.rs:LL:CC | LL | let _res = unsafe { libc::read(fds[1], buf.as_mut_ptr().cast(), buf.len() as libc::size_t) }; | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ socketpair read: blocking isn't supported yet | = help: this is likely not a bug in the program; it indicates that the program performed an operation that Miri does not support = note: BACKTRACE: - = note: inside `main` at $DIR/socketpair_read_blocking.rs:LL:CC + = note: inside `main` at tests/fail-dep/libc/socketpair_read_blocking.rs:LL:CC note: some details are omitted, run with `MIRIFLAGS=-Zmiri-backtrace=full` for a verbose backtrace diff --git a/tests/fail-dep/libc/socketpair_write_blocking.rs b/tests/fail-dep/libc/socketpair_write_blocking.rs index e2fbc0ae4b..d14dc83204 100644 --- a/tests/fail-dep/libc/socketpair_write_blocking.rs +++ b/tests/fail-dep/libc/socketpair_write_blocking.rs @@ -1,4 +1,5 @@ -//@ignore-target-windows: no libc socketpair on Windows +// no libc socketpair on Windows +//@ignore-target: windows // This is temporarily here because blocking on fd is not supported yet. // When blocking is eventually supported, this will be moved to pass-dep/libc/libc-socketpair fn main() { diff --git a/tests/fail-dep/libc/socketpair_write_blocking.stderr b/tests/fail-dep/libc/socketpair_write_blocking.stderr index 7b3a0d2763..0dd89a15c7 100644 --- a/tests/fail-dep/libc/socketpair_write_blocking.stderr +++ b/tests/fail-dep/libc/socketpair_write_blocking.stderr @@ -1,12 +1,12 @@ error: unsupported operation: socketpair write: blocking isn't supported yet - --> $DIR/socketpair_write_blocking.rs:LL:CC + --> tests/fail-dep/libc/socketpair_write_blocking.rs:LL:CC | LL | let _ = unsafe { libc::write(fds[0], data as *const libc::c_void, 3) }; | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ socketpair write: blocking isn't supported yet | = help: this is likely not a bug in the program; it indicates that the program performed an operation that Miri does not support = note: BACKTRACE: - = note: inside `main` at $DIR/socketpair_write_blocking.rs:LL:CC + = note: inside `main` at tests/fail-dep/libc/socketpair_write_blocking.rs:LL:CC note: some details are omitted, run with `MIRIFLAGS=-Zmiri-backtrace=full` for a verbose backtrace diff --git a/tests/fail-dep/libc/unsupported_incomplete_function.rs b/tests/fail-dep/libc/unsupported_incomplete_function.rs index cd8422f4af..2bb722e474 100644 --- a/tests/fail-dep/libc/unsupported_incomplete_function.rs +++ b/tests/fail-dep/libc/unsupported_incomplete_function.rs @@ -1,6 +1,7 @@ //! `signal()` is special on Linux and macOS that it's only supported within libstd. //! The implementation is not complete enough to permit user code to call it. -//@ignore-target-windows: No `libc::signal` on Windows +// No `libc::signal` on Windows +//@ignore-target: windows //@normalize-stderr-test: "OS `.*`" -> "$$OS" fn main() { diff --git a/tests/fail-dep/libc/unsupported_incomplete_function.stderr b/tests/fail-dep/libc/unsupported_incomplete_function.stderr index f62622e29b..a92a97cef3 100644 --- a/tests/fail-dep/libc/unsupported_incomplete_function.stderr +++ b/tests/fail-dep/libc/unsupported_incomplete_function.stderr @@ -1,5 +1,5 @@ error: unsupported operation: can't call foreign function `signal` on $OS - --> $DIR/unsupported_incomplete_function.rs:LL:CC + --> tests/fail-dep/libc/unsupported_incomplete_function.rs:LL:CC | LL | libc::signal(libc::SIGPIPE, libc::SIG_IGN); | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ can't call foreign function `signal` on $OS @@ -7,7 +7,7 @@ LL | libc::signal(libc::SIGPIPE, libc::SIG_IGN); = help: if this is a basic API commonly used on this target, please report an issue with Miri = help: however, note that Miri does not aim to support every FFI function out there; for instance, we will not support APIs for things such as GUIs, scripting languages, or databases = note: BACKTRACE: - = note: inside `main` at $DIR/unsupported_incomplete_function.rs:LL:CC + = note: inside `main` at tests/fail-dep/libc/unsupported_incomplete_function.rs:LL:CC note: some details are omitted, run with `MIRIFLAGS=-Zmiri-backtrace=full` for a verbose backtrace diff --git a/tests/fail/alloc/alloc_error_handler.stderr b/tests/fail/alloc/alloc_error_handler.stderr index d1731a0f42..3642f3f28c 100644 --- a/tests/fail/alloc/alloc_error_handler.stderr +++ b/tests/fail/alloc/alloc_error_handler.stderr @@ -13,7 +13,7 @@ LL | ABORT(); = note: inside `std::alloc::handle_alloc_error::rt_error` at RUSTLIB/alloc/src/alloc.rs:LL:CC = note: inside `std::alloc::handle_alloc_error` at RUSTLIB/alloc/src/alloc.rs:LL:CC note: inside `main` - --> $DIR/alloc_error_handler.rs:LL:CC + --> tests/fail/alloc/alloc_error_handler.rs:LL:CC | LL | handle_alloc_error(Layout::for_value(&0)); | ^ diff --git a/tests/fail/alloc/alloc_error_handler_custom.stderr b/tests/fail/alloc/alloc_error_handler_custom.stderr index 5d9c2e2fb4..d12e119bce 100644 --- a/tests/fail/alloc/alloc_error_handler_custom.stderr +++ b/tests/fail/alloc/alloc_error_handler_custom.stderr @@ -1,14 +1,14 @@ custom alloc error handler: Layout { size: 4, align: 4 (1 << 2) } error: abnormal termination: the program aborted execution - --> $DIR/alloc_error_handler_custom.rs:LL:CC + --> tests/fail/alloc/alloc_error_handler_custom.rs:LL:CC | LL | core::intrinsics::abort(); | ^^^^^^^^^^^^^^^^^^^^^^^^^ the program aborted execution | = note: BACKTRACE: - = note: inside `alloc_error_handler` at $DIR/alloc_error_handler_custom.rs:LL:CC + = note: inside `alloc_error_handler` at tests/fail/alloc/alloc_error_handler_custom.rs:LL:CC note: inside `_::__rg_oom` - --> $DIR/alloc_error_handler_custom.rs:LL:CC + --> tests/fail/alloc/alloc_error_handler_custom.rs:LL:CC | LL | #[alloc_error_handler] | ---------------------- in this procedural macro expansion @@ -17,7 +17,7 @@ LL | fn alloc_error_handler(layout: Layout) -> ! { = note: inside `alloc::alloc::handle_alloc_error::rt_error` at RUSTLIB/alloc/src/alloc.rs:LL:CC = note: inside `alloc::alloc::handle_alloc_error` at RUSTLIB/alloc/src/alloc.rs:LL:CC note: inside `start` - --> $DIR/alloc_error_handler_custom.rs:LL:CC + --> tests/fail/alloc/alloc_error_handler_custom.rs:LL:CC | LL | handle_alloc_error(Layout::for_value(&0)); | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ diff --git a/tests/fail/alloc/alloc_error_handler_no_std.stderr b/tests/fail/alloc/alloc_error_handler_no_std.stderr index 6b98f6f75d..f495d65a8b 100644 --- a/tests/fail/alloc/alloc_error_handler_no_std.stderr +++ b/tests/fail/alloc/alloc_error_handler_no_std.stderr @@ -2,18 +2,18 @@ custom panic handler called! panicked at RUSTLIB/alloc/src/alloc.rs:LL:CC: memory allocation of 4 bytes failed error: abnormal termination: the program aborted execution - --> $DIR/alloc_error_handler_no_std.rs:LL:CC + --> tests/fail/alloc/alloc_error_handler_no_std.rs:LL:CC | LL | core::intrinsics::abort(); | ^^^^^^^^^^^^^^^^^^^^^^^^^ the program aborted execution | = note: BACKTRACE: - = note: inside `panic_handler` at $DIR/alloc_error_handler_no_std.rs:LL:CC + = note: inside `panic_handler` at tests/fail/alloc/alloc_error_handler_no_std.rs:LL:CC = note: inside `alloc::alloc::__alloc_error_handler::__rdl_oom` at RUSTLIB/alloc/src/alloc.rs:LL:CC = note: inside `alloc::alloc::handle_alloc_error::rt_error` at RUSTLIB/alloc/src/alloc.rs:LL:CC = note: inside `alloc::alloc::handle_alloc_error` at RUSTLIB/alloc/src/alloc.rs:LL:CC note: inside `start` - --> $DIR/alloc_error_handler_no_std.rs:LL:CC + --> tests/fail/alloc/alloc_error_handler_no_std.rs:LL:CC | LL | handle_alloc_error(Layout::for_value(&0)); | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ diff --git a/tests/fail/alloc/deallocate-bad-alignment.stderr b/tests/fail/alloc/deallocate-bad-alignment.stderr index 40ed093198..9c7f79856d 100644 --- a/tests/fail/alloc/deallocate-bad-alignment.stderr +++ b/tests/fail/alloc/deallocate-bad-alignment.stderr @@ -9,7 +9,7 @@ LL | unsafe { __rust_dealloc(ptr, layout.size(), layout.align()) } = note: BACKTRACE: = note: inside `std::alloc::dealloc` at RUSTLIB/alloc/src/alloc.rs:LL:CC note: inside `main` - --> $DIR/deallocate-bad-alignment.rs:LL:CC + --> tests/fail/alloc/deallocate-bad-alignment.rs:LL:CC | LL | dealloc(x, Layout::from_size_align_unchecked(1, 2)); | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ diff --git a/tests/fail/alloc/deallocate-bad-size.stderr b/tests/fail/alloc/deallocate-bad-size.stderr index e9b935d2c8..d0397c465f 100644 --- a/tests/fail/alloc/deallocate-bad-size.stderr +++ b/tests/fail/alloc/deallocate-bad-size.stderr @@ -9,7 +9,7 @@ LL | unsafe { __rust_dealloc(ptr, layout.size(), layout.align()) } = note: BACKTRACE: = note: inside `std::alloc::dealloc` at RUSTLIB/alloc/src/alloc.rs:LL:CC note: inside `main` - --> $DIR/deallocate-bad-size.rs:LL:CC + --> tests/fail/alloc/deallocate-bad-size.rs:LL:CC | LL | dealloc(x, Layout::from_size_align_unchecked(2, 1)); | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ diff --git a/tests/fail/alloc/deallocate-twice.stderr b/tests/fail/alloc/deallocate-twice.stderr index 76abd96e24..3bc1a558fe 100644 --- a/tests/fail/alloc/deallocate-twice.stderr +++ b/tests/fail/alloc/deallocate-twice.stderr @@ -7,19 +7,19 @@ LL | unsafe { __rust_dealloc(ptr, layout.size(), layout.align()) } = 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 help: ALLOC was allocated here: - --> $DIR/deallocate-twice.rs:LL:CC + --> tests/fail/alloc/deallocate-twice.rs:LL:CC | LL | let x = alloc(Layout::from_size_align_unchecked(1, 1)); | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: ALLOC was deallocated here: - --> $DIR/deallocate-twice.rs:LL:CC + --> tests/fail/alloc/deallocate-twice.rs:LL:CC | LL | dealloc(x, Layout::from_size_align_unchecked(1, 1)); | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ = note: BACKTRACE (of the first span): = note: inside `std::alloc::dealloc` at RUSTLIB/alloc/src/alloc.rs:LL:CC note: inside `main` - --> $DIR/deallocate-twice.rs:LL:CC + --> tests/fail/alloc/deallocate-twice.rs:LL:CC | LL | dealloc(x, Layout::from_size_align_unchecked(1, 1)); | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ diff --git a/tests/fail/alloc/global_system_mixup.stderr b/tests/fail/alloc/global_system_mixup.stderr index 287a1f1a3e..4c355c511e 100644 --- a/tests/fail/alloc/global_system_mixup.stderr +++ b/tests/fail/alloc/global_system_mixup.stderr @@ -10,7 +10,7 @@ LL | FREE(); = note: inside `std::sys::alloc::PLATFORM::::dealloc` at RUSTLIB/std/src/sys/alloc/PLATFORM.rs:LL:CC = note: inside `::deallocate` at RUSTLIB/std/src/alloc.rs:LL:CC note: inside `main` - --> $DIR/global_system_mixup.rs:LL:CC + --> tests/fail/alloc/global_system_mixup.rs:LL:CC | LL | unsafe { System.deallocate(ptr, l) }; | ^ diff --git a/tests/fail/alloc/no_global_allocator.stderr b/tests/fail/alloc/no_global_allocator.stderr index 82bcb48cbe..e08a747f7f 100644 --- a/tests/fail/alloc/no_global_allocator.stderr +++ b/tests/fail/alloc/no_global_allocator.stderr @@ -1,5 +1,5 @@ error: unsupported operation: can't call foreign function `__rust_alloc` on $OS - --> $DIR/no_global_allocator.rs:LL:CC + --> tests/fail/alloc/no_global_allocator.rs:LL:CC | LL | __rust_alloc(1, 1); | ^^^^^^^^^^^^^^^^^^ can't call foreign function `__rust_alloc` on $OS @@ -7,7 +7,7 @@ LL | __rust_alloc(1, 1); = help: if this is a basic API commonly used on this target, please report an issue with Miri = help: however, note that Miri does not aim to support every FFI function out there; for instance, we will not support APIs for things such as GUIs, scripting languages, or databases = note: BACKTRACE: - = note: inside `start` at $DIR/no_global_allocator.rs:LL:CC + = note: inside `start` at tests/fail/alloc/no_global_allocator.rs:LL:CC error: aborting due to 1 previous error diff --git a/tests/fail/alloc/reallocate-bad-size.stderr b/tests/fail/alloc/reallocate-bad-size.stderr index 5347e7a95a..27961d2096 100644 --- a/tests/fail/alloc/reallocate-bad-size.stderr +++ b/tests/fail/alloc/reallocate-bad-size.stderr @@ -9,7 +9,7 @@ LL | unsafe { __rust_realloc(ptr, layout.size(), layout.align(), new_size) } = note: BACKTRACE: = note: inside `std::alloc::realloc` at RUSTLIB/alloc/src/alloc.rs:LL:CC note: inside `main` - --> $DIR/reallocate-bad-size.rs:LL:CC + --> tests/fail/alloc/reallocate-bad-size.rs:LL:CC | LL | let _y = realloc(x, Layout::from_size_align_unchecked(2, 1), 1); | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ diff --git a/tests/fail/alloc/reallocate-change-alloc.stderr b/tests/fail/alloc/reallocate-change-alloc.stderr index fb3b035b11..17b40fbdcd 100644 --- a/tests/fail/alloc/reallocate-change-alloc.stderr +++ b/tests/fail/alloc/reallocate-change-alloc.stderr @@ -1,5 +1,5 @@ error: Undefined Behavior: memory access failed: ALLOC has been freed, so this pointer is dangling - --> $DIR/reallocate-change-alloc.rs:LL:CC + --> tests/fail/alloc/reallocate-change-alloc.rs:LL:CC | LL | let _z = *x; | ^^ memory access failed: ALLOC has been freed, so this pointer is dangling @@ -7,17 +7,17 @@ LL | let _z = *x; = 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 help: ALLOC was allocated here: - --> $DIR/reallocate-change-alloc.rs:LL:CC + --> tests/fail/alloc/reallocate-change-alloc.rs:LL:CC | LL | let x = alloc(Layout::from_size_align_unchecked(1, 1)); | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: ALLOC was deallocated here: - --> $DIR/reallocate-change-alloc.rs:LL:CC + --> tests/fail/alloc/reallocate-change-alloc.rs:LL:CC | LL | let _y = realloc(x, Layout::from_size_align_unchecked(1, 1), 1); | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ = note: BACKTRACE (of the first span): - = note: inside `main` at $DIR/reallocate-change-alloc.rs:LL:CC + = note: inside `main` at tests/fail/alloc/reallocate-change-alloc.rs:LL:CC note: some details are omitted, run with `MIRIFLAGS=-Zmiri-backtrace=full` for a verbose backtrace diff --git a/tests/fail/alloc/reallocate-dangling.stderr b/tests/fail/alloc/reallocate-dangling.stderr index 9b8a892620..ac78192c8b 100644 --- a/tests/fail/alloc/reallocate-dangling.stderr +++ b/tests/fail/alloc/reallocate-dangling.stderr @@ -7,19 +7,19 @@ LL | unsafe { __rust_realloc(ptr, layout.size(), layout.align(), new_size) } = 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 help: ALLOC was allocated here: - --> $DIR/reallocate-dangling.rs:LL:CC + --> tests/fail/alloc/reallocate-dangling.rs:LL:CC | LL | let x = alloc(Layout::from_size_align_unchecked(1, 1)); | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: ALLOC was deallocated here: - --> $DIR/reallocate-dangling.rs:LL:CC + --> tests/fail/alloc/reallocate-dangling.rs:LL:CC | LL | dealloc(x, Layout::from_size_align_unchecked(1, 1)); | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ = note: BACKTRACE (of the first span): = note: inside `std::alloc::realloc` at RUSTLIB/alloc/src/alloc.rs:LL:CC note: inside `main` - --> $DIR/reallocate-dangling.rs:LL:CC + --> tests/fail/alloc/reallocate-dangling.rs:LL:CC | LL | let _z = realloc(x, Layout::from_size_align_unchecked(1, 1), 1); | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ diff --git a/tests/fail/alloc/stack_free.stderr b/tests/fail/alloc/stack_free.stderr index 2adec68c0d..23ebca2f51 100644 --- a/tests/fail/alloc/stack_free.stderr +++ b/tests/fail/alloc/stack_free.stderr @@ -13,7 +13,7 @@ LL | unsafe { __rust_dealloc(ptr, layout.size(), layout.align()) } = note: inside `std::ptr::drop_in_place::> - shim(Some(std::boxed::Box))` at RUSTLIB/core/src/ptr/mod.rs:LL:CC = note: inside `std::mem::drop::>` at RUSTLIB/core/src/mem/mod.rs:LL:CC note: inside `main` - --> $DIR/stack_free.rs:LL:CC + --> tests/fail/alloc/stack_free.rs:LL:CC | LL | drop(bad_box); | ^^^^^^^^^^^^^ diff --git a/tests/fail/alloc/too_large.stderr b/tests/fail/alloc/too_large.stderr index 77dcf91d84..03e54088e3 100644 --- a/tests/fail/alloc/too_large.stderr +++ b/tests/fail/alloc/too_large.stderr @@ -1,5 +1,5 @@ error: Undefined Behavior: creating an allocation larger than half the address space - --> $DIR/too_large.rs:LL:CC + --> tests/fail/alloc/too_large.rs:LL:CC | LL | __rust_alloc(bytes, 1); | ^^^^^^^^^^^^^^^^^^^^^^ creating an allocation larger than half the address space @@ -7,7 +7,7 @@ LL | __rust_alloc(bytes, 1); = 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 = note: BACKTRACE: - = note: inside `main` at $DIR/too_large.rs:LL:CC + = note: inside `main` at tests/fail/alloc/too_large.rs:LL:CC note: some details are omitted, run with `MIRIFLAGS=-Zmiri-backtrace=full` for a verbose backtrace diff --git a/tests/fail/alloc/unsupported_big_alignment.stderr b/tests/fail/alloc/unsupported_big_alignment.stderr index 4c783b866c..8eb71f5ce8 100644 --- a/tests/fail/alloc/unsupported_big_alignment.stderr +++ b/tests/fail/alloc/unsupported_big_alignment.stderr @@ -1,12 +1,12 @@ error: unsupported operation: creating allocation with alignment ALIGN exceeding rustc's maximum supported value - --> $DIR/unsupported_big_alignment.rs:LL:CC + --> tests/fail/alloc/unsupported_big_alignment.rs:LL:CC | LL | __rust_alloc(1, 1 << 30); | ^^^^^^^^^^^^^^^^^^^^^^^^ creating allocation with alignment ALIGN exceeding rustc's maximum supported value | = help: this is likely not a bug in the program; it indicates that the program performed an operation that Miri does not support = note: BACKTRACE: - = note: inside `main` at $DIR/unsupported_big_alignment.rs:LL:CC + = note: inside `main` at tests/fail/alloc/unsupported_big_alignment.rs:LL:CC note: some details are omitted, run with `MIRIFLAGS=-Zmiri-backtrace=full` for a verbose backtrace diff --git a/tests/fail/alloc/unsupported_non_power_two_alignment.stderr b/tests/fail/alloc/unsupported_non_power_two_alignment.stderr index 69a6c375f4..0a36d3d58b 100644 --- a/tests/fail/alloc/unsupported_non_power_two_alignment.stderr +++ b/tests/fail/alloc/unsupported_non_power_two_alignment.stderr @@ -1,5 +1,5 @@ error: Undefined Behavior: creating allocation with non-power-of-two alignment ALIGN - --> $DIR/unsupported_non_power_two_alignment.rs:LL:CC + --> tests/fail/alloc/unsupported_non_power_two_alignment.rs:LL:CC | LL | __rust_alloc(1, 3); | ^^^^^^^^^^^^^^^^^^ creating allocation with non-power-of-two alignment ALIGN @@ -7,7 +7,7 @@ LL | __rust_alloc(1, 3); = 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 = note: BACKTRACE: - = note: inside `main` at $DIR/unsupported_non_power_two_alignment.rs:LL:CC + = note: inside `main` at tests/fail/alloc/unsupported_non_power_two_alignment.rs:LL:CC note: some details are omitted, run with `MIRIFLAGS=-Zmiri-backtrace=full` for a verbose backtrace diff --git a/tests/fail/both_borrows/alias_through_mutation.stack.stderr b/tests/fail/both_borrows/alias_through_mutation.stack.stderr index 6903a52f30..d7e7c2bc03 100644 --- a/tests/fail/both_borrows/alias_through_mutation.stack.stderr +++ b/tests/fail/both_borrows/alias_through_mutation.stack.stderr @@ -1,5 +1,5 @@ error: Undefined Behavior: attempting a read access using at ALLOC[0x0], but that tag does not exist in the borrow stack for this location - --> $DIR/alias_through_mutation.rs:LL:CC + --> tests/fail/both_borrows/alias_through_mutation.rs:LL:CC | LL | let _val = *target_alias; | ^^^^^^^^^^^^^ @@ -10,17 +10,17 @@ LL | let _val = *target_alias; = help: this indicates a potential bug in the program: it performed an invalid operation, but the Stacked Borrows rules it violated are still experimental = help: see https://github.com/rust-lang/unsafe-code-guidelines/blob/master/wip/stacked-borrows.md for further information help: was created by a SharedReadOnly retag at offsets [0x0..0x4] - --> $DIR/alias_through_mutation.rs:LL:CC + --> tests/fail/both_borrows/alias_through_mutation.rs:LL:CC | LL | *x = &mut *(target as *mut _); | ^^^^^^^^^^^^^^^^^^^^^^^^ help: was later invalidated at offsets [0x0..0x4] by a write access - --> $DIR/alias_through_mutation.rs:LL:CC + --> tests/fail/both_borrows/alias_through_mutation.rs:LL:CC | LL | *target = 13; | ^^^^^^^^^^^^ = note: BACKTRACE (of the first span): - = note: inside `main` at $DIR/alias_through_mutation.rs:LL:CC + = note: inside `main` at tests/fail/both_borrows/alias_through_mutation.rs:LL:CC note: some details are omitted, run with `MIRIFLAGS=-Zmiri-backtrace=full` for a verbose backtrace diff --git a/tests/fail/both_borrows/alias_through_mutation.tree.stderr b/tests/fail/both_borrows/alias_through_mutation.tree.stderr index 0bd196eab1..c146658d31 100644 --- a/tests/fail/both_borrows/alias_through_mutation.tree.stderr +++ b/tests/fail/both_borrows/alias_through_mutation.tree.stderr @@ -1,5 +1,5 @@ error: Undefined Behavior: read access through at ALLOC[0x0] is forbidden - --> $DIR/alias_through_mutation.rs:LL:CC + --> tests/fail/both_borrows/alias_through_mutation.rs:LL:CC | LL | let _val = *target_alias; | ^^^^^^^^^^^^^ read access through at ALLOC[0x0] is forbidden @@ -7,18 +7,18 @@ LL | let _val = *target_alias; = help: this indicates a potential bug in the program: it performed an invalid operation, but the Tree Borrows rules it violated are still experimental = help: the accessed tag has state Disabled which forbids this child read access help: the accessed tag was created here, in the initial state Frozen - --> $DIR/alias_through_mutation.rs:LL:CC + --> tests/fail/both_borrows/alias_through_mutation.rs:LL:CC | LL | *x = &mut *(target as *mut _); | ^^^^^^^^^^^^^^^^^^^^^^^^ help: the accessed tag later transitioned to Disabled due to a foreign write access at offsets [0x0..0x4] - --> $DIR/alias_through_mutation.rs:LL:CC + --> tests/fail/both_borrows/alias_through_mutation.rs:LL:CC | LL | *target = 13; | ^^^^^^^^^^^^ = help: this transition corresponds to a loss of read permissions = note: BACKTRACE (of the first span): - = note: inside `main` at $DIR/alias_through_mutation.rs:LL:CC + = note: inside `main` at tests/fail/both_borrows/alias_through_mutation.rs:LL:CC note: some details are omitted, run with `MIRIFLAGS=-Zmiri-backtrace=full` for a verbose backtrace diff --git a/tests/fail/both_borrows/aliasing_mut1.stack.stderr b/tests/fail/both_borrows/aliasing_mut1.stack.stderr index 4f9e6222db..170027d9f9 100644 --- a/tests/fail/both_borrows/aliasing_mut1.stack.stderr +++ b/tests/fail/both_borrows/aliasing_mut1.stack.stderr @@ -1,5 +1,5 @@ error: Undefined Behavior: not granting access to tag because that would remove [Unique for ] which is strongly protected - --> $DIR/aliasing_mut1.rs:LL:CC + --> tests/fail/both_borrows/aliasing_mut1.rs:LL:CC | LL | pub fn safe(x: &mut i32, y: &mut i32) { | ^ not granting access to tag because that would remove [Unique for ] which is strongly protected @@ -7,19 +7,19 @@ LL | pub fn safe(x: &mut i32, y: &mut i32) { = help: this indicates a potential bug in the program: it performed an invalid operation, but the Stacked Borrows rules it violated are still experimental = help: see https://github.com/rust-lang/unsafe-code-guidelines/blob/master/wip/stacked-borrows.md for further information help: was created by a Unique retag at offsets [0x0..0x4] - --> $DIR/aliasing_mut1.rs:LL:CC + --> tests/fail/both_borrows/aliasing_mut1.rs:LL:CC | LL | let xraw: *mut i32 = unsafe { mem::transmute(&mut x) }; | ^^^^^^ help: is this argument - --> $DIR/aliasing_mut1.rs:LL:CC + --> tests/fail/both_borrows/aliasing_mut1.rs:LL:CC | LL | pub fn safe(x: &mut i32, y: &mut i32) { | ^ = note: BACKTRACE (of the first span): - = note: inside `safe` at $DIR/aliasing_mut1.rs:LL:CC + = note: inside `safe` at tests/fail/both_borrows/aliasing_mut1.rs:LL:CC note: inside `main` - --> $DIR/aliasing_mut1.rs:LL:CC + --> tests/fail/both_borrows/aliasing_mut1.rs:LL:CC | LL | safe_raw(xraw, xraw); | ^^^^^^^^^^^^^^^^^^^^ diff --git a/tests/fail/both_borrows/aliasing_mut1.tree.stderr b/tests/fail/both_borrows/aliasing_mut1.tree.stderr index 3aff0a41de..62ab1c4f87 100644 --- a/tests/fail/both_borrows/aliasing_mut1.tree.stderr +++ b/tests/fail/both_borrows/aliasing_mut1.tree.stderr @@ -1,5 +1,5 @@ error: Undefined Behavior: write access through at ALLOC[0x0] is forbidden - --> $DIR/aliasing_mut1.rs:LL:CC + --> tests/fail/both_borrows/aliasing_mut1.rs:LL:CC | LL | *x = 1; | ^^^^^^ write access through at ALLOC[0x0] is forbidden @@ -7,20 +7,20 @@ LL | *x = 1; = help: this indicates a potential bug in the program: it performed an invalid operation, but the Tree Borrows rules it violated are still experimental = help: the accessed tag has state Reserved (conflicted) which forbids this child write access help: the accessed tag was created here, in the initial state Reserved - --> $DIR/aliasing_mut1.rs:LL:CC + --> tests/fail/both_borrows/aliasing_mut1.rs:LL:CC | LL | pub fn safe(x: &mut i32, y: &mut i32) { | ^ help: the accessed tag later transitioned to Reserved (conflicted) due to a reborrow (acting as a foreign read access) at offsets [0x0..0x4] - --> $DIR/aliasing_mut1.rs:LL:CC + --> tests/fail/both_borrows/aliasing_mut1.rs:LL:CC | LL | pub fn safe(x: &mut i32, y: &mut i32) { | ^ = help: this transition corresponds to a temporary loss of write permissions until function exit = note: BACKTRACE (of the first span): - = note: inside `safe` at $DIR/aliasing_mut1.rs:LL:CC + = note: inside `safe` at tests/fail/both_borrows/aliasing_mut1.rs:LL:CC note: inside `main` - --> $DIR/aliasing_mut1.rs:LL:CC + --> tests/fail/both_borrows/aliasing_mut1.rs:LL:CC | LL | safe_raw(xraw, xraw); | ^^^^^^^^^^^^^^^^^^^^ diff --git a/tests/fail/both_borrows/aliasing_mut2.stack.stderr b/tests/fail/both_borrows/aliasing_mut2.stack.stderr index 54679d177d..274dc22a7e 100644 --- a/tests/fail/both_borrows/aliasing_mut2.stack.stderr +++ b/tests/fail/both_borrows/aliasing_mut2.stack.stderr @@ -1,5 +1,5 @@ error: Undefined Behavior: not granting access to tag because that would remove [SharedReadOnly for ] which is strongly protected - --> $DIR/aliasing_mut2.rs:LL:CC + --> tests/fail/both_borrows/aliasing_mut2.rs:LL:CC | LL | pub fn safe(x: &i32, y: &mut i32) { | ^ not granting access to tag because that would remove [SharedReadOnly for ] which is strongly protected @@ -7,19 +7,19 @@ LL | pub fn safe(x: &i32, y: &mut i32) { = help: this indicates a potential bug in the program: it performed an invalid operation, but the Stacked Borrows rules it violated are still experimental = help: see https://github.com/rust-lang/unsafe-code-guidelines/blob/master/wip/stacked-borrows.md for further information help: was created by a Unique retag at offsets [0x0..0x4] - --> $DIR/aliasing_mut2.rs:LL:CC + --> tests/fail/both_borrows/aliasing_mut2.rs:LL:CC | LL | let xref = &mut x; | ^^^^^^ help: is this argument - --> $DIR/aliasing_mut2.rs:LL:CC + --> tests/fail/both_borrows/aliasing_mut2.rs:LL:CC | LL | pub fn safe(x: &i32, y: &mut i32) { | ^ = note: BACKTRACE (of the first span): - = note: inside `safe` at $DIR/aliasing_mut2.rs:LL:CC + = note: inside `safe` at tests/fail/both_borrows/aliasing_mut2.rs:LL:CC note: inside `main` - --> $DIR/aliasing_mut2.rs:LL:CC + --> tests/fail/both_borrows/aliasing_mut2.rs:LL:CC | LL | safe_raw(xshr, xraw); | ^^^^^^^^^^^^^^^^^^^^ diff --git a/tests/fail/both_borrows/aliasing_mut2.tree.stderr b/tests/fail/both_borrows/aliasing_mut2.tree.stderr index d8602a54c6..f3d7a01682 100644 --- a/tests/fail/both_borrows/aliasing_mut2.tree.stderr +++ b/tests/fail/both_borrows/aliasing_mut2.tree.stderr @@ -1,5 +1,5 @@ error: Undefined Behavior: write access through at ALLOC[0x0] is forbidden - --> $DIR/aliasing_mut2.rs:LL:CC + --> tests/fail/both_borrows/aliasing_mut2.rs:LL:CC | LL | *y = 2; | ^^^^^^ write access through at ALLOC[0x0] is forbidden @@ -7,20 +7,20 @@ LL | *y = 2; = help: this indicates a potential bug in the program: it performed an invalid operation, but the Tree Borrows rules it violated are still experimental = help: the accessed tag has state Reserved (conflicted) which forbids this child write access help: the accessed tag was created here, in the initial state Reserved - --> $DIR/aliasing_mut2.rs:LL:CC + --> tests/fail/both_borrows/aliasing_mut2.rs:LL:CC | LL | pub fn safe(x: &i32, y: &mut i32) { | ^ help: the accessed tag later transitioned to Reserved (conflicted) due to a foreign read access at offsets [0x0..0x4] - --> $DIR/aliasing_mut2.rs:LL:CC + --> tests/fail/both_borrows/aliasing_mut2.rs:LL:CC | LL | let _v = *x; | ^^ = help: this transition corresponds to a temporary loss of write permissions until function exit = note: BACKTRACE (of the first span): - = note: inside `safe` at $DIR/aliasing_mut2.rs:LL:CC + = note: inside `safe` at tests/fail/both_borrows/aliasing_mut2.rs:LL:CC note: inside `main` - --> $DIR/aliasing_mut2.rs:LL:CC + --> tests/fail/both_borrows/aliasing_mut2.rs:LL:CC | LL | safe_raw(xshr, xraw); | ^^^^^^^^^^^^^^^^^^^^ diff --git a/tests/fail/both_borrows/aliasing_mut3.stack.stderr b/tests/fail/both_borrows/aliasing_mut3.stack.stderr index b04139f3bd..a89baa50ff 100644 --- a/tests/fail/both_borrows/aliasing_mut3.stack.stderr +++ b/tests/fail/both_borrows/aliasing_mut3.stack.stderr @@ -1,5 +1,5 @@ error: Undefined Behavior: trying to retag from for SharedReadOnly permission at ALLOC[0x0], but that tag does not exist in the borrow stack for this location - --> $DIR/aliasing_mut3.rs:LL:CC + --> tests/fail/both_borrows/aliasing_mut3.rs:LL:CC | LL | pub fn safe(x: &mut i32, y: &i32) { | ^ @@ -10,19 +10,19 @@ LL | pub fn safe(x: &mut i32, y: &i32) { = help: this indicates a potential bug in the program: it performed an invalid operation, but the Stacked Borrows rules it violated are still experimental = help: see https://github.com/rust-lang/unsafe-code-guidelines/blob/master/wip/stacked-borrows.md for further information help: was created by a SharedReadOnly retag at offsets [0x0..0x4] - --> $DIR/aliasing_mut3.rs:LL:CC + --> tests/fail/both_borrows/aliasing_mut3.rs:LL:CC | LL | safe_raw(xraw, xshr); | ^^^^ help: was later invalidated at offsets [0x0..0x4] by a Unique function-entry retag inside this call - --> $DIR/aliasing_mut3.rs:LL:CC + --> tests/fail/both_borrows/aliasing_mut3.rs:LL:CC | LL | safe_raw(xraw, xshr); | ^^^^^^^^^^^^^^^^^^^^ = note: BACKTRACE (of the first span): - = note: inside `safe` at $DIR/aliasing_mut3.rs:LL:CC + = note: inside `safe` at tests/fail/both_borrows/aliasing_mut3.rs:LL:CC note: inside `main` - --> $DIR/aliasing_mut3.rs:LL:CC + --> tests/fail/both_borrows/aliasing_mut3.rs:LL:CC | LL | safe_raw(xraw, xshr); | ^^^^^^^^^^^^^^^^^^^^ diff --git a/tests/fail/both_borrows/aliasing_mut3.tree.stderr b/tests/fail/both_borrows/aliasing_mut3.tree.stderr index 83191962a3..ba9197a50d 100644 --- a/tests/fail/both_borrows/aliasing_mut3.tree.stderr +++ b/tests/fail/both_borrows/aliasing_mut3.tree.stderr @@ -1,5 +1,5 @@ error: Undefined Behavior: write access through at ALLOC[0x0] is forbidden - --> $DIR/aliasing_mut3.rs:LL:CC + --> tests/fail/both_borrows/aliasing_mut3.rs:LL:CC | LL | *x = 1; | ^^^^^^ write access through at ALLOC[0x0] is forbidden @@ -7,20 +7,20 @@ LL | *x = 1; = help: this indicates a potential bug in the program: it performed an invalid operation, but the Tree Borrows rules it violated are still experimental = help: the accessed tag has state Reserved (conflicted) which forbids this child write access help: the accessed tag was created here, in the initial state Reserved - --> $DIR/aliasing_mut3.rs:LL:CC + --> tests/fail/both_borrows/aliasing_mut3.rs:LL:CC | LL | pub fn safe(x: &mut i32, y: &i32) { | ^ help: the accessed tag later transitioned to Reserved (conflicted) due to a reborrow (acting as a foreign read access) at offsets [0x0..0x4] - --> $DIR/aliasing_mut3.rs:LL:CC + --> tests/fail/both_borrows/aliasing_mut3.rs:LL:CC | LL | pub fn safe(x: &mut i32, y: &i32) { | ^ = help: this transition corresponds to a temporary loss of write permissions until function exit = note: BACKTRACE (of the first span): - = note: inside `safe` at $DIR/aliasing_mut3.rs:LL:CC + = note: inside `safe` at tests/fail/both_borrows/aliasing_mut3.rs:LL:CC note: inside `main` - --> $DIR/aliasing_mut3.rs:LL:CC + --> tests/fail/both_borrows/aliasing_mut3.rs:LL:CC | LL | safe_raw(xraw, xshr); | ^^^^^^^^^^^^^^^^^^^^ diff --git a/tests/fail/both_borrows/aliasing_mut4.stack.stderr b/tests/fail/both_borrows/aliasing_mut4.stack.stderr index b3e97c92f1..bdda713949 100644 --- a/tests/fail/both_borrows/aliasing_mut4.stack.stderr +++ b/tests/fail/both_borrows/aliasing_mut4.stack.stderr @@ -1,5 +1,5 @@ error: Undefined Behavior: not granting access to tag because that would remove [SharedReadOnly for ] which is strongly protected - --> $DIR/aliasing_mut4.rs:LL:CC + --> tests/fail/both_borrows/aliasing_mut4.rs:LL:CC | LL | pub fn safe(x: &i32, y: &mut Cell) { | ^ not granting access to tag because that would remove [SharedReadOnly for ] which is strongly protected @@ -7,19 +7,19 @@ LL | pub fn safe(x: &i32, y: &mut Cell) { = help: this indicates a potential bug in the program: it performed an invalid operation, but the Stacked Borrows rules it violated are still experimental = help: see https://github.com/rust-lang/unsafe-code-guidelines/blob/master/wip/stacked-borrows.md for further information help: was created by a Unique retag at offsets [0x0..0x4] - --> $DIR/aliasing_mut4.rs:LL:CC + --> tests/fail/both_borrows/aliasing_mut4.rs:LL:CC | LL | let xref = &mut x; | ^^^^^^ help: is this argument - --> $DIR/aliasing_mut4.rs:LL:CC + --> tests/fail/both_borrows/aliasing_mut4.rs:LL:CC | LL | pub fn safe(x: &i32, y: &mut Cell) { | ^ = note: BACKTRACE (of the first span): - = note: inside `safe` at $DIR/aliasing_mut4.rs:LL:CC + = note: inside `safe` at tests/fail/both_borrows/aliasing_mut4.rs:LL:CC note: inside `main` - --> $DIR/aliasing_mut4.rs:LL:CC + --> tests/fail/both_borrows/aliasing_mut4.rs:LL:CC | LL | safe_raw(xshr, xraw as *mut _); | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ diff --git a/tests/fail/both_borrows/aliasing_mut4.tree.stderr b/tests/fail/both_borrows/aliasing_mut4.tree.stderr index b1f1e231e5..5162368b51 100644 --- a/tests/fail/both_borrows/aliasing_mut4.tree.stderr +++ b/tests/fail/both_borrows/aliasing_mut4.tree.stderr @@ -9,12 +9,12 @@ LL | ptr::write(dest, src); = help: this foreign write access would cause the protected tag (currently Frozen) to become Disabled = help: protected tags must never be Disabled help: the accessed tag was created here - --> $DIR/aliasing_mut4.rs:LL:CC + --> tests/fail/both_borrows/aliasing_mut4.rs:LL:CC | LL | y.set(1); | ^^^^^^^^ help: the protected tag was created here, in the initial state Frozen - --> $DIR/aliasing_mut4.rs:LL:CC + --> tests/fail/both_borrows/aliasing_mut4.rs:LL:CC | LL | pub fn safe(x: &i32, y: &mut Cell) { | ^ @@ -23,12 +23,12 @@ LL | pub fn safe(x: &i32, y: &mut Cell) { = note: inside `std::cell::Cell::::replace` at RUSTLIB/core/src/cell.rs:LL:CC = note: inside `std::cell::Cell::::set` at RUSTLIB/core/src/cell.rs:LL:CC note: inside `safe` - --> $DIR/aliasing_mut4.rs:LL:CC + --> tests/fail/both_borrows/aliasing_mut4.rs:LL:CC | LL | y.set(1); | ^^^^^^^^ note: inside `main` - --> $DIR/aliasing_mut4.rs:LL:CC + --> tests/fail/both_borrows/aliasing_mut4.rs:LL:CC | LL | safe_raw(xshr, xraw as *mut _); | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ diff --git a/tests/fail/both_borrows/box_exclusive_violation1.stack.stderr b/tests/fail/both_borrows/box_exclusive_violation1.stack.stderr index bed0b880c3..0cffdcd21c 100644 --- a/tests/fail/both_borrows/box_exclusive_violation1.stack.stderr +++ b/tests/fail/both_borrows/box_exclusive_violation1.stack.stderr @@ -1,5 +1,5 @@ error: Undefined Behavior: attempting a write access using at ALLOC[0x0], but that tag does not exist in the borrow stack for this location - --> $DIR/box_exclusive_violation1.rs:LL:CC + --> tests/fail/both_borrows/box_exclusive_violation1.rs:LL:CC | LL | *LEAK = 7; | ^^^^^^^^^ @@ -10,24 +10,24 @@ LL | *LEAK = 7; = help: this indicates a potential bug in the program: it performed an invalid operation, but the Stacked Borrows rules it violated are still experimental = help: see https://github.com/rust-lang/unsafe-code-guidelines/blob/master/wip/stacked-borrows.md for further information help: was created by a SharedReadOnly retag at offsets [0x0..0x4] - --> $DIR/box_exclusive_violation1.rs:LL:CC + --> tests/fail/both_borrows/box_exclusive_violation1.rs:LL:CC | LL | LEAK = x as *const _ as *mut _; | ^ help: was later invalidated at offsets [0x0..0x4] by a write access - --> $DIR/box_exclusive_violation1.rs:LL:CC + --> tests/fail/both_borrows/box_exclusive_violation1.rs:LL:CC | LL | *our = 5; | ^^^^^^^^ = note: BACKTRACE (of the first span): - = note: inside `unknown_code_2` at $DIR/box_exclusive_violation1.rs:LL:CC + = note: inside `unknown_code_2` at tests/fail/both_borrows/box_exclusive_violation1.rs:LL:CC note: inside `demo_box_advanced_unique` - --> $DIR/box_exclusive_violation1.rs:LL:CC + --> tests/fail/both_borrows/box_exclusive_violation1.rs:LL:CC | LL | unknown_code_2(); | ^^^^^^^^^^^^^^^^ note: inside `main` - --> $DIR/box_exclusive_violation1.rs:LL:CC + --> tests/fail/both_borrows/box_exclusive_violation1.rs:LL:CC | LL | demo_box_advanced_unique(Box::new(0)); | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ diff --git a/tests/fail/both_borrows/box_exclusive_violation1.tree.stderr b/tests/fail/both_borrows/box_exclusive_violation1.tree.stderr index 27d987feb5..075df9982c 100644 --- a/tests/fail/both_borrows/box_exclusive_violation1.tree.stderr +++ b/tests/fail/both_borrows/box_exclusive_violation1.tree.stderr @@ -1,5 +1,5 @@ error: Undefined Behavior: write access through at ALLOC[0x0] is forbidden - --> $DIR/box_exclusive_violation1.rs:LL:CC + --> tests/fail/both_borrows/box_exclusive_violation1.rs:LL:CC | LL | *LEAK = 7; | ^^^^^^^^^ write access through at ALLOC[0x0] is forbidden @@ -7,25 +7,25 @@ LL | *LEAK = 7; = help: this indicates a potential bug in the program: it performed an invalid operation, but the Tree Borrows rules it violated are still experimental = help: the accessed tag has state Disabled which forbids this child write access help: the accessed tag was created here, in the initial state Frozen - --> $DIR/box_exclusive_violation1.rs:LL:CC + --> tests/fail/both_borrows/box_exclusive_violation1.rs:LL:CC | LL | fn unknown_code_1(x: &i32) { | ^ help: the accessed tag later transitioned to Disabled due to a foreign write access at offsets [0x0..0x4] - --> $DIR/box_exclusive_violation1.rs:LL:CC + --> tests/fail/both_borrows/box_exclusive_violation1.rs:LL:CC | LL | *our = 5; | ^^^^^^^^ = help: this transition corresponds to a loss of read permissions = note: BACKTRACE (of the first span): - = note: inside `unknown_code_2` at $DIR/box_exclusive_violation1.rs:LL:CC + = note: inside `unknown_code_2` at tests/fail/both_borrows/box_exclusive_violation1.rs:LL:CC note: inside `demo_box_advanced_unique` - --> $DIR/box_exclusive_violation1.rs:LL:CC + --> tests/fail/both_borrows/box_exclusive_violation1.rs:LL:CC | LL | unknown_code_2(); | ^^^^^^^^^^^^^^^^ note: inside `main` - --> $DIR/box_exclusive_violation1.rs:LL:CC + --> tests/fail/both_borrows/box_exclusive_violation1.rs:LL:CC | LL | demo_box_advanced_unique(Box::new(0)); | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ diff --git a/tests/fail/both_borrows/box_noalias_violation.stack.stderr b/tests/fail/both_borrows/box_noalias_violation.stack.stderr index a9ea7a9e9c..3dc3f8c661 100644 --- a/tests/fail/both_borrows/box_noalias_violation.stack.stderr +++ b/tests/fail/both_borrows/box_noalias_violation.stack.stderr @@ -1,5 +1,5 @@ error: Undefined Behavior: not granting access to tag because that would remove [Unique for ] which is weakly protected - --> $DIR/box_noalias_violation.rs:LL:CC + --> tests/fail/both_borrows/box_noalias_violation.rs:LL:CC | LL | *y | ^^ not granting access to tag because that would remove [Unique for ] which is weakly protected @@ -7,19 +7,19 @@ LL | *y = help: this indicates a potential bug in the program: it performed an invalid operation, but the Stacked Borrows rules it violated are still experimental = help: see https://github.com/rust-lang/unsafe-code-guidelines/blob/master/wip/stacked-borrows.md for further information help: was created by a SharedReadWrite retag at offsets [0x0..0x4] - --> $DIR/box_noalias_violation.rs:LL:CC + --> tests/fail/both_borrows/box_noalias_violation.rs:LL:CC | LL | let ptr = &mut v as *mut i32; | ^^^^^^ help: is this argument - --> $DIR/box_noalias_violation.rs:LL:CC + --> tests/fail/both_borrows/box_noalias_violation.rs:LL:CC | LL | unsafe fn test(mut x: Box, y: *const i32) -> i32 { | ^^^^^ = note: BACKTRACE (of the first span): - = note: inside `test` at $DIR/box_noalias_violation.rs:LL:CC + = note: inside `test` at tests/fail/both_borrows/box_noalias_violation.rs:LL:CC note: inside `main` - --> $DIR/box_noalias_violation.rs:LL:CC + --> tests/fail/both_borrows/box_noalias_violation.rs:LL:CC | LL | test(Box::from_raw(ptr), ptr); | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ diff --git a/tests/fail/both_borrows/box_noalias_violation.tree.stderr b/tests/fail/both_borrows/box_noalias_violation.tree.stderr index 95cf37c812..c788e455c8 100644 --- a/tests/fail/both_borrows/box_noalias_violation.tree.stderr +++ b/tests/fail/both_borrows/box_noalias_violation.tree.stderr @@ -1,5 +1,5 @@ error: Undefined Behavior: read access through at ALLOC[0x0] is forbidden - --> $DIR/box_noalias_violation.rs:LL:CC + --> tests/fail/both_borrows/box_noalias_violation.rs:LL:CC | LL | *y | ^^ read access through at ALLOC[0x0] is forbidden @@ -9,25 +9,25 @@ LL | *y = help: this foreign read access would cause the protected tag (currently Active) to become Disabled = help: protected tags must never be Disabled help: the accessed tag was created here - --> $DIR/box_noalias_violation.rs:LL:CC + --> tests/fail/both_borrows/box_noalias_violation.rs:LL:CC | LL | let ptr = &mut v as *mut i32; | ^^^^^^ help: the protected tag was created here, in the initial state Reserved - --> $DIR/box_noalias_violation.rs:LL:CC + --> tests/fail/both_borrows/box_noalias_violation.rs:LL:CC | LL | unsafe fn test(mut x: Box, y: *const i32) -> i32 { | ^^^^^ help: the protected tag later transitioned to Active due to a child write access at offsets [0x0..0x4] - --> $DIR/box_noalias_violation.rs:LL:CC + --> tests/fail/both_borrows/box_noalias_violation.rs:LL:CC | LL | *x = 5; | ^^^^^^ = help: this transition corresponds to the first write to a 2-phase borrowed mutable reference = note: BACKTRACE (of the first span): - = note: inside `test` at $DIR/box_noalias_violation.rs:LL:CC + = note: inside `test` at tests/fail/both_borrows/box_noalias_violation.rs:LL:CC note: inside `main` - --> $DIR/box_noalias_violation.rs:LL:CC + --> tests/fail/both_borrows/box_noalias_violation.rs:LL:CC | LL | test(Box::from_raw(ptr), ptr); | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ diff --git a/tests/fail/both_borrows/buggy_as_mut_slice.stack.stderr b/tests/fail/both_borrows/buggy_as_mut_slice.stack.stderr index d2bf4c6a59..4e5355f565 100644 --- a/tests/fail/both_borrows/buggy_as_mut_slice.stack.stderr +++ b/tests/fail/both_borrows/buggy_as_mut_slice.stack.stderr @@ -1,5 +1,5 @@ error: Undefined Behavior: attempting a write access using at ALLOC[0x4], but that tag does not exist in the borrow stack for this location - --> $DIR/buggy_as_mut_slice.rs:LL:CC + --> tests/fail/both_borrows/buggy_as_mut_slice.rs:LL:CC | LL | v1[1] = 5; | ^^^^^^^^^ @@ -10,17 +10,17 @@ LL | v1[1] = 5; = help: this indicates a potential bug in the program: it performed an invalid operation, but the Stacked Borrows rules it violated are still experimental = help: see https://github.com/rust-lang/unsafe-code-guidelines/blob/master/wip/stacked-borrows.md for further information help: was created by a Unique retag at offsets [0x0..0xc] - --> $DIR/buggy_as_mut_slice.rs:LL:CC + --> tests/fail/both_borrows/buggy_as_mut_slice.rs:LL:CC | LL | let v1 = safe::as_mut_slice(&v); | ^^^^^^^^^^^^^^^^^^^^^^ help: was later invalidated at offsets [0x0..0xc] by a Unique retag - --> $DIR/buggy_as_mut_slice.rs:LL:CC + --> tests/fail/both_borrows/buggy_as_mut_slice.rs:LL:CC | LL | unsafe { from_raw_parts_mut(self_.as_ptr() as *mut T, self_.len()) } | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ = note: BACKTRACE (of the first span): - = note: inside `main` at $DIR/buggy_as_mut_slice.rs:LL:CC + = note: inside `main` at tests/fail/both_borrows/buggy_as_mut_slice.rs:LL:CC note: some details are omitted, run with `MIRIFLAGS=-Zmiri-backtrace=full` for a verbose backtrace diff --git a/tests/fail/both_borrows/buggy_as_mut_slice.tree.stderr b/tests/fail/both_borrows/buggy_as_mut_slice.tree.stderr index 16e87c4d4e..bad42343c0 100644 --- a/tests/fail/both_borrows/buggy_as_mut_slice.tree.stderr +++ b/tests/fail/both_borrows/buggy_as_mut_slice.tree.stderr @@ -1,5 +1,5 @@ error: Undefined Behavior: write access through at ALLOC[0x4] is forbidden - --> $DIR/buggy_as_mut_slice.rs:LL:CC + --> tests/fail/both_borrows/buggy_as_mut_slice.rs:LL:CC | LL | v2[1] = 7; | ^^^^^^^^^ write access through at ALLOC[0x4] is forbidden @@ -7,18 +7,18 @@ LL | v2[1] = 7; = help: this indicates a potential bug in the program: it performed an invalid operation, but the Tree Borrows rules it violated are still experimental = help: the accessed tag has state Disabled which forbids this child write access help: the accessed tag was created here, in the initial state Reserved - --> $DIR/buggy_as_mut_slice.rs:LL:CC + --> tests/fail/both_borrows/buggy_as_mut_slice.rs:LL:CC | LL | let v2 = safe::as_mut_slice(&v); | ^^^^^^^^^^^^^^^^^^^^^^ help: the accessed tag later transitioned to Disabled due to a foreign write access at offsets [0x4..0x8] - --> $DIR/buggy_as_mut_slice.rs:LL:CC + --> tests/fail/both_borrows/buggy_as_mut_slice.rs:LL:CC | LL | v1[1] = 5; | ^^^^^^^^^ = help: this transition corresponds to a loss of read and write permissions = note: BACKTRACE (of the first span): - = note: inside `main` at $DIR/buggy_as_mut_slice.rs:LL:CC + = note: inside `main` at tests/fail/both_borrows/buggy_as_mut_slice.rs:LL:CC note: some details are omitted, run with `MIRIFLAGS=-Zmiri-backtrace=full` for a verbose backtrace diff --git a/tests/fail/both_borrows/buggy_split_at_mut.stack.stderr b/tests/fail/both_borrows/buggy_split_at_mut.stack.stderr index 71d962a552..28be7607aa 100644 --- a/tests/fail/both_borrows/buggy_split_at_mut.stack.stderr +++ b/tests/fail/both_borrows/buggy_split_at_mut.stack.stderr @@ -1,5 +1,5 @@ error: Undefined Behavior: trying to retag from for Unique permission at ALLOC[0x0], but that tag does not exist in the borrow stack for this location - --> $DIR/buggy_split_at_mut.rs:LL:CC + --> tests/fail/both_borrows/buggy_split_at_mut.rs:LL:CC | LL | / ( LL | | from_raw_parts_mut(ptr, len - mid), // BUG: should be "mid" instead of "len - mid" @@ -14,19 +14,19 @@ LL | | ) = help: this indicates a potential bug in the program: it performed an invalid operation, but the Stacked Borrows rules it violated are still experimental = help: see https://github.com/rust-lang/unsafe-code-guidelines/blob/master/wip/stacked-borrows.md for further information help: was created by a Unique retag at offsets [0x0..0x10] - --> $DIR/buggy_split_at_mut.rs:LL:CC + --> tests/fail/both_borrows/buggy_split_at_mut.rs:LL:CC | LL | from_raw_parts_mut(ptr, len - mid), // BUG: should be "mid" instead of "len - mid" | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: was later invalidated at offsets [0x0..0x10] by a Unique retag - --> $DIR/buggy_split_at_mut.rs:LL:CC + --> tests/fail/both_borrows/buggy_split_at_mut.rs:LL:CC | LL | from_raw_parts_mut(ptr.offset(mid as isize), len - mid), | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ = note: BACKTRACE (of the first span): - = note: inside `safe::split_at_mut::` at $DIR/buggy_split_at_mut.rs:LL:CC + = note: inside `safe::split_at_mut::` at tests/fail/both_borrows/buggy_split_at_mut.rs:LL:CC note: inside `main` - --> $DIR/buggy_split_at_mut.rs:LL:CC + --> tests/fail/both_borrows/buggy_split_at_mut.rs:LL:CC | LL | let (a, b) = safe::split_at_mut(&mut array, 0); | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ diff --git a/tests/fail/both_borrows/buggy_split_at_mut.tree.stderr b/tests/fail/both_borrows/buggy_split_at_mut.tree.stderr index aaf7c2256a..c734f257a4 100644 --- a/tests/fail/both_borrows/buggy_split_at_mut.tree.stderr +++ b/tests/fail/both_borrows/buggy_split_at_mut.tree.stderr @@ -1,5 +1,5 @@ error: Undefined Behavior: write access through at ALLOC[0x4] is forbidden - --> $DIR/buggy_split_at_mut.rs:LL:CC + --> tests/fail/both_borrows/buggy_split_at_mut.rs:LL:CC | LL | b[1] = 6; | ^^^^^^^^ write access through at ALLOC[0x4] is forbidden @@ -7,18 +7,18 @@ LL | b[1] = 6; = help: this indicates a potential bug in the program: it performed an invalid operation, but the Tree Borrows rules it violated are still experimental = help: the accessed tag has state Disabled which forbids this child write access help: the accessed tag was created here, in the initial state Reserved - --> $DIR/buggy_split_at_mut.rs:LL:CC + --> tests/fail/both_borrows/buggy_split_at_mut.rs:LL:CC | LL | let (a, b) = safe::split_at_mut(&mut array, 0); | ^ help: the accessed tag later transitioned to Disabled due to a foreign write access at offsets [0x4..0x8] - --> $DIR/buggy_split_at_mut.rs:LL:CC + --> tests/fail/both_borrows/buggy_split_at_mut.rs:LL:CC | LL | a[1] = 5; | ^^^^^^^^ = help: this transition corresponds to a loss of read and write permissions = note: BACKTRACE (of the first span): - = note: inside `main` at $DIR/buggy_split_at_mut.rs:LL:CC + = note: inside `main` at tests/fail/both_borrows/buggy_split_at_mut.rs:LL:CC note: some details are omitted, run with `MIRIFLAGS=-Zmiri-backtrace=full` for a verbose backtrace diff --git a/tests/fail/both_borrows/illegal_write1.stack.stderr b/tests/fail/both_borrows/illegal_write1.stack.stderr index 3a9faeb80e..9df441cb95 100644 --- a/tests/fail/both_borrows/illegal_write1.stack.stderr +++ b/tests/fail/both_borrows/illegal_write1.stack.stderr @@ -1,5 +1,5 @@ error: Undefined Behavior: attempting a write access using at ALLOC[0x0], but that tag only grants SharedReadOnly permission for this location - --> $DIR/illegal_write1.rs:LL:CC + --> tests/fail/both_borrows/illegal_write1.rs:LL:CC | LL | unsafe { *x = 42 }; | ^^^^^^^ @@ -10,12 +10,12 @@ LL | unsafe { *x = 42 }; = help: this indicates a potential bug in the program: it performed an invalid operation, but the Stacked Borrows rules it violated are still experimental = help: see https://github.com/rust-lang/unsafe-code-guidelines/blob/master/wip/stacked-borrows.md for further information help: was created by a SharedReadOnly retag at offsets [0x0..0x4] - --> $DIR/illegal_write1.rs:LL:CC + --> tests/fail/both_borrows/illegal_write1.rs:LL:CC | LL | let x: *mut u32 = xref as *const _ as *mut _; | ^^^^ = note: BACKTRACE (of the first span): - = note: inside `main` at $DIR/illegal_write1.rs:LL:CC + = note: inside `main` at tests/fail/both_borrows/illegal_write1.rs:LL:CC note: some details are omitted, run with `MIRIFLAGS=-Zmiri-backtrace=full` for a verbose backtrace diff --git a/tests/fail/both_borrows/illegal_write1.tree.stderr b/tests/fail/both_borrows/illegal_write1.tree.stderr index 6241c9db0d..cd415ad6de 100644 --- a/tests/fail/both_borrows/illegal_write1.tree.stderr +++ b/tests/fail/both_borrows/illegal_write1.tree.stderr @@ -1,5 +1,5 @@ error: Undefined Behavior: write access through at ALLOC[0x0] is forbidden - --> $DIR/illegal_write1.rs:LL:CC + --> tests/fail/both_borrows/illegal_write1.rs:LL:CC | LL | unsafe { *x = 42 }; | ^^^^^^^ write access through at ALLOC[0x0] is forbidden @@ -7,12 +7,12 @@ LL | unsafe { *x = 42 }; = help: this indicates a potential bug in the program: it performed an invalid operation, but the Tree Borrows rules it violated are still experimental = help: the accessed tag has state Frozen which forbids this child write access help: the accessed tag was created here, in the initial state Frozen - --> $DIR/illegal_write1.rs:LL:CC + --> tests/fail/both_borrows/illegal_write1.rs:LL:CC | LL | let xref = &*target; | ^^^^^^^^ = note: BACKTRACE (of the first span): - = note: inside `main` at $DIR/illegal_write1.rs:LL:CC + = note: inside `main` at tests/fail/both_borrows/illegal_write1.rs:LL:CC note: some details are omitted, run with `MIRIFLAGS=-Zmiri-backtrace=full` for a verbose backtrace diff --git a/tests/fail/both_borrows/illegal_write5.stack.stderr b/tests/fail/both_borrows/illegal_write5.stack.stderr index 16f8a3cbd0..2a517941de 100644 --- a/tests/fail/both_borrows/illegal_write5.stack.stderr +++ b/tests/fail/both_borrows/illegal_write5.stack.stderr @@ -1,5 +1,5 @@ error: Undefined Behavior: attempting a read access using at ALLOC[0x0], but that tag does not exist in the borrow stack for this location - --> $DIR/illegal_write5.rs:LL:CC + --> tests/fail/both_borrows/illegal_write5.rs:LL:CC | LL | let _val = *xref; | ^^^^^ @@ -10,17 +10,17 @@ LL | let _val = *xref; = help: this indicates a potential bug in the program: it performed an invalid operation, but the Stacked Borrows rules it violated are still experimental = help: see https://github.com/rust-lang/unsafe-code-guidelines/blob/master/wip/stacked-borrows.md for further information help: was created by a Unique retag at offsets [0x0..0x4] - --> $DIR/illegal_write5.rs:LL:CC + --> tests/fail/both_borrows/illegal_write5.rs:LL:CC | LL | let xref = unsafe { &mut *xraw }; | ^^^^^^^^^^ help: was later invalidated at offsets [0x0..0x4] by a write access - --> $DIR/illegal_write5.rs:LL:CC + --> tests/fail/both_borrows/illegal_write5.rs:LL:CC | LL | unsafe { *xraw = 15 }; | ^^^^^^^^^^ = note: BACKTRACE (of the first span): - = note: inside `main` at $DIR/illegal_write5.rs:LL:CC + = note: inside `main` at tests/fail/both_borrows/illegal_write5.rs:LL:CC note: some details are omitted, run with `MIRIFLAGS=-Zmiri-backtrace=full` for a verbose backtrace diff --git a/tests/fail/both_borrows/illegal_write5.tree.stderr b/tests/fail/both_borrows/illegal_write5.tree.stderr index dec2bb6880..38bc957cc3 100644 --- a/tests/fail/both_borrows/illegal_write5.tree.stderr +++ b/tests/fail/both_borrows/illegal_write5.tree.stderr @@ -1,5 +1,5 @@ error: Undefined Behavior: read access through at ALLOC[0x0] is forbidden - --> $DIR/illegal_write5.rs:LL:CC + --> tests/fail/both_borrows/illegal_write5.rs:LL:CC | LL | let _val = *xref; | ^^^^^ read access through at ALLOC[0x0] is forbidden @@ -7,18 +7,18 @@ LL | let _val = *xref; = help: this indicates a potential bug in the program: it performed an invalid operation, but the Tree Borrows rules it violated are still experimental = help: the accessed tag has state Disabled which forbids this child read access help: the accessed tag was created here, in the initial state Reserved - --> $DIR/illegal_write5.rs:LL:CC + --> tests/fail/both_borrows/illegal_write5.rs:LL:CC | LL | let xref = unsafe { &mut *xraw }; | ^^^^^^^^^^ help: the accessed tag later transitioned to Disabled due to a foreign write access at offsets [0x0..0x4] - --> $DIR/illegal_write5.rs:LL:CC + --> tests/fail/both_borrows/illegal_write5.rs:LL:CC | LL | unsafe { *xraw = 15 }; | ^^^^^^^^^^ = help: this transition corresponds to a loss of read and write permissions = note: BACKTRACE (of the first span): - = note: inside `main` at $DIR/illegal_write5.rs:LL:CC + = note: inside `main` at tests/fail/both_borrows/illegal_write5.rs:LL:CC note: some details are omitted, run with `MIRIFLAGS=-Zmiri-backtrace=full` for a verbose backtrace diff --git a/tests/fail/both_borrows/illegal_write6.stack.stderr b/tests/fail/both_borrows/illegal_write6.stack.stderr index b5484745c4..e75334508f 100644 --- a/tests/fail/both_borrows/illegal_write6.stack.stderr +++ b/tests/fail/both_borrows/illegal_write6.stack.stderr @@ -1,5 +1,5 @@ error: Undefined Behavior: not granting access to tag because that would remove [Unique for ] which is strongly protected - --> $DIR/illegal_write6.rs:LL:CC + --> tests/fail/both_borrows/illegal_write6.rs:LL:CC | LL | unsafe { *y = 2 }; | ^^^^^^ not granting access to tag because that would remove [Unique for ] which is strongly protected @@ -7,19 +7,19 @@ LL | unsafe { *y = 2 }; = help: this indicates a potential bug in the program: it performed an invalid operation, but the Stacked Borrows rules it violated are still experimental = help: see https://github.com/rust-lang/unsafe-code-guidelines/blob/master/wip/stacked-borrows.md for further information help: was created by a SharedReadWrite retag at offsets [0x0..0x4] - --> $DIR/illegal_write6.rs:LL:CC + --> tests/fail/both_borrows/illegal_write6.rs:LL:CC | LL | let p = x as *mut u32; | ^ help: is this argument - --> $DIR/illegal_write6.rs:LL:CC + --> tests/fail/both_borrows/illegal_write6.rs:LL:CC | LL | fn foo(a: &mut u32, y: *mut u32) -> u32 { | ^ = note: BACKTRACE (of the first span): - = note: inside `foo` at $DIR/illegal_write6.rs:LL:CC + = note: inside `foo` at tests/fail/both_borrows/illegal_write6.rs:LL:CC note: inside `main` - --> $DIR/illegal_write6.rs:LL:CC + --> tests/fail/both_borrows/illegal_write6.rs:LL:CC | LL | foo(x, p); | ^^^^^^^^^ diff --git a/tests/fail/both_borrows/illegal_write6.tree.stderr b/tests/fail/both_borrows/illegal_write6.tree.stderr index 2e161ceea8..31599a767c 100644 --- a/tests/fail/both_borrows/illegal_write6.tree.stderr +++ b/tests/fail/both_borrows/illegal_write6.tree.stderr @@ -1,5 +1,5 @@ error: Undefined Behavior: write access through at ALLOC[0x0] is forbidden - --> $DIR/illegal_write6.rs:LL:CC + --> tests/fail/both_borrows/illegal_write6.rs:LL:CC | LL | unsafe { *y = 2 }; | ^^^^^^ write access through at ALLOC[0x0] is forbidden @@ -9,25 +9,25 @@ LL | unsafe { *y = 2 }; = help: this foreign write access would cause the protected tag (currently Active) to become Disabled = help: protected tags must never be Disabled help: the accessed tag was created here - --> $DIR/illegal_write6.rs:LL:CC + --> tests/fail/both_borrows/illegal_write6.rs:LL:CC | LL | let x = &mut 0u32; | ^^^^^^^^^ help: the protected tag was created here, in the initial state Reserved - --> $DIR/illegal_write6.rs:LL:CC + --> tests/fail/both_borrows/illegal_write6.rs:LL:CC | LL | fn foo(a: &mut u32, y: *mut u32) -> u32 { | ^ help: the protected tag later transitioned to Active due to a child write access at offsets [0x0..0x4] - --> $DIR/illegal_write6.rs:LL:CC + --> tests/fail/both_borrows/illegal_write6.rs:LL:CC | LL | *a = 1; | ^^^^^^ = help: this transition corresponds to the first write to a 2-phase borrowed mutable reference = note: BACKTRACE (of the first span): - = note: inside `foo` at $DIR/illegal_write6.rs:LL:CC + = note: inside `foo` at tests/fail/both_borrows/illegal_write6.rs:LL:CC note: inside `main` - --> $DIR/illegal_write6.rs:LL:CC + --> tests/fail/both_borrows/illegal_write6.rs:LL:CC | LL | foo(x, p); | ^^^^^^^^^ diff --git a/tests/fail/both_borrows/invalidate_against_protector2.stack.stderr b/tests/fail/both_borrows/invalidate_against_protector2.stack.stderr index 11edbc3270..b5df165328 100644 --- a/tests/fail/both_borrows/invalidate_against_protector2.stack.stderr +++ b/tests/fail/both_borrows/invalidate_against_protector2.stack.stderr @@ -1,5 +1,5 @@ error: Undefined Behavior: not granting access to tag because that would remove [SharedReadOnly for ] which is strongly protected - --> $DIR/invalidate_against_protector2.rs:LL:CC + --> tests/fail/both_borrows/invalidate_against_protector2.rs:LL:CC | LL | unsafe { *x = 0 }; | ^^^^^^ not granting access to tag because that would remove [SharedReadOnly for ] which is strongly protected @@ -7,19 +7,19 @@ LL | unsafe { *x = 0 }; = help: this indicates a potential bug in the program: it performed an invalid operation, but the Stacked Borrows rules it violated are still experimental = help: see https://github.com/rust-lang/unsafe-code-guidelines/blob/master/wip/stacked-borrows.md for further information help: was created by a SharedReadWrite retag at offsets [0x0..0x4] - --> $DIR/invalidate_against_protector2.rs:LL:CC + --> tests/fail/both_borrows/invalidate_against_protector2.rs:LL:CC | LL | let xraw = &mut x as *mut _; | ^^^^^^ help: is this argument - --> $DIR/invalidate_against_protector2.rs:LL:CC + --> tests/fail/both_borrows/invalidate_against_protector2.rs:LL:CC | LL | fn inner(x: *mut i32, _y: &i32) { | ^^ = note: BACKTRACE (of the first span): - = note: inside `inner` at $DIR/invalidate_against_protector2.rs:LL:CC + = note: inside `inner` at tests/fail/both_borrows/invalidate_against_protector2.rs:LL:CC note: inside `main` - --> $DIR/invalidate_against_protector2.rs:LL:CC + --> tests/fail/both_borrows/invalidate_against_protector2.rs:LL:CC | LL | inner(xraw, xref); | ^^^^^^^^^^^^^^^^^ diff --git a/tests/fail/both_borrows/invalidate_against_protector2.tree.stderr b/tests/fail/both_borrows/invalidate_against_protector2.tree.stderr index 9fa52262f7..c3b836a8aa 100644 --- a/tests/fail/both_borrows/invalidate_against_protector2.tree.stderr +++ b/tests/fail/both_borrows/invalidate_against_protector2.tree.stderr @@ -1,5 +1,5 @@ error: Undefined Behavior: write access through at ALLOC[0x0] is forbidden - --> $DIR/invalidate_against_protector2.rs:LL:CC + --> tests/fail/both_borrows/invalidate_against_protector2.rs:LL:CC | LL | unsafe { *x = 0 }; | ^^^^^^ write access through at ALLOC[0x0] is forbidden @@ -9,19 +9,19 @@ LL | unsafe { *x = 0 }; = help: this foreign write access would cause the protected tag (currently Frozen) to become Disabled = help: protected tags must never be Disabled help: the accessed tag was created here - --> $DIR/invalidate_against_protector2.rs:LL:CC + --> tests/fail/both_borrows/invalidate_against_protector2.rs:LL:CC | LL | let xraw = &mut x as *mut _; | ^^^^^^ help: the protected tag was created here, in the initial state Frozen - --> $DIR/invalidate_against_protector2.rs:LL:CC + --> tests/fail/both_borrows/invalidate_against_protector2.rs:LL:CC | LL | fn inner(x: *mut i32, _y: &i32) { | ^^ = note: BACKTRACE (of the first span): - = note: inside `inner` at $DIR/invalidate_against_protector2.rs:LL:CC + = note: inside `inner` at tests/fail/both_borrows/invalidate_against_protector2.rs:LL:CC note: inside `main` - --> $DIR/invalidate_against_protector2.rs:LL:CC + --> tests/fail/both_borrows/invalidate_against_protector2.rs:LL:CC | LL | inner(xraw, xref); | ^^^^^^^^^^^^^^^^^ diff --git a/tests/fail/both_borrows/invalidate_against_protector3.stack.stderr b/tests/fail/both_borrows/invalidate_against_protector3.stack.stderr index c6666ceac2..0010ce0e4e 100644 --- a/tests/fail/both_borrows/invalidate_against_protector3.stack.stderr +++ b/tests/fail/both_borrows/invalidate_against_protector3.stack.stderr @@ -1,5 +1,5 @@ error: Undefined Behavior: not granting access to tag because that would remove [SharedReadOnly for ] which is strongly protected - --> $DIR/invalidate_against_protector3.rs:LL:CC + --> tests/fail/both_borrows/invalidate_against_protector3.rs:LL:CC | LL | unsafe { *x = 0 }; | ^^^^^^ not granting access to tag because that would remove [SharedReadOnly for ] which is strongly protected @@ -7,19 +7,19 @@ LL | unsafe { *x = 0 }; = help: this indicates a potential bug in the program: it performed an invalid operation, but the Stacked Borrows rules it violated are still experimental = help: see https://github.com/rust-lang/unsafe-code-guidelines/blob/master/wip/stacked-borrows.md for further information help: was created here, as the root tag for ALLOC - --> $DIR/invalidate_against_protector3.rs:LL:CC + --> tests/fail/both_borrows/invalidate_against_protector3.rs:LL:CC | LL | let ptr = alloc(Layout::for_value(&0i32)) as *mut i32; | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: is this argument - --> $DIR/invalidate_against_protector3.rs:LL:CC + --> tests/fail/both_borrows/invalidate_against_protector3.rs:LL:CC | LL | fn inner(x: *mut i32, _y: &i32) { | ^^ = note: BACKTRACE (of the first span): - = note: inside `inner` at $DIR/invalidate_against_protector3.rs:LL:CC + = note: inside `inner` at tests/fail/both_borrows/invalidate_against_protector3.rs:LL:CC note: inside `main` - --> $DIR/invalidate_against_protector3.rs:LL:CC + --> tests/fail/both_borrows/invalidate_against_protector3.rs:LL:CC | LL | inner(ptr, &*ptr); | ^^^^^^^^^^^^^^^^^ diff --git a/tests/fail/both_borrows/invalidate_against_protector3.tree.stderr b/tests/fail/both_borrows/invalidate_against_protector3.tree.stderr index 2cf476c837..b47fb81f5f 100644 --- a/tests/fail/both_borrows/invalidate_against_protector3.tree.stderr +++ b/tests/fail/both_borrows/invalidate_against_protector3.tree.stderr @@ -1,5 +1,5 @@ error: Undefined Behavior: write access through (root of the allocation) at ALLOC[0x0] is forbidden - --> $DIR/invalidate_against_protector3.rs:LL:CC + --> tests/fail/both_borrows/invalidate_against_protector3.rs:LL:CC | LL | unsafe { *x = 0 }; | ^^^^^^ write access through (root of the allocation) at ALLOC[0x0] is forbidden @@ -9,19 +9,19 @@ LL | unsafe { *x = 0 }; = help: this foreign write access would cause the protected tag (currently Frozen) to become Disabled = help: protected tags must never be Disabled help: the accessed tag was created here - --> $DIR/invalidate_against_protector3.rs:LL:CC + --> tests/fail/both_borrows/invalidate_against_protector3.rs:LL:CC | LL | let ptr = alloc(Layout::for_value(&0i32)) as *mut i32; | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: the protected tag was created here, in the initial state Frozen - --> $DIR/invalidate_against_protector3.rs:LL:CC + --> tests/fail/both_borrows/invalidate_against_protector3.rs:LL:CC | LL | fn inner(x: *mut i32, _y: &i32) { | ^^ = note: BACKTRACE (of the first span): - = note: inside `inner` at $DIR/invalidate_against_protector3.rs:LL:CC + = note: inside `inner` at tests/fail/both_borrows/invalidate_against_protector3.rs:LL:CC note: inside `main` - --> $DIR/invalidate_against_protector3.rs:LL:CC + --> tests/fail/both_borrows/invalidate_against_protector3.rs:LL:CC | LL | inner(ptr, &*ptr); | ^^^^^^^^^^^^^^^^^ diff --git a/tests/fail/both_borrows/issue-miri-1050-1.stack.stderr b/tests/fail/both_borrows/issue-miri-1050-1.stack.stderr index 64bbbfcd84..cd27bb818e 100644 --- a/tests/fail/both_borrows/issue-miri-1050-1.stack.stderr +++ b/tests/fail/both_borrows/issue-miri-1050-1.stack.stderr @@ -7,7 +7,7 @@ LL | Box(unsafe { Unique::new_unchecked(raw) }, alloc) = 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 help: ALLOC was allocated here: - --> $DIR/issue-miri-1050-1.rs:LL:CC + --> tests/fail/both_borrows/issue-miri-1050-1.rs:LL:CC | LL | let ptr = Box::into_raw(Box::new(0u16)); | ^^^^^^^^^^^^^^ @@ -15,7 +15,7 @@ LL | let ptr = Box::into_raw(Box::new(0u16)); = note: inside `std::boxed::Box::::from_raw_in` at RUSTLIB/alloc/src/boxed.rs:LL:CC = note: inside `std::boxed::Box::::from_raw` at RUSTLIB/alloc/src/boxed.rs:LL:CC note: inside `main` - --> $DIR/issue-miri-1050-1.rs:LL:CC + --> tests/fail/both_borrows/issue-miri-1050-1.rs:LL:CC | LL | drop(Box::from_raw(ptr as *mut u32)); | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ diff --git a/tests/fail/both_borrows/issue-miri-1050-1.tree.stderr b/tests/fail/both_borrows/issue-miri-1050-1.tree.stderr index 64bbbfcd84..cd27bb818e 100644 --- a/tests/fail/both_borrows/issue-miri-1050-1.tree.stderr +++ b/tests/fail/both_borrows/issue-miri-1050-1.tree.stderr @@ -7,7 +7,7 @@ LL | Box(unsafe { Unique::new_unchecked(raw) }, alloc) = 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 help: ALLOC was allocated here: - --> $DIR/issue-miri-1050-1.rs:LL:CC + --> tests/fail/both_borrows/issue-miri-1050-1.rs:LL:CC | LL | let ptr = Box::into_raw(Box::new(0u16)); | ^^^^^^^^^^^^^^ @@ -15,7 +15,7 @@ LL | let ptr = Box::into_raw(Box::new(0u16)); = note: inside `std::boxed::Box::::from_raw_in` at RUSTLIB/alloc/src/boxed.rs:LL:CC = note: inside `std::boxed::Box::::from_raw` at RUSTLIB/alloc/src/boxed.rs:LL:CC note: inside `main` - --> $DIR/issue-miri-1050-1.rs:LL:CC + --> tests/fail/both_borrows/issue-miri-1050-1.rs:LL:CC | LL | drop(Box::from_raw(ptr as *mut u32)); | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ diff --git a/tests/fail/both_borrows/issue-miri-1050-2.stack.stderr b/tests/fail/both_borrows/issue-miri-1050-2.stack.stderr index 04494b5256..04e5765371 100644 --- a/tests/fail/both_borrows/issue-miri-1050-2.stack.stderr +++ b/tests/fail/both_borrows/issue-miri-1050-2.stack.stderr @@ -10,7 +10,7 @@ LL | Box(unsafe { Unique::new_unchecked(raw) }, alloc) = note: inside `std::boxed::Box::::from_raw_in` at RUSTLIB/alloc/src/boxed.rs:LL:CC = note: inside `std::boxed::Box::::from_raw` at RUSTLIB/alloc/src/boxed.rs:LL:CC note: inside `main` - --> $DIR/issue-miri-1050-2.rs:LL:CC + --> tests/fail/both_borrows/issue-miri-1050-2.rs:LL:CC | LL | drop(Box::from_raw(ptr.as_ptr())); | ^^^^^^^^^^^^^^^^^^^^^^^^^^^ diff --git a/tests/fail/both_borrows/issue-miri-1050-2.tree.stderr b/tests/fail/both_borrows/issue-miri-1050-2.tree.stderr index 04494b5256..04e5765371 100644 --- a/tests/fail/both_borrows/issue-miri-1050-2.tree.stderr +++ b/tests/fail/both_borrows/issue-miri-1050-2.tree.stderr @@ -10,7 +10,7 @@ LL | Box(unsafe { Unique::new_unchecked(raw) }, alloc) = note: inside `std::boxed::Box::::from_raw_in` at RUSTLIB/alloc/src/boxed.rs:LL:CC = note: inside `std::boxed::Box::::from_raw` at RUSTLIB/alloc/src/boxed.rs:LL:CC note: inside `main` - --> $DIR/issue-miri-1050-2.rs:LL:CC + --> tests/fail/both_borrows/issue-miri-1050-2.rs:LL:CC | LL | drop(Box::from_raw(ptr.as_ptr())); | ^^^^^^^^^^^^^^^^^^^^^^^^^^^ diff --git a/tests/fail/both_borrows/load_invalid_shr.stack.stderr b/tests/fail/both_borrows/load_invalid_shr.stack.stderr index e78807ec1c..ffc73ee43d 100644 --- a/tests/fail/both_borrows/load_invalid_shr.stack.stderr +++ b/tests/fail/both_borrows/load_invalid_shr.stack.stderr @@ -1,5 +1,5 @@ error: Undefined Behavior: trying to retag from for SharedReadOnly permission at ALLOC[0x0], but that tag does not exist in the borrow stack for this location - --> $DIR/load_invalid_shr.rs:LL:CC + --> tests/fail/both_borrows/load_invalid_shr.rs:LL:CC | LL | let _val = *xref_in_mem; | ^^^^^^^^^^^^ @@ -10,17 +10,17 @@ LL | let _val = *xref_in_mem; = help: this indicates a potential bug in the program: it performed an invalid operation, but the Stacked Borrows rules it violated are still experimental = help: see https://github.com/rust-lang/unsafe-code-guidelines/blob/master/wip/stacked-borrows.md for further information help: was created by a SharedReadOnly retag at offsets [0x0..0x4] - --> $DIR/load_invalid_shr.rs:LL:CC + --> tests/fail/both_borrows/load_invalid_shr.rs:LL:CC | LL | let xref_in_mem = Box::new(xref); | ^^^^^^^^^^^^^^ help: was later invalidated at offsets [0x0..0x4] by a write access - --> $DIR/load_invalid_shr.rs:LL:CC + --> tests/fail/both_borrows/load_invalid_shr.rs:LL:CC | LL | unsafe { *xraw = 42 }; // unfreeze | ^^^^^^^^^^ = note: BACKTRACE (of the first span): - = note: inside `main` at $DIR/load_invalid_shr.rs:LL:CC + = note: inside `main` at tests/fail/both_borrows/load_invalid_shr.rs:LL:CC note: some details are omitted, run with `MIRIFLAGS=-Zmiri-backtrace=full` for a verbose backtrace diff --git a/tests/fail/both_borrows/load_invalid_shr.tree.stderr b/tests/fail/both_borrows/load_invalid_shr.tree.stderr index 0fcfc20e43..4610739739 100644 --- a/tests/fail/both_borrows/load_invalid_shr.tree.stderr +++ b/tests/fail/both_borrows/load_invalid_shr.tree.stderr @@ -1,5 +1,5 @@ error: Undefined Behavior: reborrow through at ALLOC[0x0] is forbidden - --> $DIR/load_invalid_shr.rs:LL:CC + --> tests/fail/both_borrows/load_invalid_shr.rs:LL:CC | LL | let _val = *xref_in_mem; | ^^^^^^^^^^^^ reborrow through at ALLOC[0x0] is forbidden @@ -7,18 +7,18 @@ LL | let _val = *xref_in_mem; = help: this indicates a potential bug in the program: it performed an invalid operation, but the Tree Borrows rules it violated are still experimental = help: the accessed tag has state Disabled which forbids this reborrow (acting as a child read access) help: the accessed tag was created here, in the initial state Frozen - --> $DIR/load_invalid_shr.rs:LL:CC + --> tests/fail/both_borrows/load_invalid_shr.rs:LL:CC | LL | let xref_in_mem = Box::new(xref); | ^^^^^^^^^^^^^^ help: the accessed tag later transitioned to Disabled due to a foreign write access at offsets [0x0..0x4] - --> $DIR/load_invalid_shr.rs:LL:CC + --> tests/fail/both_borrows/load_invalid_shr.rs:LL:CC | LL | unsafe { *xraw = 42 }; // unfreeze | ^^^^^^^^^^ = help: this transition corresponds to a loss of read permissions = note: BACKTRACE (of the first span): - = note: inside `main` at $DIR/load_invalid_shr.rs:LL:CC + = note: inside `main` at tests/fail/both_borrows/load_invalid_shr.rs:LL:CC note: some details are omitted, run with `MIRIFLAGS=-Zmiri-backtrace=full` for a verbose backtrace diff --git a/tests/fail/both_borrows/mut_exclusive_violation1.stack.stderr b/tests/fail/both_borrows/mut_exclusive_violation1.stack.stderr index 264503f2f2..92df9bcbe3 100644 --- a/tests/fail/both_borrows/mut_exclusive_violation1.stack.stderr +++ b/tests/fail/both_borrows/mut_exclusive_violation1.stack.stderr @@ -1,5 +1,5 @@ error: Undefined Behavior: attempting a write access using at ALLOC[0x0], but that tag does not exist in the borrow stack for this location - --> $DIR/mut_exclusive_violation1.rs:LL:CC + --> tests/fail/both_borrows/mut_exclusive_violation1.rs:LL:CC | LL | *LEAK = 7; | ^^^^^^^^^ @@ -10,24 +10,24 @@ LL | *LEAK = 7; = help: this indicates a potential bug in the program: it performed an invalid operation, but the Stacked Borrows rules it violated are still experimental = help: see https://github.com/rust-lang/unsafe-code-guidelines/blob/master/wip/stacked-borrows.md for further information help: was created by a SharedReadOnly retag at offsets [0x0..0x4] - --> $DIR/mut_exclusive_violation1.rs:LL:CC + --> tests/fail/both_borrows/mut_exclusive_violation1.rs:LL:CC | LL | LEAK = x as *const _ as *mut _; | ^ help: was later invalidated at offsets [0x0..0x4] by a write access - --> $DIR/mut_exclusive_violation1.rs:LL:CC + --> tests/fail/both_borrows/mut_exclusive_violation1.rs:LL:CC | LL | *our = 5; | ^^^^^^^^ = note: BACKTRACE (of the first span): - = note: inside `unknown_code_2` at $DIR/mut_exclusive_violation1.rs:LL:CC + = note: inside `unknown_code_2` at tests/fail/both_borrows/mut_exclusive_violation1.rs:LL:CC note: inside `demo_mut_advanced_unique` - --> $DIR/mut_exclusive_violation1.rs:LL:CC + --> tests/fail/both_borrows/mut_exclusive_violation1.rs:LL:CC | LL | unknown_code_2(); | ^^^^^^^^^^^^^^^^ note: inside `main` - --> $DIR/mut_exclusive_violation1.rs:LL:CC + --> tests/fail/both_borrows/mut_exclusive_violation1.rs:LL:CC | LL | demo_mut_advanced_unique(&mut 0); | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ diff --git a/tests/fail/both_borrows/mut_exclusive_violation1.tree.stderr b/tests/fail/both_borrows/mut_exclusive_violation1.tree.stderr index 5b4ee4a891..46660d3129 100644 --- a/tests/fail/both_borrows/mut_exclusive_violation1.tree.stderr +++ b/tests/fail/both_borrows/mut_exclusive_violation1.tree.stderr @@ -1,5 +1,5 @@ error: Undefined Behavior: write access through at ALLOC[0x0] is forbidden - --> $DIR/mut_exclusive_violation1.rs:LL:CC + --> tests/fail/both_borrows/mut_exclusive_violation1.rs:LL:CC | LL | *LEAK = 7; | ^^^^^^^^^ write access through at ALLOC[0x0] is forbidden @@ -7,25 +7,25 @@ LL | *LEAK = 7; = help: this indicates a potential bug in the program: it performed an invalid operation, but the Tree Borrows rules it violated are still experimental = help: the accessed tag has state Disabled which forbids this child write access help: the accessed tag was created here, in the initial state Frozen - --> $DIR/mut_exclusive_violation1.rs:LL:CC + --> tests/fail/both_borrows/mut_exclusive_violation1.rs:LL:CC | LL | fn unknown_code_1(x: &i32) { | ^ help: the accessed tag later transitioned to Disabled due to a foreign write access at offsets [0x0..0x4] - --> $DIR/mut_exclusive_violation1.rs:LL:CC + --> tests/fail/both_borrows/mut_exclusive_violation1.rs:LL:CC | LL | *our = 5; | ^^^^^^^^ = help: this transition corresponds to a loss of read permissions = note: BACKTRACE (of the first span): - = note: inside `unknown_code_2` at $DIR/mut_exclusive_violation1.rs:LL:CC + = note: inside `unknown_code_2` at tests/fail/both_borrows/mut_exclusive_violation1.rs:LL:CC note: inside `demo_mut_advanced_unique` - --> $DIR/mut_exclusive_violation1.rs:LL:CC + --> tests/fail/both_borrows/mut_exclusive_violation1.rs:LL:CC | LL | unknown_code_2(); | ^^^^^^^^^^^^^^^^ note: inside `main` - --> $DIR/mut_exclusive_violation1.rs:LL:CC + --> tests/fail/both_borrows/mut_exclusive_violation1.rs:LL:CC | LL | demo_mut_advanced_unique(&mut 0); | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ diff --git a/tests/fail/both_borrows/mut_exclusive_violation2.stack.stderr b/tests/fail/both_borrows/mut_exclusive_violation2.stack.stderr index 35d418f574..42e30cf10c 100644 --- a/tests/fail/both_borrows/mut_exclusive_violation2.stack.stderr +++ b/tests/fail/both_borrows/mut_exclusive_violation2.stack.stderr @@ -1,5 +1,5 @@ error: Undefined Behavior: attempting a read access using at ALLOC[0x0], but that tag does not exist in the borrow stack for this location - --> $DIR/mut_exclusive_violation2.rs:LL:CC + --> tests/fail/both_borrows/mut_exclusive_violation2.rs:LL:CC | LL | let _val = *raw1; | ^^^^^ @@ -10,17 +10,17 @@ LL | let _val = *raw1; = help: this indicates a potential bug in the program: it performed an invalid operation, but the Stacked Borrows rules it violated are still experimental = help: see https://github.com/rust-lang/unsafe-code-guidelines/blob/master/wip/stacked-borrows.md for further information help: was created by a Unique retag at offsets [0x0..0x4] - --> $DIR/mut_exclusive_violation2.rs:LL:CC + --> tests/fail/both_borrows/mut_exclusive_violation2.rs:LL:CC | LL | let raw1 = ptr1.as_mut(); | ^^^^^^^^^^^^^ help: was later invalidated at offsets [0x0..0x4] by a Unique retag - --> $DIR/mut_exclusive_violation2.rs:LL:CC + --> tests/fail/both_borrows/mut_exclusive_violation2.rs:LL:CC | LL | let raw2 = ptr2.as_mut(); | ^^^^^^^^^^^^^ = note: BACKTRACE (of the first span): - = note: inside `main` at $DIR/mut_exclusive_violation2.rs:LL:CC + = note: inside `main` at tests/fail/both_borrows/mut_exclusive_violation2.rs:LL:CC note: some details are omitted, run with `MIRIFLAGS=-Zmiri-backtrace=full` for a verbose backtrace diff --git a/tests/fail/both_borrows/mut_exclusive_violation2.tree.stderr b/tests/fail/both_borrows/mut_exclusive_violation2.tree.stderr index d3bc54b7ef..a9b1b49e38 100644 --- a/tests/fail/both_borrows/mut_exclusive_violation2.tree.stderr +++ b/tests/fail/both_borrows/mut_exclusive_violation2.tree.stderr @@ -1,5 +1,5 @@ error: Undefined Behavior: write access through at ALLOC[0x0] is forbidden - --> $DIR/mut_exclusive_violation2.rs:LL:CC + --> tests/fail/both_borrows/mut_exclusive_violation2.rs:LL:CC | LL | *raw1 = 3; | ^^^^^^^^^ write access through at ALLOC[0x0] is forbidden @@ -7,18 +7,18 @@ LL | *raw1 = 3; = help: this indicates a potential bug in the program: it performed an invalid operation, but the Tree Borrows rules it violated are still experimental = help: the accessed tag has state Disabled which forbids this child write access help: the accessed tag was created here, in the initial state Reserved - --> $DIR/mut_exclusive_violation2.rs:LL:CC + --> tests/fail/both_borrows/mut_exclusive_violation2.rs:LL:CC | LL | let raw1 = ptr1.as_mut(); | ^^^^^^^^^^^^^ help: the accessed tag later transitioned to Disabled due to a foreign write access at offsets [0x0..0x4] - --> $DIR/mut_exclusive_violation2.rs:LL:CC + --> tests/fail/both_borrows/mut_exclusive_violation2.rs:LL:CC | LL | *raw2 = 2; | ^^^^^^^^^ = help: this transition corresponds to a loss of read and write permissions = note: BACKTRACE (of the first span): - = note: inside `main` at $DIR/mut_exclusive_violation2.rs:LL:CC + = note: inside `main` at tests/fail/both_borrows/mut_exclusive_violation2.rs:LL:CC note: some details are omitted, run with `MIRIFLAGS=-Zmiri-backtrace=full` for a verbose backtrace diff --git a/tests/fail/both_borrows/newtype_pair_retagging.stack.stderr b/tests/fail/both_borrows/newtype_pair_retagging.stack.stderr index 9f545e5687..f428447230 100644 --- a/tests/fail/both_borrows/newtype_pair_retagging.stack.stderr +++ b/tests/fail/both_borrows/newtype_pair_retagging.stack.stderr @@ -7,12 +7,12 @@ LL | Box(unsafe { Unique::new_unchecked(raw) }, alloc) = help: this indicates a potential bug in the program: it performed an invalid operation, but the Stacked Borrows rules it violated are still experimental = help: see https://github.com/rust-lang/unsafe-code-guidelines/blob/master/wip/stacked-borrows.md for further information help: was created by a SharedReadWrite retag at offsets [0x0..0x4] - --> $DIR/newtype_pair_retagging.rs:LL:CC + --> tests/fail/both_borrows/newtype_pair_retagging.rs:LL:CC | LL | let ptr = Box::into_raw(Box::new(0i32)); | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: is this argument - --> $DIR/newtype_pair_retagging.rs:LL:CC + --> tests/fail/both_borrows/newtype_pair_retagging.rs:LL:CC | LL | fn dealloc_while_running(_n: Newtype<'_>, dealloc: impl FnOnce()) { | ^^ @@ -20,17 +20,17 @@ LL | fn dealloc_while_running(_n: Newtype<'_>, dealloc: impl FnOnce()) { = note: inside `std::boxed::Box::::from_raw_in` at RUSTLIB/alloc/src/boxed.rs:LL:CC = note: inside `std::boxed::Box::::from_raw` at RUSTLIB/alloc/src/boxed.rs:LL:CC note: inside closure - --> $DIR/newtype_pair_retagging.rs:LL:CC + --> tests/fail/both_borrows/newtype_pair_retagging.rs:LL:CC | LL | || drop(Box::from_raw(ptr)), | ^^^^^^^^^^^^^^^^^^ -note: inside `dealloc_while_running::<{closure@$DIR/newtype_pair_retagging.rs:LL:CC}>` - --> $DIR/newtype_pair_retagging.rs:LL:CC +note: inside `dealloc_while_running::<{closure@tests/fail/both_borrows/newtype_pair_retagging.rs:LL:CC}>` + --> tests/fail/both_borrows/newtype_pair_retagging.rs:LL:CC | LL | dealloc(); | ^^^^^^^^^ note: inside `main` - --> $DIR/newtype_pair_retagging.rs:LL:CC + --> tests/fail/both_borrows/newtype_pair_retagging.rs:LL:CC | LL | / dealloc_while_running( LL | | Newtype(&mut *ptr, 0), diff --git a/tests/fail/both_borrows/newtype_pair_retagging.tree.stderr b/tests/fail/both_borrows/newtype_pair_retagging.tree.stderr index 0a54f14bb5..f20ee75afb 100644 --- a/tests/fail/both_borrows/newtype_pair_retagging.tree.stderr +++ b/tests/fail/both_borrows/newtype_pair_retagging.tree.stderr @@ -9,17 +9,17 @@ LL | unsafe { __rust_dealloc(ptr, layout.size(), layout.align()) } = help: this deallocation (acting as a foreign write access) would cause the protected tag (currently Reserved (conflicted)) to become Disabled = help: protected tags must never be Disabled help: the accessed tag was created here - --> $DIR/newtype_pair_retagging.rs:LL:CC + --> tests/fail/both_borrows/newtype_pair_retagging.rs:LL:CC | LL | || drop(Box::from_raw(ptr)), | ^^^^^^^^^^^^^^^^^^^^^^^^ help: the protected tag was created here, in the initial state Reserved - --> $DIR/newtype_pair_retagging.rs:LL:CC + --> tests/fail/both_borrows/newtype_pair_retagging.rs:LL:CC | LL | fn dealloc_while_running(_n: Newtype<'_>, dealloc: impl FnOnce()) { | ^^ help: the protected tag later transitioned to Reserved (conflicted) due to a reborrow (acting as a foreign read access) at offsets [0x0..0x4] - --> $DIR/newtype_pair_retagging.rs:LL:CC + --> tests/fail/both_borrows/newtype_pair_retagging.rs:LL:CC | LL | || drop(Box::from_raw(ptr)), | ^^^^^^^^^^^^^^^^^^ @@ -31,17 +31,17 @@ LL | || drop(Box::from_raw(ptr)), = note: inside `std::ptr::drop_in_place::> - shim(Some(std::boxed::Box))` at RUSTLIB/core/src/ptr/mod.rs:LL:CC = note: inside `std::mem::drop::>` at RUSTLIB/core/src/mem/mod.rs:LL:CC note: inside closure - --> $DIR/newtype_pair_retagging.rs:LL:CC + --> tests/fail/both_borrows/newtype_pair_retagging.rs:LL:CC | LL | || drop(Box::from_raw(ptr)), | ^^^^^^^^^^^^^^^^^^^^^^^^ -note: inside `dealloc_while_running::<{closure@$DIR/newtype_pair_retagging.rs:LL:CC}>` - --> $DIR/newtype_pair_retagging.rs:LL:CC +note: inside `dealloc_while_running::<{closure@tests/fail/both_borrows/newtype_pair_retagging.rs:LL:CC}>` + --> tests/fail/both_borrows/newtype_pair_retagging.rs:LL:CC | LL | dealloc(); | ^^^^^^^^^ note: inside `main` - --> $DIR/newtype_pair_retagging.rs:LL:CC + --> tests/fail/both_borrows/newtype_pair_retagging.rs:LL:CC | LL | / dealloc_while_running( LL | | Newtype(&mut *ptr, 0), diff --git a/tests/fail/both_borrows/newtype_retagging.stack.stderr b/tests/fail/both_borrows/newtype_retagging.stack.stderr index a4111f6f5c..0410c2488d 100644 --- a/tests/fail/both_borrows/newtype_retagging.stack.stderr +++ b/tests/fail/both_borrows/newtype_retagging.stack.stderr @@ -7,12 +7,12 @@ LL | Box(unsafe { Unique::new_unchecked(raw) }, alloc) = help: this indicates a potential bug in the program: it performed an invalid operation, but the Stacked Borrows rules it violated are still experimental = help: see https://github.com/rust-lang/unsafe-code-guidelines/blob/master/wip/stacked-borrows.md for further information help: was created by a SharedReadWrite retag at offsets [0x0..0x4] - --> $DIR/newtype_retagging.rs:LL:CC + --> tests/fail/both_borrows/newtype_retagging.rs:LL:CC | LL | let ptr = Box::into_raw(Box::new(0i32)); | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: is this argument - --> $DIR/newtype_retagging.rs:LL:CC + --> tests/fail/both_borrows/newtype_retagging.rs:LL:CC | LL | fn dealloc_while_running(_n: Newtype<'_>, dealloc: impl FnOnce()) { | ^^ @@ -20,17 +20,17 @@ LL | fn dealloc_while_running(_n: Newtype<'_>, dealloc: impl FnOnce()) { = note: inside `std::boxed::Box::::from_raw_in` at RUSTLIB/alloc/src/boxed.rs:LL:CC = note: inside `std::boxed::Box::::from_raw` at RUSTLIB/alloc/src/boxed.rs:LL:CC note: inside closure - --> $DIR/newtype_retagging.rs:LL:CC + --> tests/fail/both_borrows/newtype_retagging.rs:LL:CC | LL | || drop(Box::from_raw(ptr)), | ^^^^^^^^^^^^^^^^^^ -note: inside `dealloc_while_running::<{closure@$DIR/newtype_retagging.rs:LL:CC}>` - --> $DIR/newtype_retagging.rs:LL:CC +note: inside `dealloc_while_running::<{closure@tests/fail/both_borrows/newtype_retagging.rs:LL:CC}>` + --> tests/fail/both_borrows/newtype_retagging.rs:LL:CC | LL | dealloc(); | ^^^^^^^^^ note: inside `main` - --> $DIR/newtype_retagging.rs:LL:CC + --> tests/fail/both_borrows/newtype_retagging.rs:LL:CC | LL | / dealloc_while_running( LL | | Newtype(&mut *ptr), diff --git a/tests/fail/both_borrows/newtype_retagging.tree.stderr b/tests/fail/both_borrows/newtype_retagging.tree.stderr index 05f1d8822c..3c1c58c88d 100644 --- a/tests/fail/both_borrows/newtype_retagging.tree.stderr +++ b/tests/fail/both_borrows/newtype_retagging.tree.stderr @@ -9,17 +9,17 @@ LL | unsafe { __rust_dealloc(ptr, layout.size(), layout.align()) } = help: this deallocation (acting as a foreign write access) would cause the protected tag (currently Reserved (conflicted)) to become Disabled = help: protected tags must never be Disabled help: the accessed tag was created here - --> $DIR/newtype_retagging.rs:LL:CC + --> tests/fail/both_borrows/newtype_retagging.rs:LL:CC | LL | || drop(Box::from_raw(ptr)), | ^^^^^^^^^^^^^^^^^^^^^^^^ help: the protected tag was created here, in the initial state Reserved - --> $DIR/newtype_retagging.rs:LL:CC + --> tests/fail/both_borrows/newtype_retagging.rs:LL:CC | LL | fn dealloc_while_running(_n: Newtype<'_>, dealloc: impl FnOnce()) { | ^^ help: the protected tag later transitioned to Reserved (conflicted) due to a reborrow (acting as a foreign read access) at offsets [0x0..0x4] - --> $DIR/newtype_retagging.rs:LL:CC + --> tests/fail/both_borrows/newtype_retagging.rs:LL:CC | LL | || drop(Box::from_raw(ptr)), | ^^^^^^^^^^^^^^^^^^ @@ -31,17 +31,17 @@ LL | || drop(Box::from_raw(ptr)), = note: inside `std::ptr::drop_in_place::> - shim(Some(std::boxed::Box))` at RUSTLIB/core/src/ptr/mod.rs:LL:CC = note: inside `std::mem::drop::>` at RUSTLIB/core/src/mem/mod.rs:LL:CC note: inside closure - --> $DIR/newtype_retagging.rs:LL:CC + --> tests/fail/both_borrows/newtype_retagging.rs:LL:CC | LL | || drop(Box::from_raw(ptr)), | ^^^^^^^^^^^^^^^^^^^^^^^^ -note: inside `dealloc_while_running::<{closure@$DIR/newtype_retagging.rs:LL:CC}>` - --> $DIR/newtype_retagging.rs:LL:CC +note: inside `dealloc_while_running::<{closure@tests/fail/both_borrows/newtype_retagging.rs:LL:CC}>` + --> tests/fail/both_borrows/newtype_retagging.rs:LL:CC | LL | dealloc(); | ^^^^^^^^^ note: inside `main` - --> $DIR/newtype_retagging.rs:LL:CC + --> tests/fail/both_borrows/newtype_retagging.rs:LL:CC | LL | / dealloc_while_running( LL | | Newtype(&mut *ptr), diff --git a/tests/fail/both_borrows/outdated_local.stack.stderr b/tests/fail/both_borrows/outdated_local.stack.stderr index 9717dd16b5..79d3538e92 100644 --- a/tests/fail/both_borrows/outdated_local.stack.stderr +++ b/tests/fail/both_borrows/outdated_local.stack.stderr @@ -1,5 +1,5 @@ error: Undefined Behavior: attempting a read access using at ALLOC[0x0], but that tag does not exist in the borrow stack for this location - --> $DIR/outdated_local.rs:LL:CC + --> tests/fail/both_borrows/outdated_local.rs:LL:CC | LL | assert_eq!(unsafe { *y }, 1); | ^^ @@ -10,17 +10,17 @@ LL | assert_eq!(unsafe { *y }, 1); = help: this indicates a potential bug in the program: it performed an invalid operation, but the Stacked Borrows rules it violated are still experimental = help: see https://github.com/rust-lang/unsafe-code-guidelines/blob/master/wip/stacked-borrows.md for further information help: was created by a SharedReadOnly retag at offsets [0x0..0x4] - --> $DIR/outdated_local.rs:LL:CC + --> tests/fail/both_borrows/outdated_local.rs:LL:CC | LL | let y: *const i32 = &x; | ^^ help: was later invalidated at offsets [0x0..0x4] by a write access - --> $DIR/outdated_local.rs:LL:CC + --> tests/fail/both_borrows/outdated_local.rs:LL:CC | LL | x = 1; // this invalidates y by reactivating the lowermost uniq borrow for this local | ^^^^^ = note: BACKTRACE (of the first span): - = note: inside `main` at $DIR/outdated_local.rs:LL:CC + = note: inside `main` at tests/fail/both_borrows/outdated_local.rs:LL:CC note: some details are omitted, run with `MIRIFLAGS=-Zmiri-backtrace=full` for a verbose backtrace diff --git a/tests/fail/both_borrows/outdated_local.tree.stderr b/tests/fail/both_borrows/outdated_local.tree.stderr index 60de8417c1..fffa83a962 100644 --- a/tests/fail/both_borrows/outdated_local.tree.stderr +++ b/tests/fail/both_borrows/outdated_local.tree.stderr @@ -1,5 +1,5 @@ error: Undefined Behavior: read access through at ALLOC[0x0] is forbidden - --> $DIR/outdated_local.rs:LL:CC + --> tests/fail/both_borrows/outdated_local.rs:LL:CC | LL | assert_eq!(unsafe { *y }, 1); | ^^ read access through at ALLOC[0x0] is forbidden @@ -7,18 +7,18 @@ LL | assert_eq!(unsafe { *y }, 1); = help: this indicates a potential bug in the program: it performed an invalid operation, but the Tree Borrows rules it violated are still experimental = help: the accessed tag has state Disabled which forbids this child read access help: the accessed tag was created here, in the initial state Frozen - --> $DIR/outdated_local.rs:LL:CC + --> tests/fail/both_borrows/outdated_local.rs:LL:CC | LL | let y: *const i32 = &x; | ^^ help: the accessed tag later transitioned to Disabled due to a foreign write access at offsets [0x0..0x4] - --> $DIR/outdated_local.rs:LL:CC + --> tests/fail/both_borrows/outdated_local.rs:LL:CC | LL | x = 1; // this invalidates y by reactivating the lowermost uniq borrow for this local | ^^^^^ = help: this transition corresponds to a loss of read permissions = note: BACKTRACE (of the first span): - = note: inside `main` at $DIR/outdated_local.rs:LL:CC + = note: inside `main` at tests/fail/both_borrows/outdated_local.rs:LL:CC note: some details are omitted, run with `MIRIFLAGS=-Zmiri-backtrace=full` for a verbose backtrace diff --git a/tests/fail/both_borrows/pass_invalid_shr.stack.stderr b/tests/fail/both_borrows/pass_invalid_shr.stack.stderr index 57c4a756cf..108c78abef 100644 --- a/tests/fail/both_borrows/pass_invalid_shr.stack.stderr +++ b/tests/fail/both_borrows/pass_invalid_shr.stack.stderr @@ -1,5 +1,5 @@ error: Undefined Behavior: trying to retag from for SharedReadOnly permission at ALLOC[0x0], but that tag does not exist in the borrow stack for this location - --> $DIR/pass_invalid_shr.rs:LL:CC + --> tests/fail/both_borrows/pass_invalid_shr.rs:LL:CC | LL | foo(xref); | ^^^^ @@ -10,17 +10,17 @@ LL | foo(xref); = help: this indicates a potential bug in the program: it performed an invalid operation, but the Stacked Borrows rules it violated are still experimental = help: see https://github.com/rust-lang/unsafe-code-guidelines/blob/master/wip/stacked-borrows.md for further information help: was created by a SharedReadOnly retag at offsets [0x0..0x4] - --> $DIR/pass_invalid_shr.rs:LL:CC + --> tests/fail/both_borrows/pass_invalid_shr.rs:LL:CC | LL | let xref = unsafe { &*xraw }; | ^^^^^^ help: was later invalidated at offsets [0x0..0x4] by a write access - --> $DIR/pass_invalid_shr.rs:LL:CC + --> tests/fail/both_borrows/pass_invalid_shr.rs:LL:CC | LL | unsafe { *xraw = 42 }; // unfreeze | ^^^^^^^^^^ = note: BACKTRACE (of the first span): - = note: inside `main` at $DIR/pass_invalid_shr.rs:LL:CC + = note: inside `main` at tests/fail/both_borrows/pass_invalid_shr.rs:LL:CC note: some details are omitted, run with `MIRIFLAGS=-Zmiri-backtrace=full` for a verbose backtrace diff --git a/tests/fail/both_borrows/pass_invalid_shr.tree.stderr b/tests/fail/both_borrows/pass_invalid_shr.tree.stderr index 97a6efa9f6..59750d5647 100644 --- a/tests/fail/both_borrows/pass_invalid_shr.tree.stderr +++ b/tests/fail/both_borrows/pass_invalid_shr.tree.stderr @@ -1,5 +1,5 @@ error: Undefined Behavior: reborrow through at ALLOC[0x0] is forbidden - --> $DIR/pass_invalid_shr.rs:LL:CC + --> tests/fail/both_borrows/pass_invalid_shr.rs:LL:CC | LL | foo(xref); | ^^^^ reborrow through at ALLOC[0x0] is forbidden @@ -7,18 +7,18 @@ LL | foo(xref); = help: this indicates a potential bug in the program: it performed an invalid operation, but the Tree Borrows rules it violated are still experimental = help: the accessed tag has state Disabled which forbids this reborrow (acting as a child read access) help: the accessed tag was created here, in the initial state Frozen - --> $DIR/pass_invalid_shr.rs:LL:CC + --> tests/fail/both_borrows/pass_invalid_shr.rs:LL:CC | LL | let xref = unsafe { &*xraw }; | ^^^^^^ help: the accessed tag later transitioned to Disabled due to a foreign write access at offsets [0x0..0x4] - --> $DIR/pass_invalid_shr.rs:LL:CC + --> tests/fail/both_borrows/pass_invalid_shr.rs:LL:CC | LL | unsafe { *xraw = 42 }; // unfreeze | ^^^^^^^^^^ = help: this transition corresponds to a loss of read permissions = note: BACKTRACE (of the first span): - = note: inside `main` at $DIR/pass_invalid_shr.rs:LL:CC + = note: inside `main` at tests/fail/both_borrows/pass_invalid_shr.rs:LL:CC note: some details are omitted, run with `MIRIFLAGS=-Zmiri-backtrace=full` for a verbose backtrace diff --git a/tests/fail/both_borrows/pass_invalid_shr_option.stack.stderr b/tests/fail/both_borrows/pass_invalid_shr_option.stack.stderr index dfc99ff7cd..5aca026cb7 100644 --- a/tests/fail/both_borrows/pass_invalid_shr_option.stack.stderr +++ b/tests/fail/both_borrows/pass_invalid_shr_option.stack.stderr @@ -1,5 +1,5 @@ error: Undefined Behavior: trying to retag from for SharedReadOnly permission at ALLOC[0x0], but that tag does not exist in the borrow stack for this location - --> $DIR/pass_invalid_shr_option.rs:LL:CC + --> tests/fail/both_borrows/pass_invalid_shr_option.rs:LL:CC | LL | foo(some_xref); | ^^^^^^^^^ @@ -11,17 +11,17 @@ LL | foo(some_xref); = help: this indicates a potential bug in the program: it performed an invalid operation, but the Stacked Borrows rules it violated are still experimental = help: see https://github.com/rust-lang/unsafe-code-guidelines/blob/master/wip/stacked-borrows.md for further information help: was created by a SharedReadOnly retag at offsets [0x0..0x4] - --> $DIR/pass_invalid_shr_option.rs:LL:CC + --> tests/fail/both_borrows/pass_invalid_shr_option.rs:LL:CC | LL | let some_xref = unsafe { Some(&*xraw) }; | ^^^^^^^^^^^^ help: was later invalidated at offsets [0x0..0x4] by a write access - --> $DIR/pass_invalid_shr_option.rs:LL:CC + --> tests/fail/both_borrows/pass_invalid_shr_option.rs:LL:CC | LL | unsafe { *xraw = 42 }; // unfreeze | ^^^^^^^^^^ = note: BACKTRACE (of the first span): - = note: inside `main` at $DIR/pass_invalid_shr_option.rs:LL:CC + = note: inside `main` at tests/fail/both_borrows/pass_invalid_shr_option.rs:LL:CC note: some details are omitted, run with `MIRIFLAGS=-Zmiri-backtrace=full` for a verbose backtrace diff --git a/tests/fail/both_borrows/pass_invalid_shr_option.tree.stderr b/tests/fail/both_borrows/pass_invalid_shr_option.tree.stderr index f687b3f867..de63c9609a 100644 --- a/tests/fail/both_borrows/pass_invalid_shr_option.tree.stderr +++ b/tests/fail/both_borrows/pass_invalid_shr_option.tree.stderr @@ -1,5 +1,5 @@ error: Undefined Behavior: reborrow through at ALLOC[0x0] is forbidden - --> $DIR/pass_invalid_shr_option.rs:LL:CC + --> tests/fail/both_borrows/pass_invalid_shr_option.rs:LL:CC | LL | foo(some_xref); | ^^^^^^^^^ reborrow through at ALLOC[0x0] is forbidden @@ -7,18 +7,18 @@ LL | foo(some_xref); = help: this indicates a potential bug in the program: it performed an invalid operation, but the Tree Borrows rules it violated are still experimental = help: the accessed tag has state Disabled which forbids this reborrow (acting as a child read access) help: the accessed tag was created here, in the initial state Frozen - --> $DIR/pass_invalid_shr_option.rs:LL:CC + --> tests/fail/both_borrows/pass_invalid_shr_option.rs:LL:CC | LL | let some_xref = unsafe { Some(&*xraw) }; | ^^^^^^^^^^^^ help: the accessed tag later transitioned to Disabled due to a foreign write access at offsets [0x0..0x4] - --> $DIR/pass_invalid_shr_option.rs:LL:CC + --> tests/fail/both_borrows/pass_invalid_shr_option.rs:LL:CC | LL | unsafe { *xraw = 42 }; // unfreeze | ^^^^^^^^^^ = help: this transition corresponds to a loss of read permissions = note: BACKTRACE (of the first span): - = note: inside `main` at $DIR/pass_invalid_shr_option.rs:LL:CC + = note: inside `main` at tests/fail/both_borrows/pass_invalid_shr_option.rs:LL:CC note: some details are omitted, run with `MIRIFLAGS=-Zmiri-backtrace=full` for a verbose backtrace diff --git a/tests/fail/both_borrows/pass_invalid_shr_tuple.stack.stderr b/tests/fail/both_borrows/pass_invalid_shr_tuple.stack.stderr index e4ebe22b60..16c2af081a 100644 --- a/tests/fail/both_borrows/pass_invalid_shr_tuple.stack.stderr +++ b/tests/fail/both_borrows/pass_invalid_shr_tuple.stack.stderr @@ -1,5 +1,5 @@ error: Undefined Behavior: trying to retag from for SharedReadOnly permission at ALLOC[0x0], but that tag does not exist in the borrow stack for this location - --> $DIR/pass_invalid_shr_tuple.rs:LL:CC + --> tests/fail/both_borrows/pass_invalid_shr_tuple.rs:LL:CC | LL | foo(pair_xref); | ^^^^^^^^^ @@ -11,17 +11,17 @@ LL | foo(pair_xref); = help: this indicates a potential bug in the program: it performed an invalid operation, but the Stacked Borrows rules it violated are still experimental = help: see https://github.com/rust-lang/unsafe-code-guidelines/blob/master/wip/stacked-borrows.md for further information help: was created by a SharedReadOnly retag at offsets [0x0..0x4] - --> $DIR/pass_invalid_shr_tuple.rs:LL:CC + --> tests/fail/both_borrows/pass_invalid_shr_tuple.rs:LL:CC | LL | let pair_xref = unsafe { (&*xraw0, &*xraw1) }; | ^^^^^^^^^^^^^^^^^^ help: was later invalidated at offsets [0x0..0x4] by a write access - --> $DIR/pass_invalid_shr_tuple.rs:LL:CC + --> tests/fail/both_borrows/pass_invalid_shr_tuple.rs:LL:CC | LL | unsafe { *xraw0 = 42 }; // unfreeze | ^^^^^^^^^^^ = note: BACKTRACE (of the first span): - = note: inside `main` at $DIR/pass_invalid_shr_tuple.rs:LL:CC + = note: inside `main` at tests/fail/both_borrows/pass_invalid_shr_tuple.rs:LL:CC note: some details are omitted, run with `MIRIFLAGS=-Zmiri-backtrace=full` for a verbose backtrace diff --git a/tests/fail/both_borrows/pass_invalid_shr_tuple.tree.stderr b/tests/fail/both_borrows/pass_invalid_shr_tuple.tree.stderr index 845838f93d..d2a727a920 100644 --- a/tests/fail/both_borrows/pass_invalid_shr_tuple.tree.stderr +++ b/tests/fail/both_borrows/pass_invalid_shr_tuple.tree.stderr @@ -1,5 +1,5 @@ error: Undefined Behavior: reborrow through at ALLOC[0x0] is forbidden - --> $DIR/pass_invalid_shr_tuple.rs:LL:CC + --> tests/fail/both_borrows/pass_invalid_shr_tuple.rs:LL:CC | LL | foo(pair_xref); | ^^^^^^^^^ reborrow through at ALLOC[0x0] is forbidden @@ -7,18 +7,18 @@ LL | foo(pair_xref); = help: this indicates a potential bug in the program: it performed an invalid operation, but the Tree Borrows rules it violated are still experimental = help: the accessed tag has state Disabled which forbids this reborrow (acting as a child read access) help: the accessed tag was created here, in the initial state Frozen - --> $DIR/pass_invalid_shr_tuple.rs:LL:CC + --> tests/fail/both_borrows/pass_invalid_shr_tuple.rs:LL:CC | LL | let pair_xref = unsafe { (&*xraw0, &*xraw1) }; | ^^^^^^^^^^^^^^^^^^ help: the accessed tag later transitioned to Disabled due to a foreign write access at offsets [0x0..0x4] - --> $DIR/pass_invalid_shr_tuple.rs:LL:CC + --> tests/fail/both_borrows/pass_invalid_shr_tuple.rs:LL:CC | LL | unsafe { *xraw0 = 42 }; // unfreeze | ^^^^^^^^^^^ = help: this transition corresponds to a loss of read permissions = note: BACKTRACE (of the first span): - = note: inside `main` at $DIR/pass_invalid_shr_tuple.rs:LL:CC + = note: inside `main` at tests/fail/both_borrows/pass_invalid_shr_tuple.rs:LL:CC note: some details are omitted, run with `MIRIFLAGS=-Zmiri-backtrace=full` for a verbose backtrace diff --git a/tests/fail/both_borrows/retag_data_race_write.stack.stderr b/tests/fail/both_borrows/retag_data_race_write.stack.stderr index 6f4b52fb88..6bc66f2419 100644 --- a/tests/fail/both_borrows/retag_data_race_write.stack.stderr +++ b/tests/fail/both_borrows/retag_data_race_write.stack.stderr @@ -1,11 +1,11 @@ error: Undefined Behavior: Data race detected between (1) retag write on thread `unnamed-ID` and (2) non-atomic write on thread `unnamed-ID` at ALLOC. (2) just happened here - --> $DIR/retag_data_race_write.rs:LL:CC + --> tests/fail/both_borrows/retag_data_race_write.rs:LL:CC | LL | *p = 5; | ^^^^^^ Data race detected between (1) retag write on thread `unnamed-ID` and (2) non-atomic write on thread `unnamed-ID` at ALLOC. (2) just happened here | help: and (1) occurred earlier here - --> $DIR/retag_data_race_write.rs:LL:CC + --> tests/fail/both_borrows/retag_data_race_write.rs:LL:CC | LL | let _r = &mut *p; | ^^^^^^^ @@ -15,9 +15,9 @@ LL | let _r = &mut *p; = 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 = note: BACKTRACE (of the first span) on thread `unnamed-ID`: - = note: inside `thread_2` at $DIR/retag_data_race_write.rs:LL:CC + = note: inside `thread_2` at tests/fail/both_borrows/retag_data_race_write.rs:LL:CC note: inside closure - --> $DIR/retag_data_race_write.rs:LL:CC + --> tests/fail/both_borrows/retag_data_race_write.rs:LL:CC | LL | let t2 = std::thread::spawn(move || thread_2(p)); | ^^^^^^^^^^^ diff --git a/tests/fail/both_borrows/retag_data_race_write.tree.stderr b/tests/fail/both_borrows/retag_data_race_write.tree.stderr index fa0012f9b2..510e592539 100644 --- a/tests/fail/both_borrows/retag_data_race_write.tree.stderr +++ b/tests/fail/both_borrows/retag_data_race_write.tree.stderr @@ -1,11 +1,11 @@ error: Undefined Behavior: Data race detected between (1) retag read on thread `unnamed-ID` and (2) non-atomic write on thread `unnamed-ID` at ALLOC. (2) just happened here - --> $DIR/retag_data_race_write.rs:LL:CC + --> tests/fail/both_borrows/retag_data_race_write.rs:LL:CC | LL | *p = 5; | ^^^^^^ Data race detected between (1) retag read on thread `unnamed-ID` and (2) non-atomic write on thread `unnamed-ID` at ALLOC. (2) just happened here | help: and (1) occurred earlier here - --> $DIR/retag_data_race_write.rs:LL:CC + --> tests/fail/both_borrows/retag_data_race_write.rs:LL:CC | LL | let _r = &mut *p; | ^^^^^^^ @@ -15,9 +15,9 @@ LL | let _r = &mut *p; = 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 = note: BACKTRACE (of the first span) on thread `unnamed-ID`: - = note: inside `thread_2` at $DIR/retag_data_race_write.rs:LL:CC + = note: inside `thread_2` at tests/fail/both_borrows/retag_data_race_write.rs:LL:CC note: inside closure - --> $DIR/retag_data_race_write.rs:LL:CC + --> tests/fail/both_borrows/retag_data_race_write.rs:LL:CC | LL | let t2 = std::thread::spawn(move || thread_2(p)); | ^^^^^^^^^^^ diff --git a/tests/fail/both_borrows/return_invalid_shr.stack.stderr b/tests/fail/both_borrows/return_invalid_shr.stack.stderr index 858afa6fb3..0ac3ed9db3 100644 --- a/tests/fail/both_borrows/return_invalid_shr.stack.stderr +++ b/tests/fail/both_borrows/return_invalid_shr.stack.stderr @@ -1,5 +1,5 @@ error: Undefined Behavior: trying to retag from for SharedReadOnly permission at ALLOC[0x4], but that tag does not exist in the borrow stack for this location - --> $DIR/return_invalid_shr.rs:LL:CC + --> tests/fail/both_borrows/return_invalid_shr.rs:LL:CC | LL | ret | ^^^ @@ -10,19 +10,19 @@ LL | ret = help: this indicates a potential bug in the program: it performed an invalid operation, but the Stacked Borrows rules it violated are still experimental = help: see https://github.com/rust-lang/unsafe-code-guidelines/blob/master/wip/stacked-borrows.md for further information help: was created by a SharedReadOnly retag at offsets [0x4..0x8] - --> $DIR/return_invalid_shr.rs:LL:CC + --> tests/fail/both_borrows/return_invalid_shr.rs:LL:CC | LL | let ret = unsafe { &(*xraw).1 }; | ^^^^^^^^^^ help: was later invalidated at offsets [0x0..0x8] by a write access - --> $DIR/return_invalid_shr.rs:LL:CC + --> tests/fail/both_borrows/return_invalid_shr.rs:LL:CC | LL | unsafe { *xraw = (42, 23) }; // unfreeze | ^^^^^^^^^^^^^^^^ = note: BACKTRACE (of the first span): - = note: inside `foo` at $DIR/return_invalid_shr.rs:LL:CC + = note: inside `foo` at tests/fail/both_borrows/return_invalid_shr.rs:LL:CC note: inside `main` - --> $DIR/return_invalid_shr.rs:LL:CC + --> tests/fail/both_borrows/return_invalid_shr.rs:LL:CC | LL | foo(&mut (1, 2)); | ^^^^^^^^^^^^^^^^ diff --git a/tests/fail/both_borrows/return_invalid_shr.tree.stderr b/tests/fail/both_borrows/return_invalid_shr.tree.stderr index 0d19681f63..cc51f4c77e 100644 --- a/tests/fail/both_borrows/return_invalid_shr.tree.stderr +++ b/tests/fail/both_borrows/return_invalid_shr.tree.stderr @@ -1,5 +1,5 @@ error: Undefined Behavior: reborrow through at ALLOC[0x4] is forbidden - --> $DIR/return_invalid_shr.rs:LL:CC + --> tests/fail/both_borrows/return_invalid_shr.rs:LL:CC | LL | ret | ^^^ reborrow through at ALLOC[0x4] is forbidden @@ -7,20 +7,20 @@ LL | ret = help: this indicates a potential bug in the program: it performed an invalid operation, but the Tree Borrows rules it violated are still experimental = help: the accessed tag has state Disabled which forbids this reborrow (acting as a child read access) help: the accessed tag was created here, in the initial state Frozen - --> $DIR/return_invalid_shr.rs:LL:CC + --> tests/fail/both_borrows/return_invalid_shr.rs:LL:CC | LL | let ret = unsafe { &(*xraw).1 }; | ^^^^^^^^^^ help: the accessed tag later transitioned to Disabled due to a foreign write access at offsets [0x0..0x8] - --> $DIR/return_invalid_shr.rs:LL:CC + --> tests/fail/both_borrows/return_invalid_shr.rs:LL:CC | LL | unsafe { *xraw = (42, 23) }; // unfreeze | ^^^^^^^^^^^^^^^^ = help: this transition corresponds to a loss of read permissions = note: BACKTRACE (of the first span): - = note: inside `foo` at $DIR/return_invalid_shr.rs:LL:CC + = note: inside `foo` at tests/fail/both_borrows/return_invalid_shr.rs:LL:CC note: inside `main` - --> $DIR/return_invalid_shr.rs:LL:CC + --> tests/fail/both_borrows/return_invalid_shr.rs:LL:CC | LL | foo(&mut (1, 2)); | ^^^^^^^^^^^^^^^^ diff --git a/tests/fail/both_borrows/return_invalid_shr_option.stack.stderr b/tests/fail/both_borrows/return_invalid_shr_option.stack.stderr index ab67bb516f..d8e0f52ff0 100644 --- a/tests/fail/both_borrows/return_invalid_shr_option.stack.stderr +++ b/tests/fail/both_borrows/return_invalid_shr_option.stack.stderr @@ -1,5 +1,5 @@ error: Undefined Behavior: trying to retag from for SharedReadOnly permission at ALLOC[0x4], but that tag does not exist in the borrow stack for this location - --> $DIR/return_invalid_shr_option.rs:LL:CC + --> tests/fail/both_borrows/return_invalid_shr_option.rs:LL:CC | LL | ret | ^^^ @@ -11,19 +11,19 @@ LL | ret = help: this indicates a potential bug in the program: it performed an invalid operation, but the Stacked Borrows rules it violated are still experimental = help: see https://github.com/rust-lang/unsafe-code-guidelines/blob/master/wip/stacked-borrows.md for further information help: was created by a SharedReadOnly retag at offsets [0x4..0x8] - --> $DIR/return_invalid_shr_option.rs:LL:CC + --> tests/fail/both_borrows/return_invalid_shr_option.rs:LL:CC | LL | let ret = Some(unsafe { &(*xraw).1 }); | ^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: was later invalidated at offsets [0x0..0x8] by a write access - --> $DIR/return_invalid_shr_option.rs:LL:CC + --> tests/fail/both_borrows/return_invalid_shr_option.rs:LL:CC | LL | unsafe { *xraw = (42, 23) }; // unfreeze | ^^^^^^^^^^^^^^^^ = note: BACKTRACE (of the first span): - = note: inside `foo` at $DIR/return_invalid_shr_option.rs:LL:CC + = note: inside `foo` at tests/fail/both_borrows/return_invalid_shr_option.rs:LL:CC note: inside `main` - --> $DIR/return_invalid_shr_option.rs:LL:CC + --> tests/fail/both_borrows/return_invalid_shr_option.rs:LL:CC | LL | match foo(&mut (1, 2)) { | ^^^^^^^^^^^^^^^^ diff --git a/tests/fail/both_borrows/return_invalid_shr_option.tree.stderr b/tests/fail/both_borrows/return_invalid_shr_option.tree.stderr index e770372925..7a7d8f20fa 100644 --- a/tests/fail/both_borrows/return_invalid_shr_option.tree.stderr +++ b/tests/fail/both_borrows/return_invalid_shr_option.tree.stderr @@ -1,5 +1,5 @@ error: Undefined Behavior: reborrow through at ALLOC[0x4] is forbidden - --> $DIR/return_invalid_shr_option.rs:LL:CC + --> tests/fail/both_borrows/return_invalid_shr_option.rs:LL:CC | LL | ret | ^^^ reborrow through at ALLOC[0x4] is forbidden @@ -7,20 +7,20 @@ LL | ret = help: this indicates a potential bug in the program: it performed an invalid operation, but the Tree Borrows rules it violated are still experimental = help: the accessed tag has state Disabled which forbids this reborrow (acting as a child read access) help: the accessed tag was created here, in the initial state Frozen - --> $DIR/return_invalid_shr_option.rs:LL:CC + --> tests/fail/both_borrows/return_invalid_shr_option.rs:LL:CC | LL | let ret = Some(unsafe { &(*xraw).1 }); | ^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: the accessed tag later transitioned to Disabled due to a foreign write access at offsets [0x0..0x8] - --> $DIR/return_invalid_shr_option.rs:LL:CC + --> tests/fail/both_borrows/return_invalid_shr_option.rs:LL:CC | LL | unsafe { *xraw = (42, 23) }; // unfreeze | ^^^^^^^^^^^^^^^^ = help: this transition corresponds to a loss of read permissions = note: BACKTRACE (of the first span): - = note: inside `foo` at $DIR/return_invalid_shr_option.rs:LL:CC + = note: inside `foo` at tests/fail/both_borrows/return_invalid_shr_option.rs:LL:CC note: inside `main` - --> $DIR/return_invalid_shr_option.rs:LL:CC + --> tests/fail/both_borrows/return_invalid_shr_option.rs:LL:CC | LL | match foo(&mut (1, 2)) { | ^^^^^^^^^^^^^^^^ diff --git a/tests/fail/both_borrows/return_invalid_shr_tuple.stack.stderr b/tests/fail/both_borrows/return_invalid_shr_tuple.stack.stderr index 22a55f0d37..38b8758964 100644 --- a/tests/fail/both_borrows/return_invalid_shr_tuple.stack.stderr +++ b/tests/fail/both_borrows/return_invalid_shr_tuple.stack.stderr @@ -1,5 +1,5 @@ error: Undefined Behavior: trying to retag from for SharedReadOnly permission at ALLOC[0x4], but that tag does not exist in the borrow stack for this location - --> $DIR/return_invalid_shr_tuple.rs:LL:CC + --> tests/fail/both_borrows/return_invalid_shr_tuple.rs:LL:CC | LL | ret | ^^^ @@ -11,19 +11,19 @@ LL | ret = help: this indicates a potential bug in the program: it performed an invalid operation, but the Stacked Borrows rules it violated are still experimental = help: see https://github.com/rust-lang/unsafe-code-guidelines/blob/master/wip/stacked-borrows.md for further information help: was created by a SharedReadOnly retag at offsets [0x4..0x8] - --> $DIR/return_invalid_shr_tuple.rs:LL:CC + --> tests/fail/both_borrows/return_invalid_shr_tuple.rs:LL:CC | LL | let ret = (unsafe { &(*xraw).1 },); | ^^^^^^^^^^^^^^^^^^^^^^^^ help: was later invalidated at offsets [0x0..0x8] by a write access - --> $DIR/return_invalid_shr_tuple.rs:LL:CC + --> tests/fail/both_borrows/return_invalid_shr_tuple.rs:LL:CC | LL | unsafe { *xraw = (42, 23) }; // unfreeze | ^^^^^^^^^^^^^^^^ = note: BACKTRACE (of the first span): - = note: inside `foo` at $DIR/return_invalid_shr_tuple.rs:LL:CC + = note: inside `foo` at tests/fail/both_borrows/return_invalid_shr_tuple.rs:LL:CC note: inside `main` - --> $DIR/return_invalid_shr_tuple.rs:LL:CC + --> tests/fail/both_borrows/return_invalid_shr_tuple.rs:LL:CC | LL | foo(&mut (1, 2)).0; | ^^^^^^^^^^^^^^^^ diff --git a/tests/fail/both_borrows/return_invalid_shr_tuple.tree.stderr b/tests/fail/both_borrows/return_invalid_shr_tuple.tree.stderr index a5c6be3f13..57b4f5fbe2 100644 --- a/tests/fail/both_borrows/return_invalid_shr_tuple.tree.stderr +++ b/tests/fail/both_borrows/return_invalid_shr_tuple.tree.stderr @@ -1,5 +1,5 @@ error: Undefined Behavior: reborrow through at ALLOC[0x4] is forbidden - --> $DIR/return_invalid_shr_tuple.rs:LL:CC + --> tests/fail/both_borrows/return_invalid_shr_tuple.rs:LL:CC | LL | ret | ^^^ reborrow through at ALLOC[0x4] is forbidden @@ -7,20 +7,20 @@ LL | ret = help: this indicates a potential bug in the program: it performed an invalid operation, but the Tree Borrows rules it violated are still experimental = help: the accessed tag has state Disabled which forbids this reborrow (acting as a child read access) help: the accessed tag was created here, in the initial state Frozen - --> $DIR/return_invalid_shr_tuple.rs:LL:CC + --> tests/fail/both_borrows/return_invalid_shr_tuple.rs:LL:CC | LL | let ret = (unsafe { &(*xraw).1 },); | ^^^^^^^^^^^^^^^^^^^^^^^^ help: the accessed tag later transitioned to Disabled due to a foreign write access at offsets [0x0..0x8] - --> $DIR/return_invalid_shr_tuple.rs:LL:CC + --> tests/fail/both_borrows/return_invalid_shr_tuple.rs:LL:CC | LL | unsafe { *xraw = (42, 23) }; // unfreeze | ^^^^^^^^^^^^^^^^ = help: this transition corresponds to a loss of read permissions = note: BACKTRACE (of the first span): - = note: inside `foo` at $DIR/return_invalid_shr_tuple.rs:LL:CC + = note: inside `foo` at tests/fail/both_borrows/return_invalid_shr_tuple.rs:LL:CC note: inside `main` - --> $DIR/return_invalid_shr_tuple.rs:LL:CC + --> tests/fail/both_borrows/return_invalid_shr_tuple.rs:LL:CC | LL | foo(&mut (1, 2)).0; | ^^^^^^^^^^^^^^^^ diff --git a/tests/fail/both_borrows/shr_frozen_violation1.stack.stderr b/tests/fail/both_borrows/shr_frozen_violation1.stack.stderr index 52ac2184d4..22efda1efa 100644 --- a/tests/fail/both_borrows/shr_frozen_violation1.stack.stderr +++ b/tests/fail/both_borrows/shr_frozen_violation1.stack.stderr @@ -1,5 +1,5 @@ error: Undefined Behavior: attempting a write access using at ALLOC[0x0], but that tag only grants SharedReadOnly permission for this location - --> $DIR/shr_frozen_violation1.rs:LL:CC + --> tests/fail/both_borrows/shr_frozen_violation1.rs:LL:CC | LL | *(x as *const i32 as *mut i32) = 7; | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ @@ -10,19 +10,19 @@ LL | *(x as *const i32 as *mut i32) = 7; = help: this indicates a potential bug in the program: it performed an invalid operation, but the Stacked Borrows rules it violated are still experimental = help: see https://github.com/rust-lang/unsafe-code-guidelines/blob/master/wip/stacked-borrows.md for further information help: was created by a SharedReadOnly retag at offsets [0x0..0x4] - --> $DIR/shr_frozen_violation1.rs:LL:CC + --> tests/fail/both_borrows/shr_frozen_violation1.rs:LL:CC | LL | *(x as *const i32 as *mut i32) = 7; | ^ = note: BACKTRACE (of the first span): - = note: inside `unknown_code` at $DIR/shr_frozen_violation1.rs:LL:CC + = note: inside `unknown_code` at tests/fail/both_borrows/shr_frozen_violation1.rs:LL:CC note: inside `foo` - --> $DIR/shr_frozen_violation1.rs:LL:CC + --> tests/fail/both_borrows/shr_frozen_violation1.rs:LL:CC | LL | unknown_code(&*x); | ^^^^^^^^^^^^^^^^^ note: inside `main` - --> $DIR/shr_frozen_violation1.rs:LL:CC + --> tests/fail/both_borrows/shr_frozen_violation1.rs:LL:CC | LL | println!("{}", foo(&mut 0)); | ^^^^^^^^^^^ diff --git a/tests/fail/both_borrows/shr_frozen_violation1.tree.stderr b/tests/fail/both_borrows/shr_frozen_violation1.tree.stderr index 45b3bceb72..2e544583cb 100644 --- a/tests/fail/both_borrows/shr_frozen_violation1.tree.stderr +++ b/tests/fail/both_borrows/shr_frozen_violation1.tree.stderr @@ -1,5 +1,5 @@ error: Undefined Behavior: write access through at ALLOC[0x0] is forbidden - --> $DIR/shr_frozen_violation1.rs:LL:CC + --> tests/fail/both_borrows/shr_frozen_violation1.rs:LL:CC | LL | *(x as *const i32 as *mut i32) = 7; | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ write access through at ALLOC[0x0] is forbidden @@ -7,19 +7,19 @@ LL | *(x as *const i32 as *mut i32) = 7; = help: this indicates a potential bug in the program: it performed an invalid operation, but the Tree Borrows rules it violated are still experimental = help: the accessed tag has state Frozen which forbids this child write access help: the accessed tag was created here, in the initial state Frozen - --> $DIR/shr_frozen_violation1.rs:LL:CC + --> tests/fail/both_borrows/shr_frozen_violation1.rs:LL:CC | LL | fn unknown_code(x: &i32) { | ^ = note: BACKTRACE (of the first span): - = note: inside `unknown_code` at $DIR/shr_frozen_violation1.rs:LL:CC + = note: inside `unknown_code` at tests/fail/both_borrows/shr_frozen_violation1.rs:LL:CC note: inside `foo` - --> $DIR/shr_frozen_violation1.rs:LL:CC + --> tests/fail/both_borrows/shr_frozen_violation1.rs:LL:CC | LL | unknown_code(&*x); | ^^^^^^^^^^^^^^^^^ note: inside `main` - --> $DIR/shr_frozen_violation1.rs:LL:CC + --> tests/fail/both_borrows/shr_frozen_violation1.rs:LL:CC | LL | println!("{}", foo(&mut 0)); | ^^^^^^^^^^^ diff --git a/tests/fail/both_borrows/shr_frozen_violation2.stack.stderr b/tests/fail/both_borrows/shr_frozen_violation2.stack.stderr index e05ffb3d35..7e6d057a4b 100644 --- a/tests/fail/both_borrows/shr_frozen_violation2.stack.stderr +++ b/tests/fail/both_borrows/shr_frozen_violation2.stack.stderr @@ -1,5 +1,5 @@ error: Undefined Behavior: attempting a read access using at ALLOC[0x0], but that tag does not exist in the borrow stack for this location - --> $DIR/shr_frozen_violation2.rs:LL:CC + --> tests/fail/both_borrows/shr_frozen_violation2.rs:LL:CC | LL | let _val = *frozen; | ^^^^^^^ @@ -10,17 +10,17 @@ LL | let _val = *frozen; = help: this indicates a potential bug in the program: it performed an invalid operation, but the Stacked Borrows rules it violated are still experimental = help: see https://github.com/rust-lang/unsafe-code-guidelines/blob/master/wip/stacked-borrows.md for further information help: was created by a SharedReadOnly retag at offsets [0x0..0x4] - --> $DIR/shr_frozen_violation2.rs:LL:CC + --> tests/fail/both_borrows/shr_frozen_violation2.rs:LL:CC | LL | let frozen = &*ptr; | ^^^^^ help: was later invalidated at offsets [0x0..0x4] by a write access - --> $DIR/shr_frozen_violation2.rs:LL:CC + --> tests/fail/both_borrows/shr_frozen_violation2.rs:LL:CC | LL | x = 1; | ^^^^^ = note: BACKTRACE (of the first span): - = note: inside `main` at $DIR/shr_frozen_violation2.rs:LL:CC + = note: inside `main` at tests/fail/both_borrows/shr_frozen_violation2.rs:LL:CC note: some details are omitted, run with `MIRIFLAGS=-Zmiri-backtrace=full` for a verbose backtrace diff --git a/tests/fail/both_borrows/shr_frozen_violation2.tree.stderr b/tests/fail/both_borrows/shr_frozen_violation2.tree.stderr index 96c2e39edd..17c4542e19 100644 --- a/tests/fail/both_borrows/shr_frozen_violation2.tree.stderr +++ b/tests/fail/both_borrows/shr_frozen_violation2.tree.stderr @@ -1,5 +1,5 @@ error: Undefined Behavior: read access through at ALLOC[0x0] is forbidden - --> $DIR/shr_frozen_violation2.rs:LL:CC + --> tests/fail/both_borrows/shr_frozen_violation2.rs:LL:CC | LL | let _val = *frozen; | ^^^^^^^ read access through at ALLOC[0x0] is forbidden @@ -7,18 +7,18 @@ LL | let _val = *frozen; = help: this indicates a potential bug in the program: it performed an invalid operation, but the Tree Borrows rules it violated are still experimental = help: the accessed tag has state Disabled which forbids this child read access help: the accessed tag was created here, in the initial state Frozen - --> $DIR/shr_frozen_violation2.rs:LL:CC + --> tests/fail/both_borrows/shr_frozen_violation2.rs:LL:CC | LL | let frozen = &*ptr; | ^^^^^ help: the accessed tag later transitioned to Disabled due to a foreign write access at offsets [0x0..0x4] - --> $DIR/shr_frozen_violation2.rs:LL:CC + --> tests/fail/both_borrows/shr_frozen_violation2.rs:LL:CC | LL | x = 1; | ^^^^^ = help: this transition corresponds to a loss of read permissions = note: BACKTRACE (of the first span): - = note: inside `main` at $DIR/shr_frozen_violation2.rs:LL:CC + = note: inside `main` at tests/fail/both_borrows/shr_frozen_violation2.rs:LL:CC note: some details are omitted, run with `MIRIFLAGS=-Zmiri-backtrace=full` for a verbose backtrace diff --git a/tests/fail/both_borrows/zero-sized-protected.stack.stderr b/tests/fail/both_borrows/zero-sized-protected.stack.stderr index 672682ff29..c01fa2a86c 100644 --- a/tests/fail/both_borrows/zero-sized-protected.stack.stderr +++ b/tests/fail/both_borrows/zero-sized-protected.stack.stderr @@ -1,5 +1,5 @@ error: Undefined Behavior: entering unreachable code - --> $DIR/zero-sized-protected.rs:LL:CC + --> tests/fail/both_borrows/zero-sized-protected.rs:LL:CC | LL | unsafe { std::hint::unreachable_unchecked() }; | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ entering unreachable code @@ -7,7 +7,7 @@ LL | unsafe { std::hint::unreachable_unchecked() }; = 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 = note: BACKTRACE: - = note: inside `main` at $DIR/zero-sized-protected.rs:LL:CC + = note: inside `main` at tests/fail/both_borrows/zero-sized-protected.rs:LL:CC note: some details are omitted, run with `MIRIFLAGS=-Zmiri-backtrace=full` for a verbose backtrace diff --git a/tests/fail/both_borrows/zero-sized-protected.tree.stderr b/tests/fail/both_borrows/zero-sized-protected.tree.stderr index ef981038e5..d9894dc4b7 100644 --- a/tests/fail/both_borrows/zero-sized-protected.tree.stderr +++ b/tests/fail/both_borrows/zero-sized-protected.tree.stderr @@ -8,24 +8,24 @@ LL | unsafe { __rust_dealloc(ptr, layout.size(), layout.align()) } = help: the allocation of the accessed tag (root of the allocation) also contains the strongly protected tag = help: the strongly protected tag disallows deallocations help: the accessed tag was created here - --> $DIR/zero-sized-protected.rs:LL:CC + --> tests/fail/both_borrows/zero-sized-protected.rs:LL:CC | LL | let ptr = unsafe { alloc(l) }; | ^^^^^^^^ help: the strongly protected tag was created here, in the initial state Reserved - --> $DIR/zero-sized-protected.rs:LL:CC + --> tests/fail/both_borrows/zero-sized-protected.rs:LL:CC | LL | fn test(_x: &mut (), ptr: *mut u8, l: Layout) { | ^^ = note: BACKTRACE (of the first span): = note: inside `std::alloc::dealloc` at RUSTLIB/alloc/src/alloc.rs:LL:CC note: inside `test` - --> $DIR/zero-sized-protected.rs:LL:CC + --> tests/fail/both_borrows/zero-sized-protected.rs:LL:CC | LL | unsafe { dealloc(ptr, l) }; | ^^^^^^^^^^^^^^^ note: inside `main` - --> $DIR/zero-sized-protected.rs:LL:CC + --> tests/fail/both_borrows/zero-sized-protected.rs:LL:CC | LL | unsafe { test(&mut *ptr.cast::<()>(), ptr, l) }; | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ diff --git a/tests/fail/box-cell-alias.stderr b/tests/fail/box-cell-alias.stderr index 697cee52d1..f9cc6003dc 100644 --- a/tests/fail/box-cell-alias.stderr +++ b/tests/fail/box-cell-alias.stderr @@ -1,5 +1,5 @@ error: Undefined Behavior: trying to retag from for SharedReadWrite permission at ALLOC[0x0], but that tag does not exist in the borrow stack for this location - --> $DIR/box-cell-alias.rs:LL:CC + --> tests/fail/box-cell-alias.rs:LL:CC | LL | unsafe { (*ptr).set(20) }; | ^^^^^^ @@ -10,19 +10,19 @@ LL | unsafe { (*ptr).set(20) }; = help: this indicates a potential bug in the program: it performed an invalid operation, but the Stacked Borrows rules it violated are still experimental = help: see https://github.com/rust-lang/unsafe-code-guidelines/blob/master/wip/stacked-borrows.md for further information help: was created by a SharedReadWrite retag at offsets [0x0..0x1] - --> $DIR/box-cell-alias.rs:LL:CC + --> tests/fail/box-cell-alias.rs:LL:CC | LL | let ptr: *const Cell = &*val; | ^^^^^ help: was later invalidated at offsets [0x0..0x1] by a Unique retag - --> $DIR/box-cell-alias.rs:LL:CC + --> tests/fail/box-cell-alias.rs:LL:CC | LL | let res = helper(val, ptr); | ^^^ = note: BACKTRACE (of the first span): - = note: inside `helper` at $DIR/box-cell-alias.rs:LL:CC + = note: inside `helper` at tests/fail/box-cell-alias.rs:LL:CC note: inside `main` - --> $DIR/box-cell-alias.rs:LL:CC + --> tests/fail/box-cell-alias.rs:LL:CC | LL | let res = helper(val, ptr); | ^^^^^^^^^^^^^^^^ diff --git a/tests/fail/branchless-select-i128-pointer.stderr b/tests/fail/branchless-select-i128-pointer.stderr index 655e682636..d9de23dc91 100644 --- a/tests/fail/branchless-select-i128-pointer.stderr +++ b/tests/fail/branchless-select-i128-pointer.stderr @@ -1,5 +1,5 @@ error: Undefined Behavior: constructing invalid value: encountered a dangling reference ($HEX[noalloc] has no provenance) - --> $DIR/branchless-select-i128-pointer.rs:LL:CC + --> tests/fail/branchless-select-i128-pointer.rs:LL:CC | LL | / transmute::<_, &str>( LL | | @@ -11,7 +11,7 @@ LL | | ) = 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 = note: BACKTRACE: - = note: inside `main` at $DIR/branchless-select-i128-pointer.rs:LL:CC + = note: inside `main` at tests/fail/branchless-select-i128-pointer.rs:LL:CC note: some details are omitted, run with `MIRIFLAGS=-Zmiri-backtrace=full` for a verbose backtrace diff --git a/tests/fail/breakpoint.stderr b/tests/fail/breakpoint.stderr index a5666d52a2..ca98e81f1f 100644 --- a/tests/fail/breakpoint.stderr +++ b/tests/fail/breakpoint.stderr @@ -1,11 +1,11 @@ error: abnormal termination: trace/breakpoint trap - --> $DIR/breakpoint.rs:LL:CC + --> tests/fail/breakpoint.rs:LL:CC | LL | core::intrinsics::breakpoint() | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ trace/breakpoint trap | = note: BACKTRACE: - = note: inside `main` at $DIR/breakpoint.rs:LL:CC + = note: inside `main` at tests/fail/breakpoint.rs:LL:CC note: some details are omitted, run with `MIRIFLAGS=-Zmiri-backtrace=full` for a verbose backtrace diff --git a/tests/fail/concurrency/read_only_atomic_cmpxchg.stderr b/tests/fail/concurrency/read_only_atomic_cmpxchg.stderr index f3e1796f3c..62ade0a679 100644 --- a/tests/fail/concurrency/read_only_atomic_cmpxchg.stderr +++ b/tests/fail/concurrency/read_only_atomic_cmpxchg.stderr @@ -1,6 +1,6 @@ error: Undefined Behavior: atomic store and read-modify-write operations cannot be performed on read-only memory see for more information - --> $DIR/read_only_atomic_cmpxchg.rs:LL:CC + --> tests/fail/concurrency/read_only_atomic_cmpxchg.rs:LL:CC | LL | x.compare_exchange(1, 2, Ordering::Relaxed, Ordering::Relaxed).unwrap_err(); | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ atomic store and read-modify-write operations cannot be performed on read-only memory @@ -9,7 +9,7 @@ see for more information - --> $DIR/read_only_atomic_load_acquire.rs:LL:CC + --> tests/fail/concurrency/read_only_atomic_load_acquire.rs:LL:CC | LL | x.load(Ordering::Acquire); | ^^^^^^^^^^^^^^^^^^^^^^^^^ non-relaxed atomic load operations cannot be performed on read-only memory @@ -11,7 +11,7 @@ see for more information - --> $DIR/read_only_atomic_load_large.rs:LL:CC + --> tests/fail/concurrency/read_only_atomic_load_large.rs:LL:CC | LL | x.load(Ordering::Relaxed); | ^^^^^^^^^^^^^^^^^^^^^^^^^ large atomic load operations cannot be performed on read-only memory @@ -11,7 +11,7 @@ see $DIR/const-ub-checks.rs:LL:CC + --> tests/fail/const-ub-checks.rs:LL:CC | LL | ptr.read(); | ^^^^^^^^^^ accessing memory based on pointer with alignment ALIGN, but alignment ALIGN is required note: erroneous constant encountered - --> $DIR/const-ub-checks.rs:LL:CC + --> tests/fail/const-ub-checks.rs:LL:CC | LL | let _x = UNALIGNED_READ; | ^^^^^^^^^^^^^^ note: erroneous constant encountered - --> $DIR/const-ub-checks.rs:LL:CC + --> tests/fail/const-ub-checks.rs:LL:CC | LL | let _x = UNALIGNED_READ; | ^^^^^^^^^^^^^^ diff --git a/tests/fail/coroutine-pinned-moved.stderr b/tests/fail/coroutine-pinned-moved.stderr index b5b0cbb04e..c2c6ce987e 100644 --- a/tests/fail/coroutine-pinned-moved.stderr +++ b/tests/fail/coroutine-pinned-moved.stderr @@ -1,5 +1,5 @@ error: Undefined Behavior: memory access failed: ALLOC has been freed, so this pointer is dangling - --> $DIR/coroutine-pinned-moved.rs:LL:CC + --> tests/fail/coroutine-pinned-moved.rs:LL:CC | LL | *num += 1; | ^^^^^^^^^ memory access failed: ALLOC has been freed, so this pointer is dangling @@ -7,25 +7,25 @@ LL | *num += 1; = 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 help: ALLOC was allocated here: - --> $DIR/coroutine-pinned-moved.rs:LL:CC + --> tests/fail/coroutine-pinned-moved.rs:LL:CC | LL | let mut coroutine_iterator = Box::new(CoroutineIteratorAdapter(firstn())); | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: ALLOC was deallocated here: - --> $DIR/coroutine-pinned-moved.rs:LL:CC + --> tests/fail/coroutine-pinned-moved.rs:LL:CC | LL | }; // *deallocate* coroutine_iterator | ^ = note: BACKTRACE (of the first span): - = note: inside closure at $DIR/coroutine-pinned-moved.rs:LL:CC -note: inside ` as std::iter::Iterator>::next` - --> $DIR/coroutine-pinned-moved.rs:LL:CC + = note: inside closure at tests/fail/coroutine-pinned-moved.rs:LL:CC +note: inside ` as std::iter::Iterator>::next` + --> tests/fail/coroutine-pinned-moved.rs:LL:CC | LL | match me.resume(()) { | ^^^^^^^^^^^^^ - = note: inside `> as std::iter::Iterator>::next` at RUSTLIB/alloc/src/boxed.rs:LL:CC + = note: inside `> as std::iter::Iterator>::next` at RUSTLIB/alloc/src/boxed.rs:LL:CC note: inside `main` - --> $DIR/coroutine-pinned-moved.rs:LL:CC + --> tests/fail/coroutine-pinned-moved.rs:LL:CC | LL | coroutine_iterator_2.next(); // and use moved value | ^^^^^^^^^^^^^^^^^^^^^^^^^^^ diff --git a/tests/fail/dangling_pointers/dangling_pointer_deref.stderr b/tests/fail/dangling_pointers/dangling_pointer_deref.stderr index d7fa84e0ca..7613552b4b 100644 --- a/tests/fail/dangling_pointers/dangling_pointer_deref.stderr +++ b/tests/fail/dangling_pointers/dangling_pointer_deref.stderr @@ -1,5 +1,5 @@ error: Undefined Behavior: memory access failed: ALLOC has been freed, so this pointer is dangling - --> $DIR/dangling_pointer_deref.rs:LL:CC + --> tests/fail/dangling_pointers/dangling_pointer_deref.rs:LL:CC | LL | let x = unsafe { *p }; | ^^ memory access failed: ALLOC has been freed, so this pointer is dangling @@ -7,17 +7,17 @@ LL | let x = unsafe { *p }; = 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 help: ALLOC was allocated here: - --> $DIR/dangling_pointer_deref.rs:LL:CC + --> tests/fail/dangling_pointers/dangling_pointer_deref.rs:LL:CC | LL | let b = Box::new(42); | ^^^^^^^^^^^^ help: ALLOC was deallocated here: - --> $DIR/dangling_pointer_deref.rs:LL:CC + --> tests/fail/dangling_pointers/dangling_pointer_deref.rs:LL:CC | LL | }; | ^ = note: BACKTRACE (of the first span): - = note: inside `main` at $DIR/dangling_pointer_deref.rs:LL:CC + = note: inside `main` at tests/fail/dangling_pointers/dangling_pointer_deref.rs:LL:CC note: some details are omitted, run with `MIRIFLAGS=-Zmiri-backtrace=full` for a verbose backtrace diff --git a/tests/fail/dangling_pointers/dangling_pointer_deref_match_never.stderr b/tests/fail/dangling_pointers/dangling_pointer_deref_match_never.stderr index 7d38a5649a..032cbccaf9 100644 --- a/tests/fail/dangling_pointers/dangling_pointer_deref_match_never.stderr +++ b/tests/fail/dangling_pointers/dangling_pointer_deref_match_never.stderr @@ -1,5 +1,5 @@ error: Undefined Behavior: entering unreachable code - --> $DIR/dangling_pointer_deref_match_never.rs:LL:CC + --> tests/fail/dangling_pointers/dangling_pointer_deref_match_never.rs:LL:CC | LL | match *p {} | ^^ entering unreachable code @@ -7,7 +7,7 @@ LL | match *p {} = 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 = note: BACKTRACE: - = note: inside `main` at $DIR/dangling_pointer_deref_match_never.rs:LL:CC + = note: inside `main` at tests/fail/dangling_pointers/dangling_pointer_deref_match_never.rs:LL:CC note: some details are omitted, run with `MIRIFLAGS=-Zmiri-backtrace=full` for a verbose backtrace diff --git a/tests/fail/dangling_pointers/dangling_pointer_offset.stderr b/tests/fail/dangling_pointers/dangling_pointer_offset.stderr index b9fbadb1f8..076d688046 100644 --- a/tests/fail/dangling_pointers/dangling_pointer_offset.stderr +++ b/tests/fail/dangling_pointers/dangling_pointer_offset.stderr @@ -1,5 +1,5 @@ error: Undefined Behavior: out-of-bounds pointer arithmetic: ALLOC has been freed, so this pointer is dangling - --> $DIR/dangling_pointer_offset.rs:LL:CC + --> tests/fail/dangling_pointers/dangling_pointer_offset.rs:LL:CC | LL | let x = unsafe { p.offset(42) }; | ^^^^^^^^^^^^ out-of-bounds pointer arithmetic: ALLOC has been freed, so this pointer is dangling @@ -7,17 +7,17 @@ LL | let x = unsafe { p.offset(42) }; = 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 help: ALLOC was allocated here: - --> $DIR/dangling_pointer_offset.rs:LL:CC + --> tests/fail/dangling_pointers/dangling_pointer_offset.rs:LL:CC | LL | let b = Box::new(42); | ^^^^^^^^^^^^ help: ALLOC was deallocated here: - --> $DIR/dangling_pointer_offset.rs:LL:CC + --> tests/fail/dangling_pointers/dangling_pointer_offset.rs:LL:CC | LL | }; | ^ = note: BACKTRACE (of the first span): - = note: inside `main` at $DIR/dangling_pointer_offset.rs:LL:CC + = note: inside `main` at tests/fail/dangling_pointers/dangling_pointer_offset.rs:LL:CC note: some details are omitted, run with `MIRIFLAGS=-Zmiri-backtrace=full` for a verbose backtrace diff --git a/tests/fail/dangling_pointers/dangling_pointer_project_underscore_let.stderr b/tests/fail/dangling_pointers/dangling_pointer_project_underscore_let.stderr index 05e8c95166..ffb525e398 100644 --- a/tests/fail/dangling_pointers/dangling_pointer_project_underscore_let.stderr +++ b/tests/fail/dangling_pointers/dangling_pointer_project_underscore_let.stderr @@ -1,5 +1,5 @@ error: Undefined Behavior: out-of-bounds pointer arithmetic: ALLOC has been freed, so this pointer is dangling - --> $DIR/dangling_pointer_project_underscore_let.rs:LL:CC + --> tests/fail/dangling_pointers/dangling_pointer_project_underscore_let.rs:LL:CC | LL | let _ = (*p).1; | ^^^^^^ out-of-bounds pointer arithmetic: ALLOC has been freed, so this pointer is dangling @@ -7,17 +7,17 @@ LL | let _ = (*p).1; = 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 help: ALLOC was allocated here: - --> $DIR/dangling_pointer_project_underscore_let.rs:LL:CC + --> tests/fail/dangling_pointers/dangling_pointer_project_underscore_let.rs:LL:CC | LL | let b = Box::new(42); | ^^^^^^^^^^^^ help: ALLOC was deallocated here: - --> $DIR/dangling_pointer_project_underscore_let.rs:LL:CC + --> tests/fail/dangling_pointers/dangling_pointer_project_underscore_let.rs:LL:CC | LL | }; | ^ = note: BACKTRACE (of the first span): - = note: inside `main` at $DIR/dangling_pointer_project_underscore_let.rs:LL:CC + = note: inside `main` at tests/fail/dangling_pointers/dangling_pointer_project_underscore_let.rs:LL:CC note: some details are omitted, run with `MIRIFLAGS=-Zmiri-backtrace=full` for a verbose backtrace diff --git a/tests/fail/dangling_pointers/dangling_pointer_project_underscore_let_type_annotation.stderr b/tests/fail/dangling_pointers/dangling_pointer_project_underscore_let_type_annotation.stderr index 8f7ba156a9..14dfa43b2d 100644 --- a/tests/fail/dangling_pointers/dangling_pointer_project_underscore_let_type_annotation.stderr +++ b/tests/fail/dangling_pointers/dangling_pointer_project_underscore_let_type_annotation.stderr @@ -1,5 +1,5 @@ error: Undefined Behavior: out-of-bounds pointer arithmetic: ALLOC has been freed, so this pointer is dangling - --> $DIR/dangling_pointer_project_underscore_let_type_annotation.rs:LL:CC + --> tests/fail/dangling_pointers/dangling_pointer_project_underscore_let_type_annotation.rs:LL:CC | LL | let _: u8 = (*p).1; | ^^^^^^ out-of-bounds pointer arithmetic: ALLOC has been freed, so this pointer is dangling @@ -7,17 +7,17 @@ LL | let _: u8 = (*p).1; = 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 help: ALLOC was allocated here: - --> $DIR/dangling_pointer_project_underscore_let_type_annotation.rs:LL:CC + --> tests/fail/dangling_pointers/dangling_pointer_project_underscore_let_type_annotation.rs:LL:CC | LL | let b = Box::new(42); | ^^^^^^^^^^^^ help: ALLOC was deallocated here: - --> $DIR/dangling_pointer_project_underscore_let_type_annotation.rs:LL:CC + --> tests/fail/dangling_pointers/dangling_pointer_project_underscore_let_type_annotation.rs:LL:CC | LL | }; | ^ = note: BACKTRACE (of the first span): - = note: inside `main` at $DIR/dangling_pointer_project_underscore_let_type_annotation.rs:LL:CC + = note: inside `main` at tests/fail/dangling_pointers/dangling_pointer_project_underscore_let_type_annotation.rs:LL:CC note: some details are omitted, run with `MIRIFLAGS=-Zmiri-backtrace=full` for a verbose backtrace diff --git a/tests/fail/dangling_pointers/dangling_pointer_project_underscore_match.stderr b/tests/fail/dangling_pointers/dangling_pointer_project_underscore_match.stderr index c2b5d7b23c..ff39e14757 100644 --- a/tests/fail/dangling_pointers/dangling_pointer_project_underscore_match.stderr +++ b/tests/fail/dangling_pointers/dangling_pointer_project_underscore_match.stderr @@ -1,5 +1,5 @@ error: Undefined Behavior: out-of-bounds pointer arithmetic: ALLOC has been freed, so this pointer is dangling - --> $DIR/dangling_pointer_project_underscore_match.rs:LL:CC + --> tests/fail/dangling_pointers/dangling_pointer_project_underscore_match.rs:LL:CC | LL | match (*p).1 { | ^^^^^^ out-of-bounds pointer arithmetic: ALLOC has been freed, so this pointer is dangling @@ -7,17 +7,17 @@ LL | match (*p).1 { = 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 help: ALLOC was allocated here: - --> $DIR/dangling_pointer_project_underscore_match.rs:LL:CC + --> tests/fail/dangling_pointers/dangling_pointer_project_underscore_match.rs:LL:CC | LL | let b = Box::new(42); | ^^^^^^^^^^^^ help: ALLOC was deallocated here: - --> $DIR/dangling_pointer_project_underscore_match.rs:LL:CC + --> tests/fail/dangling_pointers/dangling_pointer_project_underscore_match.rs:LL:CC | LL | }; | ^ = note: BACKTRACE (of the first span): - = note: inside `main` at $DIR/dangling_pointer_project_underscore_match.rs:LL:CC + = note: inside `main` at tests/fail/dangling_pointers/dangling_pointer_project_underscore_match.rs:LL:CC note: some details are omitted, run with `MIRIFLAGS=-Zmiri-backtrace=full` for a verbose backtrace diff --git a/tests/fail/dangling_pointers/dangling_pointer_to_raw_pointer.stderr b/tests/fail/dangling_pointers/dangling_pointer_to_raw_pointer.stderr index a5c031b949..99194d6e07 100644 --- a/tests/fail/dangling_pointers/dangling_pointer_to_raw_pointer.stderr +++ b/tests/fail/dangling_pointers/dangling_pointer_to_raw_pointer.stderr @@ -1,5 +1,5 @@ error: Undefined Behavior: out-of-bounds pointer use: expected a pointer to 4 bytes of memory, but got 0x10[noalloc] which is a dangling pointer (it has no provenance) - --> $DIR/dangling_pointer_to_raw_pointer.rs:LL:CC + --> tests/fail/dangling_pointers/dangling_pointer_to_raw_pointer.rs:LL:CC | LL | unsafe { &(*x).0 as *const i32 } | ^^^^^^^ out-of-bounds pointer use: expected a pointer to 4 bytes of memory, but got 0x10[noalloc] which is a dangling pointer (it has no provenance) @@ -7,9 +7,9 @@ LL | unsafe { &(*x).0 as *const i32 } = 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 = note: BACKTRACE: - = note: inside `via_ref` at $DIR/dangling_pointer_to_raw_pointer.rs:LL:CC + = note: inside `via_ref` at tests/fail/dangling_pointers/dangling_pointer_to_raw_pointer.rs:LL:CC note: inside `main` - --> $DIR/dangling_pointer_to_raw_pointer.rs:LL:CC + --> tests/fail/dangling_pointers/dangling_pointer_to_raw_pointer.rs:LL:CC | LL | via_ref(ptr); // this is not | ^^^^^^^^^^^^ diff --git a/tests/fail/dangling_pointers/dangling_primitive.stderr b/tests/fail/dangling_pointers/dangling_primitive.stderr index ee02c1040c..2d7456c15b 100644 --- a/tests/fail/dangling_pointers/dangling_primitive.stderr +++ b/tests/fail/dangling_pointers/dangling_primitive.stderr @@ -1,5 +1,5 @@ error: Undefined Behavior: memory access failed: ALLOC has been freed, so this pointer is dangling - --> $DIR/dangling_primitive.rs:LL:CC + --> tests/fail/dangling_pointers/dangling_primitive.rs:LL:CC | LL | dbg!(*ptr); | ^^^^^^^^^^ memory access failed: ALLOC has been freed, so this pointer is dangling @@ -7,12 +7,12 @@ LL | dbg!(*ptr); = 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 help: ALLOC was allocated here: - --> $DIR/dangling_primitive.rs:LL:CC + --> tests/fail/dangling_pointers/dangling_primitive.rs:LL:CC | LL | let x = 0usize; // This line should appear in the helps | ^ help: ALLOC was deallocated here: - --> $DIR/dangling_primitive.rs:LL:CC + --> tests/fail/dangling_pointers/dangling_primitive.rs:LL:CC | LL | }; | ^ diff --git a/tests/fail/dangling_pointers/deref-invalid-ptr.stderr b/tests/fail/dangling_pointers/deref-invalid-ptr.stderr index d989bff451..09a201983b 100644 --- a/tests/fail/dangling_pointers/deref-invalid-ptr.stderr +++ b/tests/fail/dangling_pointers/deref-invalid-ptr.stderr @@ -1,5 +1,5 @@ error: Undefined Behavior: out-of-bounds pointer use: expected a pointer to 4 bytes of memory, but got 0x10[noalloc] which is a dangling pointer (it has no provenance) - --> $DIR/deref-invalid-ptr.rs:LL:CC + --> tests/fail/dangling_pointers/deref-invalid-ptr.rs:LL:CC | LL | let _y = unsafe { &*x as *const u32 }; | ^^^ out-of-bounds pointer use: expected a pointer to 4 bytes of memory, but got 0x10[noalloc] which is a dangling pointer (it has no provenance) @@ -7,7 +7,7 @@ LL | let _y = unsafe { &*x as *const u32 }; = 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 = note: BACKTRACE: - = note: inside `main` at $DIR/deref-invalid-ptr.rs:LL:CC + = note: inside `main` at tests/fail/dangling_pointers/deref-invalid-ptr.rs:LL:CC note: some details are omitted, run with `MIRIFLAGS=-Zmiri-backtrace=full` for a verbose backtrace diff --git a/tests/fail/dangling_pointers/deref_dangling_box.stderr b/tests/fail/dangling_pointers/deref_dangling_box.stderr index eb4482f5ca..82802f02b9 100644 --- a/tests/fail/dangling_pointers/deref_dangling_box.stderr +++ b/tests/fail/dangling_pointers/deref_dangling_box.stderr @@ -1,5 +1,5 @@ error: Undefined Behavior: constructing invalid value: encountered a dangling box (0x18[noalloc] has no provenance) - --> $DIR/deref_dangling_box.rs:LL:CC + --> tests/fail/dangling_pointers/deref_dangling_box.rs:LL:CC | LL | let _val = unsafe { addr_of_mut!(**outer) }; | ^^^^^^^^^^^^^^^^^^^^^ constructing invalid value: encountered a dangling box (0x18[noalloc] has no provenance) diff --git a/tests/fail/dangling_pointers/deref_dangling_ref.stderr b/tests/fail/dangling_pointers/deref_dangling_ref.stderr index c0d989dc1a..364d193b0c 100644 --- a/tests/fail/dangling_pointers/deref_dangling_ref.stderr +++ b/tests/fail/dangling_pointers/deref_dangling_ref.stderr @@ -1,5 +1,5 @@ error: Undefined Behavior: constructing invalid value: encountered a dangling reference (0x18[noalloc] has no provenance) - --> $DIR/deref_dangling_ref.rs:LL:CC + --> tests/fail/dangling_pointers/deref_dangling_ref.rs:LL:CC | LL | let _val = unsafe { addr_of_mut!(**outer) }; | ^^^^^^^^^^^^^^^^^^^^^ constructing invalid value: encountered a dangling reference (0x18[noalloc] has no provenance) diff --git a/tests/fail/dangling_pointers/dyn_size.stderr b/tests/fail/dangling_pointers/dyn_size.stderr index 7d43857b9b..f3596347f6 100644 --- a/tests/fail/dangling_pointers/dyn_size.stderr +++ b/tests/fail/dangling_pointers/dyn_size.stderr @@ -1,5 +1,5 @@ error: Undefined Behavior: constructing invalid value: encountered a dangling reference (going beyond the bounds of its allocation) - --> $DIR/dyn_size.rs:LL:CC + --> tests/fail/dangling_pointers/dyn_size.rs:LL:CC | LL | let _ptr = unsafe { &*ptr }; | ^^^^^ constructing invalid value: encountered a dangling reference (going beyond the bounds of its allocation) @@ -7,7 +7,7 @@ LL | let _ptr = unsafe { &*ptr }; = 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 = note: BACKTRACE: - = note: inside `main` at $DIR/dyn_size.rs:LL:CC + = note: inside `main` at tests/fail/dangling_pointers/dyn_size.rs:LL:CC note: some details are omitted, run with `MIRIFLAGS=-Zmiri-backtrace=full` for a verbose backtrace diff --git a/tests/fail/dangling_pointers/null_pointer_deref.stderr b/tests/fail/dangling_pointers/null_pointer_deref.stderr index 1b97265eb3..d87a8bc59e 100644 --- a/tests/fail/dangling_pointers/null_pointer_deref.stderr +++ b/tests/fail/dangling_pointers/null_pointer_deref.stderr @@ -1,5 +1,5 @@ error: Undefined Behavior: memory access failed: expected a pointer to 4 bytes of memory, but got a null pointer - --> $DIR/null_pointer_deref.rs:LL:CC + --> tests/fail/dangling_pointers/null_pointer_deref.rs:LL:CC | LL | let x: i32 = unsafe { *std::ptr::null() }; | ^^^^^^^^^^^^^^^^^ memory access failed: expected a pointer to 4 bytes of memory, but got a null pointer @@ -7,7 +7,7 @@ LL | let x: i32 = unsafe { *std::ptr::null() }; = 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 = note: BACKTRACE: - = note: inside `main` at $DIR/null_pointer_deref.rs:LL:CC + = note: inside `main` at tests/fail/dangling_pointers/null_pointer_deref.rs:LL:CC note: some details are omitted, run with `MIRIFLAGS=-Zmiri-backtrace=full` for a verbose backtrace diff --git a/tests/fail/dangling_pointers/null_pointer_write.stderr b/tests/fail/dangling_pointers/null_pointer_write.stderr index 3d75e7a025..39d861a638 100644 --- a/tests/fail/dangling_pointers/null_pointer_write.stderr +++ b/tests/fail/dangling_pointers/null_pointer_write.stderr @@ -1,5 +1,5 @@ error: Undefined Behavior: memory access failed: expected a pointer to 4 bytes of memory, but got a null pointer - --> $DIR/null_pointer_write.rs:LL:CC + --> tests/fail/dangling_pointers/null_pointer_write.rs:LL:CC | LL | unsafe { *std::ptr::null_mut() = 0i32 }; | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ memory access failed: expected a pointer to 4 bytes of memory, but got a null pointer @@ -7,7 +7,7 @@ LL | unsafe { *std::ptr::null_mut() = 0i32 }; = 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 = note: BACKTRACE: - = note: inside `main` at $DIR/null_pointer_write.rs:LL:CC + = note: inside `main` at tests/fail/dangling_pointers/null_pointer_write.rs:LL:CC note: some details are omitted, run with `MIRIFLAGS=-Zmiri-backtrace=full` for a verbose backtrace diff --git a/tests/fail/dangling_pointers/out_of_bounds_project.stderr b/tests/fail/dangling_pointers/out_of_bounds_project.stderr index 4bfac8f965..27a437c748 100644 --- a/tests/fail/dangling_pointers/out_of_bounds_project.stderr +++ b/tests/fail/dangling_pointers/out_of_bounds_project.stderr @@ -1,5 +1,5 @@ error: Undefined Behavior: out-of-bounds pointer arithmetic: expected a pointer to 8 bytes of memory, but got ALLOC which is only 4 bytes from the end of the allocation - --> $DIR/out_of_bounds_project.rs:LL:CC + --> tests/fail/dangling_pointers/out_of_bounds_project.rs:LL:CC | LL | let _field = addr_of!((*ptr).2); | ^^^^^^^^^^^^^^^^^^ out-of-bounds pointer arithmetic: expected a pointer to 8 bytes of memory, but got ALLOC which is only 4 bytes from the end of the allocation @@ -7,7 +7,7 @@ LL | let _field = addr_of!((*ptr).2); = 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 help: ALLOC was allocated here: - --> $DIR/out_of_bounds_project.rs:LL:CC + --> tests/fail/dangling_pointers/out_of_bounds_project.rs:LL:CC | LL | let v = 0u32; | ^ diff --git a/tests/fail/dangling_pointers/out_of_bounds_read.stderr b/tests/fail/dangling_pointers/out_of_bounds_read.stderr index 8a774c21bb..813bcef54f 100644 --- a/tests/fail/dangling_pointers/out_of_bounds_read.stderr +++ b/tests/fail/dangling_pointers/out_of_bounds_read.stderr @@ -1,5 +1,5 @@ error: Undefined Behavior: memory access failed: expected a pointer to 2 bytes of memory, but got ALLOC+0x5 which is at or beyond the end of the allocation of size 4 bytes - --> $DIR/out_of_bounds_read.rs:LL:CC + --> tests/fail/dangling_pointers/out_of_bounds_read.rs:LL:CC | LL | let x = unsafe { *v.as_ptr().wrapping_byte_add(5) }; | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ memory access failed: expected a pointer to 2 bytes of memory, but got ALLOC+0x5 which is at or beyond the end of the allocation of size 4 bytes @@ -7,12 +7,12 @@ LL | let x = unsafe { *v.as_ptr().wrapping_byte_add(5) }; = 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 help: ALLOC was allocated here: - --> $DIR/out_of_bounds_read.rs:LL:CC + --> tests/fail/dangling_pointers/out_of_bounds_read.rs:LL:CC | LL | let v: Vec = vec![1, 2]; | ^^^^^^^^^^ = note: BACKTRACE (of the first span): - = note: inside `main` at $DIR/out_of_bounds_read.rs:LL:CC + = note: inside `main` at tests/fail/dangling_pointers/out_of_bounds_read.rs:LL:CC = note: this error originates in the macro `vec` (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 diff --git a/tests/fail/dangling_pointers/out_of_bounds_write.stderr b/tests/fail/dangling_pointers/out_of_bounds_write.stderr index 6ae9f05d17..1056a739a4 100644 --- a/tests/fail/dangling_pointers/out_of_bounds_write.stderr +++ b/tests/fail/dangling_pointers/out_of_bounds_write.stderr @@ -1,5 +1,5 @@ error: Undefined Behavior: memory access failed: expected a pointer to 2 bytes of memory, but got ALLOC+0x5 which is at or beyond the end of the allocation of size 4 bytes - --> $DIR/out_of_bounds_write.rs:LL:CC + --> tests/fail/dangling_pointers/out_of_bounds_write.rs:LL:CC | LL | unsafe { *v.as_mut_ptr().wrapping_byte_add(5) = 0 }; | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ memory access failed: expected a pointer to 2 bytes of memory, but got ALLOC+0x5 which is at or beyond the end of the allocation of size 4 bytes @@ -7,12 +7,12 @@ LL | unsafe { *v.as_mut_ptr().wrapping_byte_add(5) = 0 }; = 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 help: ALLOC was allocated here: - --> $DIR/out_of_bounds_write.rs:LL:CC + --> tests/fail/dangling_pointers/out_of_bounds_write.rs:LL:CC | LL | let mut v: Vec = vec![1, 2]; | ^^^^^^^^^^ = note: BACKTRACE (of the first span): - = note: inside `main` at $DIR/out_of_bounds_write.rs:LL:CC + = note: inside `main` at tests/fail/dangling_pointers/out_of_bounds_write.rs:LL:CC = note: this error originates in the macro `vec` (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 diff --git a/tests/fail/dangling_pointers/stack_temporary.stderr b/tests/fail/dangling_pointers/stack_temporary.stderr index d5c53e4ad6..c617dfdb3a 100644 --- a/tests/fail/dangling_pointers/stack_temporary.stderr +++ b/tests/fail/dangling_pointers/stack_temporary.stderr @@ -1,5 +1,5 @@ error: Undefined Behavior: memory access failed: ALLOC has been freed, so this pointer is dangling - --> $DIR/stack_temporary.rs:LL:CC + --> tests/fail/dangling_pointers/stack_temporary.rs:LL:CC | LL | let val = *x; | ^^ memory access failed: ALLOC has been freed, so this pointer is dangling @@ -7,17 +7,17 @@ LL | let val = *x; = 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 help: ALLOC was allocated here: - --> $DIR/stack_temporary.rs:LL:CC + --> tests/fail/dangling_pointers/stack_temporary.rs:LL:CC | LL | let x = make_ref(&mut 0); // The temporary storing "0" is deallocated at the ";"! | ^ help: ALLOC was deallocated here: - --> $DIR/stack_temporary.rs:LL:CC + --> tests/fail/dangling_pointers/stack_temporary.rs:LL:CC | LL | let x = make_ref(&mut 0); // The temporary storing "0" is deallocated at the ";"! | ^ = note: BACKTRACE (of the first span): - = note: inside `main` at $DIR/stack_temporary.rs:LL:CC + = note: inside `main` at tests/fail/dangling_pointers/stack_temporary.rs:LL:CC note: some details are omitted, run with `MIRIFLAGS=-Zmiri-backtrace=full` for a verbose backtrace diff --git a/tests/fail/dangling_pointers/storage_dead_dangling.stderr b/tests/fail/dangling_pointers/storage_dead_dangling.stderr index 2d4fbafd8b..9061121494 100644 --- a/tests/fail/dangling_pointers/storage_dead_dangling.stderr +++ b/tests/fail/dangling_pointers/storage_dead_dangling.stderr @@ -1,5 +1,5 @@ error: Undefined Behavior: out-of-bounds pointer use: expected a pointer to 4 bytes of memory, but got $HEX[noalloc] which is a dangling pointer (it has no provenance) - --> $DIR/storage_dead_dangling.rs:LL:CC + --> tests/fail/dangling_pointers/storage_dead_dangling.rs:LL:CC | LL | let _ref = unsafe { &mut *(LEAK as *mut i32) }; | ^^^^^^^^^^^^^^^^^^^^^^^^ out-of-bounds pointer use: expected a pointer to 4 bytes of memory, but got $HEX[noalloc] which is a dangling pointer (it has no provenance) @@ -7,9 +7,9 @@ LL | let _ref = unsafe { &mut *(LEAK as *mut i32) }; = 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 = note: BACKTRACE: - = note: inside `evil` at $DIR/storage_dead_dangling.rs:LL:CC + = note: inside `evil` at tests/fail/dangling_pointers/storage_dead_dangling.rs:LL:CC note: inside `main` - --> $DIR/storage_dead_dangling.rs:LL:CC + --> tests/fail/dangling_pointers/storage_dead_dangling.rs:LL:CC | LL | evil(); | ^^^^^^ diff --git a/tests/fail/dangling_pointers/wild_pointer_deref.stderr b/tests/fail/dangling_pointers/wild_pointer_deref.stderr index 1d8eed3d30..3e7aac4724 100644 --- a/tests/fail/dangling_pointers/wild_pointer_deref.stderr +++ b/tests/fail/dangling_pointers/wild_pointer_deref.stderr @@ -1,5 +1,5 @@ error: Undefined Behavior: memory access failed: expected a pointer to 4 bytes of memory, but got 0x2c[noalloc] which is a dangling pointer (it has no provenance) - --> $DIR/wild_pointer_deref.rs:LL:CC + --> tests/fail/dangling_pointers/wild_pointer_deref.rs:LL:CC | LL | let x = unsafe { *p }; | ^^ memory access failed: expected a pointer to 4 bytes of memory, but got 0x2c[noalloc] which is a dangling pointer (it has no provenance) @@ -7,7 +7,7 @@ LL | let x = unsafe { *p }; = 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 = note: BACKTRACE: - = note: inside `main` at $DIR/wild_pointer_deref.rs:LL:CC + = note: inside `main` at tests/fail/dangling_pointers/wild_pointer_deref.rs:LL:CC note: some details are omitted, run with `MIRIFLAGS=-Zmiri-backtrace=full` for a verbose backtrace diff --git a/tests/fail/data_race/alloc_read_race.stderr b/tests/fail/data_race/alloc_read_race.stderr index 59ed5fe9cf..e6ee9ce81f 100644 --- a/tests/fail/data_race/alloc_read_race.stderr +++ b/tests/fail/data_race/alloc_read_race.stderr @@ -1,18 +1,18 @@ error: Undefined Behavior: Data race detected between (1) creating a new allocation on thread `unnamed-ID` and (2) non-atomic read on thread `unnamed-ID` at ALLOC. (2) just happened here - --> $DIR/alloc_read_race.rs:LL:CC + --> tests/fail/data_race/alloc_read_race.rs:LL:CC | LL | *pointer.load(Ordering::Relaxed) | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ Data race detected between (1) creating a new allocation on thread `unnamed-ID` and (2) non-atomic read on thread `unnamed-ID` at ALLOC. (2) just happened here | help: and (1) occurred earlier here - --> $DIR/alloc_read_race.rs:LL:CC + --> tests/fail/data_race/alloc_read_race.rs:LL:CC | LL | pointer.store(Box::into_raw(Box::new_uninit()), Ordering::Relaxed); | ^^^^^^^^^^^^^^^^^ = 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 = note: BACKTRACE (of the first span) on thread `unnamed-ID`: - = note: inside closure at $DIR/alloc_read_race.rs:LL:CC + = note: inside closure at tests/fail/data_race/alloc_read_race.rs:LL:CC note: some details are omitted, run with `MIRIFLAGS=-Zmiri-backtrace=full` for a verbose backtrace diff --git a/tests/fail/data_race/alloc_write_race.stderr b/tests/fail/data_race/alloc_write_race.stderr index 9770684fc5..97b54609ad 100644 --- a/tests/fail/data_race/alloc_write_race.stderr +++ b/tests/fail/data_race/alloc_write_race.stderr @@ -1,18 +1,18 @@ error: Undefined Behavior: Data race detected between (1) creating a new allocation on thread `unnamed-ID` and (2) non-atomic write on thread `unnamed-ID` at ALLOC. (2) just happened here - --> $DIR/alloc_write_race.rs:LL:CC + --> tests/fail/data_race/alloc_write_race.rs:LL:CC | LL | *pointer.load(Ordering::Relaxed) = 2; | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ Data race detected between (1) creating a new allocation on thread `unnamed-ID` and (2) non-atomic write on thread `unnamed-ID` at ALLOC. (2) just happened here | help: and (1) occurred earlier here - --> $DIR/alloc_write_race.rs:LL:CC + --> tests/fail/data_race/alloc_write_race.rs:LL:CC | LL | .store(Box::into_raw(Box::::new_uninit()) as *mut usize, Ordering::Relaxed); | ^^^^^^^^^^^^^^^^^^^^^^^^^^ = 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 = note: BACKTRACE (of the first span) on thread `unnamed-ID`: - = note: inside closure at $DIR/alloc_write_race.rs:LL:CC + = note: inside closure at tests/fail/data_race/alloc_write_race.rs:LL:CC note: some details are omitted, run with `MIRIFLAGS=-Zmiri-backtrace=full` for a verbose backtrace diff --git a/tests/fail/data_race/atomic_read_na_write_race1.stderr b/tests/fail/data_race/atomic_read_na_write_race1.stderr index a1132ed206..d3d6ed2e31 100644 --- a/tests/fail/data_race/atomic_read_na_write_race1.stderr +++ b/tests/fail/data_race/atomic_read_na_write_race1.stderr @@ -1,18 +1,18 @@ error: Undefined Behavior: Data race detected between (1) non-atomic write on thread `unnamed-ID` and (2) atomic load on thread `unnamed-ID` at ALLOC. (2) just happened here - --> $DIR/atomic_read_na_write_race1.rs:LL:CC + --> tests/fail/data_race/atomic_read_na_write_race1.rs:LL:CC | LL | (&*c.0).load(Ordering::SeqCst) | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ Data race detected between (1) non-atomic write on thread `unnamed-ID` and (2) atomic load on thread `unnamed-ID` at ALLOC. (2) just happened here | help: and (1) occurred earlier here - --> $DIR/atomic_read_na_write_race1.rs:LL:CC + --> tests/fail/data_race/atomic_read_na_write_race1.rs:LL:CC | LL | *(c.0 as *mut usize) = 32; | ^^^^^^^^^^^^^^^^^^^^^^^^^ = 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 = note: BACKTRACE (of the first span) on thread `unnamed-ID`: - = note: inside closure at $DIR/atomic_read_na_write_race1.rs:LL:CC + = note: inside closure at tests/fail/data_race/atomic_read_na_write_race1.rs:LL:CC note: some details are omitted, run with `MIRIFLAGS=-Zmiri-backtrace=full` for a verbose backtrace diff --git a/tests/fail/data_race/atomic_read_na_write_race2.stderr b/tests/fail/data_race/atomic_read_na_write_race2.stderr index 865357cb0e..ea535ddac4 100644 --- a/tests/fail/data_race/atomic_read_na_write_race2.stderr +++ b/tests/fail/data_race/atomic_read_na_write_race2.stderr @@ -1,18 +1,18 @@ error: Undefined Behavior: Data race detected between (1) atomic load on thread `unnamed-ID` and (2) non-atomic write on thread `unnamed-ID` at ALLOC. (2) just happened here - --> $DIR/atomic_read_na_write_race2.rs:LL:CC + --> tests/fail/data_race/atomic_read_na_write_race2.rs:LL:CC | LL | *atomic_ref.get_mut() = 32; | ^^^^^^^^^^^^^^^^^^^^^^^^^^ Data race detected between (1) atomic load on thread `unnamed-ID` and (2) non-atomic write on thread `unnamed-ID` at ALLOC. (2) just happened here | help: and (1) occurred earlier here - --> $DIR/atomic_read_na_write_race2.rs:LL:CC + --> tests/fail/data_race/atomic_read_na_write_race2.rs:LL:CC | LL | atomic_ref.load(Ordering::SeqCst) | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ = 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 = note: BACKTRACE (of the first span) on thread `unnamed-ID`: - = note: inside closure at $DIR/atomic_read_na_write_race2.rs:LL:CC + = note: inside closure at tests/fail/data_race/atomic_read_na_write_race2.rs:LL:CC note: some details are omitted, run with `MIRIFLAGS=-Zmiri-backtrace=full` for a verbose backtrace diff --git a/tests/fail/data_race/atomic_write_na_read_race1.stderr b/tests/fail/data_race/atomic_write_na_read_race1.stderr index 355ea48f11..fe65eca4bc 100644 --- a/tests/fail/data_race/atomic_write_na_read_race1.stderr +++ b/tests/fail/data_race/atomic_write_na_read_race1.stderr @@ -1,18 +1,18 @@ error: Undefined Behavior: Data race detected between (1) atomic store on thread `unnamed-ID` and (2) non-atomic read on thread `unnamed-ID` at ALLOC. (2) just happened here - --> $DIR/atomic_write_na_read_race1.rs:LL:CC + --> tests/fail/data_race/atomic_write_na_read_race1.rs:LL:CC | LL | *atomic_ref.get_mut() | ^^^^^^^^^^^^^^^^^^^^^ Data race detected between (1) atomic store on thread `unnamed-ID` and (2) non-atomic read on thread `unnamed-ID` at ALLOC. (2) just happened here | help: and (1) occurred earlier here - --> $DIR/atomic_write_na_read_race1.rs:LL:CC + --> tests/fail/data_race/atomic_write_na_read_race1.rs:LL:CC | LL | atomic_ref.store(32, Ordering::SeqCst) | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ = 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 = note: BACKTRACE (of the first span) on thread `unnamed-ID`: - = note: inside closure at $DIR/atomic_write_na_read_race1.rs:LL:CC + = note: inside closure at tests/fail/data_race/atomic_write_na_read_race1.rs:LL:CC note: some details are omitted, run with `MIRIFLAGS=-Zmiri-backtrace=full` for a verbose backtrace diff --git a/tests/fail/data_race/atomic_write_na_read_race2.stderr b/tests/fail/data_race/atomic_write_na_read_race2.stderr index 500cd09a33..4393cc3c09 100644 --- a/tests/fail/data_race/atomic_write_na_read_race2.stderr +++ b/tests/fail/data_race/atomic_write_na_read_race2.stderr @@ -1,18 +1,18 @@ error: Undefined Behavior: Data race detected between (1) non-atomic read on thread `unnamed-ID` and (2) atomic store on thread `unnamed-ID` at ALLOC. (2) just happened here - --> $DIR/atomic_write_na_read_race2.rs:LL:CC + --> tests/fail/data_race/atomic_write_na_read_race2.rs:LL:CC | LL | (&*c.0).store(32, Ordering::SeqCst); | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ Data race detected between (1) non-atomic read on thread `unnamed-ID` and (2) atomic store on thread `unnamed-ID` at ALLOC. (2) just happened here | help: and (1) occurred earlier here - --> $DIR/atomic_write_na_read_race2.rs:LL:CC + --> tests/fail/data_race/atomic_write_na_read_race2.rs:LL:CC | LL | let _val = *(c.0 as *mut usize); | ^^^^^^^^^^^^^^^^^^^^ = 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 = note: BACKTRACE (of the first span) on thread `unnamed-ID`: - = note: inside closure at $DIR/atomic_write_na_read_race2.rs:LL:CC + = note: inside closure at tests/fail/data_race/atomic_write_na_read_race2.rs:LL:CC note: some details are omitted, run with `MIRIFLAGS=-Zmiri-backtrace=full` for a verbose backtrace diff --git a/tests/fail/data_race/atomic_write_na_write_race1.stderr b/tests/fail/data_race/atomic_write_na_write_race1.stderr index 0b870f13bb..5a7f90447f 100644 --- a/tests/fail/data_race/atomic_write_na_write_race1.stderr +++ b/tests/fail/data_race/atomic_write_na_write_race1.stderr @@ -1,18 +1,18 @@ error: Undefined Behavior: Data race detected between (1) non-atomic write on thread `unnamed-ID` and (2) atomic store on thread `unnamed-ID` at ALLOC. (2) just happened here - --> $DIR/atomic_write_na_write_race1.rs:LL:CC + --> tests/fail/data_race/atomic_write_na_write_race1.rs:LL:CC | LL | (&*c.0).store(64, Ordering::SeqCst); | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ Data race detected between (1) non-atomic write on thread `unnamed-ID` and (2) atomic store on thread `unnamed-ID` at ALLOC. (2) just happened here | help: and (1) occurred earlier here - --> $DIR/atomic_write_na_write_race1.rs:LL:CC + --> tests/fail/data_race/atomic_write_na_write_race1.rs:LL:CC | LL | *(c.0 as *mut usize) = 32; | ^^^^^^^^^^^^^^^^^^^^^^^^^ = 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 = note: BACKTRACE (of the first span) on thread `unnamed-ID`: - = note: inside closure at $DIR/atomic_write_na_write_race1.rs:LL:CC + = note: inside closure at tests/fail/data_race/atomic_write_na_write_race1.rs:LL:CC note: some details are omitted, run with `MIRIFLAGS=-Zmiri-backtrace=full` for a verbose backtrace diff --git a/tests/fail/data_race/atomic_write_na_write_race2.stderr b/tests/fail/data_race/atomic_write_na_write_race2.stderr index dbbf6bf1ef..9ee4f16d0d 100644 --- a/tests/fail/data_race/atomic_write_na_write_race2.stderr +++ b/tests/fail/data_race/atomic_write_na_write_race2.stderr @@ -1,18 +1,18 @@ error: Undefined Behavior: Data race detected between (1) atomic store on thread `unnamed-ID` and (2) non-atomic write on thread `unnamed-ID` at ALLOC. (2) just happened here - --> $DIR/atomic_write_na_write_race2.rs:LL:CC + --> tests/fail/data_race/atomic_write_na_write_race2.rs:LL:CC | LL | *atomic_ref.get_mut() = 32; | ^^^^^^^^^^^^^^^^^^^^^^^^^^ Data race detected between (1) atomic store on thread `unnamed-ID` and (2) non-atomic write on thread `unnamed-ID` at ALLOC. (2) just happened here | help: and (1) occurred earlier here - --> $DIR/atomic_write_na_write_race2.rs:LL:CC + --> tests/fail/data_race/atomic_write_na_write_race2.rs:LL:CC | LL | atomic_ref.store(64, Ordering::SeqCst); | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ = 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 = note: BACKTRACE (of the first span) on thread `unnamed-ID`: - = note: inside closure at $DIR/atomic_write_na_write_race2.rs:LL:CC + = note: inside closure at tests/fail/data_race/atomic_write_na_write_race2.rs:LL:CC note: some details are omitted, run with `MIRIFLAGS=-Zmiri-backtrace=full` for a verbose backtrace diff --git a/tests/fail/data_race/dangling_thread_async_race.stderr b/tests/fail/data_race/dangling_thread_async_race.stderr index 1b02880b99..1051a1c51f 100644 --- a/tests/fail/data_race/dangling_thread_async_race.stderr +++ b/tests/fail/data_race/dangling_thread_async_race.stderr @@ -1,18 +1,18 @@ error: Undefined Behavior: Data race detected between (1) non-atomic write on thread `unnamed-ID` and (2) non-atomic write on thread `unnamed-ID` at ALLOC. (2) just happened here - --> $DIR/dangling_thread_async_race.rs:LL:CC + --> tests/fail/data_race/dangling_thread_async_race.rs:LL:CC | LL | *c.0 = 64; | ^^^^^^^^^ Data race detected between (1) non-atomic write on thread `unnamed-ID` and (2) non-atomic write on thread `unnamed-ID` at ALLOC. (2) just happened here | help: and (1) occurred earlier here - --> $DIR/dangling_thread_async_race.rs:LL:CC + --> tests/fail/data_race/dangling_thread_async_race.rs:LL:CC | LL | *c.0 = 32; | ^^^^^^^^^ = 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 = note: BACKTRACE (of the first span) on thread `unnamed-ID`: - = note: inside closure at $DIR/dangling_thread_async_race.rs:LL:CC + = note: inside closure at tests/fail/data_race/dangling_thread_async_race.rs:LL:CC note: some details are omitted, run with `MIRIFLAGS=-Zmiri-backtrace=full` for a verbose backtrace diff --git a/tests/fail/data_race/dangling_thread_race.stderr b/tests/fail/data_race/dangling_thread_race.stderr index 7f6ba5ee04..23a99ff6c8 100644 --- a/tests/fail/data_race/dangling_thread_race.stderr +++ b/tests/fail/data_race/dangling_thread_race.stderr @@ -1,18 +1,18 @@ error: Undefined Behavior: Data race detected between (1) non-atomic write on thread `unnamed-ID` and (2) non-atomic write on thread `main` at ALLOC. (2) just happened here - --> $DIR/dangling_thread_race.rs:LL:CC + --> tests/fail/data_race/dangling_thread_race.rs:LL:CC | LL | *c.0 = 64; | ^^^^^^^^^ Data race detected between (1) non-atomic write on thread `unnamed-ID` and (2) non-atomic write on thread `main` at ALLOC. (2) just happened here | help: and (1) occurred earlier here - --> $DIR/dangling_thread_race.rs:LL:CC + --> tests/fail/data_race/dangling_thread_race.rs:LL:CC | LL | *c.0 = 32; | ^^^^^^^^^ = 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 = note: BACKTRACE (of the first span): - = note: inside `main` at $DIR/dangling_thread_race.rs:LL:CC + = note: inside `main` at tests/fail/data_race/dangling_thread_race.rs:LL:CC note: some details are omitted, run with `MIRIFLAGS=-Zmiri-backtrace=full` for a verbose backtrace diff --git a/tests/fail/data_race/dealloc_read_race1.stderr b/tests/fail/data_race/dealloc_read_race1.stderr index a4a22a8d71..8eb4ebbcf7 100644 --- a/tests/fail/data_race/dealloc_read_race1.stderr +++ b/tests/fail/data_race/dealloc_read_race1.stderr @@ -1,5 +1,5 @@ error: Undefined Behavior: Data race detected between (1) non-atomic read on thread `unnamed-ID` and (2) deallocation on thread `unnamed-ID` at ALLOC. (2) just happened here - --> $DIR/dealloc_read_race1.rs:LL:CC + --> tests/fail/data_race/dealloc_read_race1.rs:LL:CC | LL | / __rust_dealloc( LL | | @@ -10,14 +10,14 @@ LL | | ); | |_____________^ Data race detected between (1) non-atomic read on thread `unnamed-ID` and (2) deallocation on thread `unnamed-ID` at ALLOC. (2) just happened here | help: and (1) occurred earlier here - --> $DIR/dealloc_read_race1.rs:LL:CC + --> tests/fail/data_race/dealloc_read_race1.rs:LL:CC | LL | let _val = *ptr.0; | ^^^^^^ = 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 = note: BACKTRACE (of the first span) on thread `unnamed-ID`: - = note: inside closure at $DIR/dealloc_read_race1.rs:LL:CC + = note: inside closure at tests/fail/data_race/dealloc_read_race1.rs:LL:CC note: some details are omitted, run with `MIRIFLAGS=-Zmiri-backtrace=full` for a verbose backtrace diff --git a/tests/fail/data_race/dealloc_read_race2.stderr b/tests/fail/data_race/dealloc_read_race2.stderr index dbf9acd23b..1a2b048572 100644 --- a/tests/fail/data_race/dealloc_read_race2.stderr +++ b/tests/fail/data_race/dealloc_read_race2.stderr @@ -1,5 +1,5 @@ error: Undefined Behavior: memory access failed: ALLOC has been freed, so this pointer is dangling - --> $DIR/dealloc_read_race2.rs:LL:CC + --> tests/fail/data_race/dealloc_read_race2.rs:LL:CC | LL | *ptr.0 | ^^^^^^ memory access failed: ALLOC has been freed, so this pointer is dangling @@ -7,12 +7,12 @@ LL | *ptr.0 = 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 help: ALLOC was allocated here: - --> $DIR/dealloc_read_race2.rs:LL:CC + --> tests/fail/data_race/dealloc_read_race2.rs:LL:CC | LL | let pointer: *mut usize = Box::into_raw(Box::new(0usize)); | ^^^^^^^^^^^^^^^^ help: ALLOC was deallocated here: - --> $DIR/dealloc_read_race2.rs:LL:CC + --> tests/fail/data_race/dealloc_read_race2.rs:LL:CC | LL | / __rust_dealloc( LL | | ptr.0 as *mut _, @@ -21,7 +21,7 @@ LL | | std::mem::align_of::(), LL | | ) | |_____________^ = note: BACKTRACE (of the first span) on thread `unnamed-ID`: - = note: inside closure at $DIR/dealloc_read_race2.rs:LL:CC + = note: inside closure at tests/fail/data_race/dealloc_read_race2.rs:LL:CC note: some details are omitted, run with `MIRIFLAGS=-Zmiri-backtrace=full` for a verbose backtrace diff --git a/tests/fail/data_race/dealloc_read_race_stack.stderr b/tests/fail/data_race/dealloc_read_race_stack.stderr index e36376d0c7..ce9719b1d4 100644 --- a/tests/fail/data_race/dealloc_read_race_stack.stderr +++ b/tests/fail/data_race/dealloc_read_race_stack.stderr @@ -1,18 +1,18 @@ error: Undefined Behavior: Data race detected between (1) non-atomic read on thread `unnamed-ID` and (2) deallocation on thread `unnamed-ID` at ALLOC. (2) just happened here - --> $DIR/dealloc_read_race_stack.rs:LL:CC + --> tests/fail/data_race/dealloc_read_race_stack.rs:LL:CC | LL | } | ^ Data race detected between (1) non-atomic read on thread `unnamed-ID` and (2) deallocation on thread `unnamed-ID` at ALLOC. (2) just happened here | help: and (1) occurred earlier here - --> $DIR/dealloc_read_race_stack.rs:LL:CC + --> tests/fail/data_race/dealloc_read_race_stack.rs:LL:CC | LL | *pointer.load(Ordering::Acquire) | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ = 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 = note: BACKTRACE (of the first span) on thread `unnamed-ID`: - = note: inside closure at $DIR/dealloc_read_race_stack.rs:LL:CC + = note: inside closure at tests/fail/data_race/dealloc_read_race_stack.rs:LL:CC note: some details are omitted, run with `MIRIFLAGS=-Zmiri-backtrace=full` for a verbose backtrace diff --git a/tests/fail/data_race/dealloc_write_race1.stderr b/tests/fail/data_race/dealloc_write_race1.stderr index 0c6cd9bbd9..48d974241a 100644 --- a/tests/fail/data_race/dealloc_write_race1.stderr +++ b/tests/fail/data_race/dealloc_write_race1.stderr @@ -1,5 +1,5 @@ error: Undefined Behavior: Data race detected between (1) non-atomic write on thread `unnamed-ID` and (2) deallocation on thread `unnamed-ID` at ALLOC. (2) just happened here - --> $DIR/dealloc_write_race1.rs:LL:CC + --> tests/fail/data_race/dealloc_write_race1.rs:LL:CC | LL | / __rust_dealloc( LL | | @@ -10,14 +10,14 @@ LL | | ); | |_____________^ Data race detected between (1) non-atomic write on thread `unnamed-ID` and (2) deallocation on thread `unnamed-ID` at ALLOC. (2) just happened here | help: and (1) occurred earlier here - --> $DIR/dealloc_write_race1.rs:LL:CC + --> tests/fail/data_race/dealloc_write_race1.rs:LL:CC | LL | *ptr.0 = 2; | ^^^^^^^^^^ = 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 = note: BACKTRACE (of the first span) on thread `unnamed-ID`: - = note: inside closure at $DIR/dealloc_write_race1.rs:LL:CC + = note: inside closure at tests/fail/data_race/dealloc_write_race1.rs:LL:CC note: some details are omitted, run with `MIRIFLAGS=-Zmiri-backtrace=full` for a verbose backtrace diff --git a/tests/fail/data_race/dealloc_write_race2.stderr b/tests/fail/data_race/dealloc_write_race2.stderr index 3009373531..077d458826 100644 --- a/tests/fail/data_race/dealloc_write_race2.stderr +++ b/tests/fail/data_race/dealloc_write_race2.stderr @@ -1,5 +1,5 @@ error: Undefined Behavior: memory access failed: ALLOC has been freed, so this pointer is dangling - --> $DIR/dealloc_write_race2.rs:LL:CC + --> tests/fail/data_race/dealloc_write_race2.rs:LL:CC | LL | *ptr.0 = 2; | ^^^^^^^^^^ memory access failed: ALLOC has been freed, so this pointer is dangling @@ -7,12 +7,12 @@ LL | *ptr.0 = 2; = 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 help: ALLOC was allocated here: - --> $DIR/dealloc_write_race2.rs:LL:CC + --> tests/fail/data_race/dealloc_write_race2.rs:LL:CC | LL | let pointer: *mut usize = Box::into_raw(Box::new(0usize)); | ^^^^^^^^^^^^^^^^ help: ALLOC was deallocated here: - --> $DIR/dealloc_write_race2.rs:LL:CC + --> tests/fail/data_race/dealloc_write_race2.rs:LL:CC | LL | / __rust_dealloc( LL | | ptr.0 as *mut _, @@ -21,7 +21,7 @@ LL | | std::mem::align_of::(), LL | | ); | |_____________^ = note: BACKTRACE (of the first span) on thread `unnamed-ID`: - = note: inside closure at $DIR/dealloc_write_race2.rs:LL:CC + = note: inside closure at tests/fail/data_race/dealloc_write_race2.rs:LL:CC note: some details are omitted, run with `MIRIFLAGS=-Zmiri-backtrace=full` for a verbose backtrace diff --git a/tests/fail/data_race/dealloc_write_race_stack.stderr b/tests/fail/data_race/dealloc_write_race_stack.stderr index 4c16162fa1..2b531b6440 100644 --- a/tests/fail/data_race/dealloc_write_race_stack.stderr +++ b/tests/fail/data_race/dealloc_write_race_stack.stderr @@ -1,18 +1,18 @@ error: Undefined Behavior: Data race detected between (1) non-atomic write on thread `unnamed-ID` and (2) deallocation on thread `unnamed-ID` at ALLOC. (2) just happened here - --> $DIR/dealloc_write_race_stack.rs:LL:CC + --> tests/fail/data_race/dealloc_write_race_stack.rs:LL:CC | LL | } | ^ Data race detected between (1) non-atomic write on thread `unnamed-ID` and (2) deallocation on thread `unnamed-ID` at ALLOC. (2) just happened here | help: and (1) occurred earlier here - --> $DIR/dealloc_write_race_stack.rs:LL:CC + --> tests/fail/data_race/dealloc_write_race_stack.rs:LL:CC | LL | *pointer.load(Ordering::Acquire) = 3; | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ = 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 = note: BACKTRACE (of the first span) on thread `unnamed-ID`: - = note: inside closure at $DIR/dealloc_write_race_stack.rs:LL:CC + = note: inside closure at tests/fail/data_race/dealloc_write_race_stack.rs:LL:CC note: some details are omitted, run with `MIRIFLAGS=-Zmiri-backtrace=full` for a verbose backtrace diff --git a/tests/fail/data_race/enable_after_join_to_main.stderr b/tests/fail/data_race/enable_after_join_to_main.stderr index 686d9b48e5..5d5d1c8cc6 100644 --- a/tests/fail/data_race/enable_after_join_to_main.stderr +++ b/tests/fail/data_race/enable_after_join_to_main.stderr @@ -1,18 +1,18 @@ error: Undefined Behavior: Data race detected between (1) non-atomic write on thread `unnamed-ID` and (2) non-atomic write on thread `unnamed-ID` at ALLOC. (2) just happened here - --> $DIR/enable_after_join_to_main.rs:LL:CC + --> tests/fail/data_race/enable_after_join_to_main.rs:LL:CC | LL | *c.0 = 64; | ^^^^^^^^^ Data race detected between (1) non-atomic write on thread `unnamed-ID` and (2) non-atomic write on thread `unnamed-ID` at ALLOC. (2) just happened here | help: and (1) occurred earlier here - --> $DIR/enable_after_join_to_main.rs:LL:CC + --> tests/fail/data_race/enable_after_join_to_main.rs:LL:CC | LL | *c.0 = 32; | ^^^^^^^^^ = 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 = note: BACKTRACE (of the first span) on thread `unnamed-ID`: - = note: inside closure at $DIR/enable_after_join_to_main.rs:LL:CC + = note: inside closure at tests/fail/data_race/enable_after_join_to_main.rs:LL:CC note: some details are omitted, run with `MIRIFLAGS=-Zmiri-backtrace=full` for a verbose backtrace diff --git a/tests/fail/data_race/fence_after_load.stderr b/tests/fail/data_race/fence_after_load.stderr index 776cf7c17b..03b3c6f8f0 100644 --- a/tests/fail/data_race/fence_after_load.stderr +++ b/tests/fail/data_race/fence_after_load.stderr @@ -1,18 +1,18 @@ error: Undefined Behavior: Data race detected between (1) non-atomic write on thread `unnamed-ID` and (2) non-atomic write on thread `main` at ALLOC. (2) just happened here - --> $DIR/fence_after_load.rs:LL:CC + --> tests/fail/data_race/fence_after_load.rs:LL:CC | LL | unsafe { V = 2 } | ^^^^^ Data race detected between (1) non-atomic write on thread `unnamed-ID` and (2) non-atomic write on thread `main` at ALLOC. (2) just happened here | help: and (1) occurred earlier here - --> $DIR/fence_after_load.rs:LL:CC + --> tests/fail/data_race/fence_after_load.rs:LL:CC | LL | unsafe { V = 1 } | ^^^^^ = 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 = note: BACKTRACE (of the first span): - = note: inside `main` at $DIR/fence_after_load.rs:LL:CC + = note: inside `main` at tests/fail/data_race/fence_after_load.rs:LL:CC note: some details are omitted, run with `MIRIFLAGS=-Zmiri-backtrace=full` for a verbose backtrace diff --git a/tests/fail/data_race/mixed_size_read.stderr b/tests/fail/data_race/mixed_size_read.stderr index 5b25c666f4..31a798a89b 100644 --- a/tests/fail/data_race/mixed_size_read.stderr +++ b/tests/fail/data_race/mixed_size_read.stderr @@ -1,11 +1,11 @@ error: Undefined Behavior: Race condition detected between (1) 2-byte atomic load on thread `unnamed-ID` and (2) 1-byte atomic load on thread `unnamed-ID` at ALLOC. (2) just happened here - --> $DIR/mixed_size_read.rs:LL:CC + --> tests/fail/data_race/mixed_size_read.rs:LL:CC | LL | a8[0].load(Ordering::SeqCst); | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ Race condition detected between (1) 2-byte atomic load on thread `unnamed-ID` and (2) 1-byte atomic load on thread `unnamed-ID` at ALLOC. (2) just happened here | help: and (1) occurred earlier here - --> $DIR/mixed_size_read.rs:LL:CC + --> tests/fail/data_race/mixed_size_read.rs:LL:CC | LL | a16.load(Ordering::SeqCst); | ^^^^^^^^^^^^^^^^^^^^^^^^^^ @@ -14,7 +14,7 @@ LL | a16.load(Ordering::SeqCst); = 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 = note: BACKTRACE (of the first span) on thread `unnamed-ID`: - = note: inside closure at $DIR/mixed_size_read.rs:LL:CC + = note: inside closure at tests/fail/data_race/mixed_size_read.rs:LL:CC note: some details are omitted, run with `MIRIFLAGS=-Zmiri-backtrace=full` for a verbose backtrace diff --git a/tests/fail/data_race/mixed_size_write.stderr b/tests/fail/data_race/mixed_size_write.stderr index c6157b87b3..c30b48c1f3 100644 --- a/tests/fail/data_race/mixed_size_write.stderr +++ b/tests/fail/data_race/mixed_size_write.stderr @@ -1,11 +1,11 @@ error: Undefined Behavior: Race condition detected between (1) 2-byte atomic store on thread `unnamed-ID` and (2) 1-byte atomic store on thread `unnamed-ID` at ALLOC. (2) just happened here - --> $DIR/mixed_size_write.rs:LL:CC + --> tests/fail/data_race/mixed_size_write.rs:LL:CC | LL | a8[0].store(1, Ordering::SeqCst); | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ Race condition detected between (1) 2-byte atomic store on thread `unnamed-ID` and (2) 1-byte atomic store on thread `unnamed-ID` at ALLOC. (2) just happened here | help: and (1) occurred earlier here - --> $DIR/mixed_size_write.rs:LL:CC + --> tests/fail/data_race/mixed_size_write.rs:LL:CC | LL | a16.store(1, Ordering::SeqCst); | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ @@ -14,7 +14,7 @@ LL | a16.store(1, Ordering::SeqCst); = 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 = note: BACKTRACE (of the first span) on thread `unnamed-ID`: - = note: inside closure at $DIR/mixed_size_write.rs:LL:CC + = note: inside closure at tests/fail/data_race/mixed_size_write.rs:LL:CC note: some details are omitted, run with `MIRIFLAGS=-Zmiri-backtrace=full` for a verbose backtrace diff --git a/tests/fail/data_race/read_read_race1.stderr b/tests/fail/data_race/read_read_race1.stderr index 37ef46335d..e97c4a4fdc 100644 --- a/tests/fail/data_race/read_read_race1.stderr +++ b/tests/fail/data_race/read_read_race1.stderr @@ -1,11 +1,11 @@ error: Undefined Behavior: Data race detected between (1) non-atomic read on thread `unnamed-ID` and (2) atomic load on thread `unnamed-ID` at ALLOC. (2) just happened here - --> $DIR/read_read_race1.rs:LL:CC + --> tests/fail/data_race/read_read_race1.rs:LL:CC | LL | a.load(Ordering::SeqCst); | ^^^^^^^^^^^^^^^^^^^^^^^^ Data race detected between (1) non-atomic read on thread `unnamed-ID` and (2) atomic load on thread `unnamed-ID` at ALLOC. (2) just happened here | help: and (1) occurred earlier here - --> $DIR/read_read_race1.rs:LL:CC + --> tests/fail/data_race/read_read_race1.rs:LL:CC | LL | unsafe { ptr.read() }; | ^^^^^^^^^^ @@ -14,7 +14,7 @@ LL | unsafe { ptr.read() }; = 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 = note: BACKTRACE (of the first span) on thread `unnamed-ID`: - = note: inside closure at $DIR/read_read_race1.rs:LL:CC + = note: inside closure at tests/fail/data_race/read_read_race1.rs:LL:CC note: some details are omitted, run with `MIRIFLAGS=-Zmiri-backtrace=full` for a verbose backtrace diff --git a/tests/fail/data_race/read_read_race2.stderr b/tests/fail/data_race/read_read_race2.stderr index e0cabf62a2..d64032db7b 100644 --- a/tests/fail/data_race/read_read_race2.stderr +++ b/tests/fail/data_race/read_read_race2.stderr @@ -1,11 +1,11 @@ error: Undefined Behavior: Data race detected between (1) atomic load on thread `unnamed-ID` and (2) non-atomic read on thread `unnamed-ID` at ALLOC. (2) just happened here - --> $DIR/read_read_race2.rs:LL:CC + --> tests/fail/data_race/read_read_race2.rs:LL:CC | LL | unsafe { ptr.read() }; | ^^^^^^^^^^ Data race detected between (1) atomic load on thread `unnamed-ID` and (2) non-atomic read on thread `unnamed-ID` at ALLOC. (2) just happened here | help: and (1) occurred earlier here - --> $DIR/read_read_race2.rs:LL:CC + --> tests/fail/data_race/read_read_race2.rs:LL:CC | LL | a.load(Ordering::SeqCst); | ^^^^^^^^^^^^^^^^^^^^^^^^ @@ -14,7 +14,7 @@ LL | a.load(Ordering::SeqCst); = 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 = note: BACKTRACE (of the first span) on thread `unnamed-ID`: - = note: inside closure at $DIR/read_read_race2.rs:LL:CC + = note: inside closure at tests/fail/data_race/read_read_race2.rs:LL:CC note: some details are omitted, run with `MIRIFLAGS=-Zmiri-backtrace=full` for a verbose backtrace diff --git a/tests/fail/data_race/read_write_race.stderr b/tests/fail/data_race/read_write_race.stderr index 8558db4bfd..eac5a0c8a6 100644 --- a/tests/fail/data_race/read_write_race.stderr +++ b/tests/fail/data_race/read_write_race.stderr @@ -1,18 +1,18 @@ error: Undefined Behavior: Data race detected between (1) non-atomic read on thread `unnamed-ID` and (2) non-atomic write on thread `unnamed-ID` at ALLOC. (2) just happened here - --> $DIR/read_write_race.rs:LL:CC + --> tests/fail/data_race/read_write_race.rs:LL:CC | LL | *c.0 = 64; | ^^^^^^^^^ Data race detected between (1) non-atomic read on thread `unnamed-ID` and (2) non-atomic write on thread `unnamed-ID` at ALLOC. (2) just happened here | help: and (1) occurred earlier here - --> $DIR/read_write_race.rs:LL:CC + --> tests/fail/data_race/read_write_race.rs:LL:CC | LL | let _val = *c.0; | ^^^^ = 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 = note: BACKTRACE (of the first span) on thread `unnamed-ID`: - = note: inside closure at $DIR/read_write_race.rs:LL:CC + = note: inside closure at tests/fail/data_race/read_write_race.rs:LL:CC note: some details are omitted, run with `MIRIFLAGS=-Zmiri-backtrace=full` for a verbose backtrace diff --git a/tests/fail/data_race/read_write_race_stack.stderr b/tests/fail/data_race/read_write_race_stack.stderr index 7ca249a917..9af78bc79a 100644 --- a/tests/fail/data_race/read_write_race_stack.stderr +++ b/tests/fail/data_race/read_write_race_stack.stderr @@ -1,18 +1,18 @@ error: Undefined Behavior: Data race detected between (1) non-atomic write on thread `unnamed-ID` and (2) non-atomic read on thread `unnamed-ID` at ALLOC. (2) just happened here - --> $DIR/read_write_race_stack.rs:LL:CC + --> tests/fail/data_race/read_write_race_stack.rs:LL:CC | LL | stack_var | ^^^^^^^^^ Data race detected between (1) non-atomic write on thread `unnamed-ID` and (2) non-atomic read on thread `unnamed-ID` at ALLOC. (2) just happened here | help: and (1) occurred earlier here - --> $DIR/read_write_race_stack.rs:LL:CC + --> tests/fail/data_race/read_write_race_stack.rs:LL:CC | LL | *pointer.load(Ordering::Acquire) = 3; | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ = 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 = note: BACKTRACE (of the first span) on thread `unnamed-ID`: - = note: inside closure at $DIR/read_write_race_stack.rs:LL:CC + = note: inside closure at tests/fail/data_race/read_write_race_stack.rs:LL:CC note: some details are omitted, run with `MIRIFLAGS=-Zmiri-backtrace=full` for a verbose backtrace diff --git a/tests/fail/data_race/relax_acquire_race.stderr b/tests/fail/data_race/relax_acquire_race.stderr index b5e6895302..a358d8da36 100644 --- a/tests/fail/data_race/relax_acquire_race.stderr +++ b/tests/fail/data_race/relax_acquire_race.stderr @@ -1,18 +1,18 @@ error: Undefined Behavior: Data race detected between (1) non-atomic write on thread `unnamed-ID` and (2) non-atomic read on thread `unnamed-ID` at ALLOC. (2) just happened here - --> $DIR/relax_acquire_race.rs:LL:CC + --> tests/fail/data_race/relax_acquire_race.rs:LL:CC | LL | *c.0 | ^^^^ Data race detected between (1) non-atomic write on thread `unnamed-ID` and (2) non-atomic read on thread `unnamed-ID` at ALLOC. (2) just happened here | help: and (1) occurred earlier here - --> $DIR/relax_acquire_race.rs:LL:CC + --> tests/fail/data_race/relax_acquire_race.rs:LL:CC | LL | *c.0 = 1; | ^^^^^^^^ = 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 = note: BACKTRACE (of the first span) on thread `unnamed-ID`: - = note: inside closure at $DIR/relax_acquire_race.rs:LL:CC + = note: inside closure at tests/fail/data_race/relax_acquire_race.rs:LL:CC note: some details are omitted, run with `MIRIFLAGS=-Zmiri-backtrace=full` for a verbose backtrace diff --git a/tests/fail/data_race/release_seq_race.stderr b/tests/fail/data_race/release_seq_race.stderr index e031c55ecb..f47e463dd6 100644 --- a/tests/fail/data_race/release_seq_race.stderr +++ b/tests/fail/data_race/release_seq_race.stderr @@ -1,18 +1,18 @@ error: Undefined Behavior: Data race detected between (1) non-atomic write on thread `unnamed-ID` and (2) non-atomic read on thread `unnamed-ID` at ALLOC. (2) just happened here - --> $DIR/release_seq_race.rs:LL:CC + --> tests/fail/data_race/release_seq_race.rs:LL:CC | LL | *c.0 | ^^^^ Data race detected between (1) non-atomic write on thread `unnamed-ID` and (2) non-atomic read on thread `unnamed-ID` at ALLOC. (2) just happened here | help: and (1) occurred earlier here - --> $DIR/release_seq_race.rs:LL:CC + --> tests/fail/data_race/release_seq_race.rs:LL:CC | LL | *c.0 = 1; | ^^^^^^^^ = 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 = note: BACKTRACE (of the first span) on thread `unnamed-ID`: - = note: inside closure at $DIR/release_seq_race.rs:LL:CC + = note: inside closure at tests/fail/data_race/release_seq_race.rs:LL:CC note: some details are omitted, run with `MIRIFLAGS=-Zmiri-backtrace=full` for a verbose backtrace diff --git a/tests/fail/data_race/release_seq_race_same_thread.stderr b/tests/fail/data_race/release_seq_race_same_thread.stderr index 86183e1e43..2d26d4cf68 100644 --- a/tests/fail/data_race/release_seq_race_same_thread.stderr +++ b/tests/fail/data_race/release_seq_race_same_thread.stderr @@ -1,18 +1,18 @@ error: Undefined Behavior: Data race detected between (1) non-atomic write on thread `unnamed-ID` and (2) non-atomic read on thread `unnamed-ID` at ALLOC. (2) just happened here - --> $DIR/release_seq_race_same_thread.rs:LL:CC + --> tests/fail/data_race/release_seq_race_same_thread.rs:LL:CC | LL | *c.0 | ^^^^ Data race detected between (1) non-atomic write on thread `unnamed-ID` and (2) non-atomic read on thread `unnamed-ID` at ALLOC. (2) just happened here | help: and (1) occurred earlier here - --> $DIR/release_seq_race_same_thread.rs:LL:CC + --> tests/fail/data_race/release_seq_race_same_thread.rs:LL:CC | LL | *c.0 = 1; | ^^^^^^^^ = 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 = note: BACKTRACE (of the first span) on thread `unnamed-ID`: - = note: inside closure at $DIR/release_seq_race_same_thread.rs:LL:CC + = note: inside closure at tests/fail/data_race/release_seq_race_same_thread.rs:LL:CC note: some details are omitted, run with `MIRIFLAGS=-Zmiri-backtrace=full` for a verbose backtrace diff --git a/tests/fail/data_race/rmw_race.stderr b/tests/fail/data_race/rmw_race.stderr index 2aa27cc8c7..4a991db32d 100644 --- a/tests/fail/data_race/rmw_race.stderr +++ b/tests/fail/data_race/rmw_race.stderr @@ -1,18 +1,18 @@ error: Undefined Behavior: Data race detected between (1) non-atomic write on thread `unnamed-ID` and (2) non-atomic read on thread `unnamed-ID` at ALLOC. (2) just happened here - --> $DIR/rmw_race.rs:LL:CC + --> tests/fail/data_race/rmw_race.rs:LL:CC | LL | *c.0 | ^^^^ Data race detected between (1) non-atomic write on thread `unnamed-ID` and (2) non-atomic read on thread `unnamed-ID` at ALLOC. (2) just happened here | help: and (1) occurred earlier here - --> $DIR/rmw_race.rs:LL:CC + --> tests/fail/data_race/rmw_race.rs:LL:CC | LL | *c.0 = 1; | ^^^^^^^^ = 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 = note: BACKTRACE (of the first span) on thread `unnamed-ID`: - = note: inside closure at $DIR/rmw_race.rs:LL:CC + = note: inside closure at tests/fail/data_race/rmw_race.rs:LL:CC note: some details are omitted, run with `MIRIFLAGS=-Zmiri-backtrace=full` for a verbose backtrace diff --git a/tests/fail/data_race/stack_pop_race.stderr b/tests/fail/data_race/stack_pop_race.stderr index 683acc1abd..643426aba9 100644 --- a/tests/fail/data_race/stack_pop_race.stderr +++ b/tests/fail/data_race/stack_pop_race.stderr @@ -1,20 +1,20 @@ error: Undefined Behavior: Data race detected between (1) non-atomic read on thread `unnamed-ID` and (2) deallocation on thread `main` at ALLOC. (2) just happened here - --> $DIR/stack_pop_race.rs:LL:CC + --> tests/fail/data_race/stack_pop_race.rs:LL:CC | LL | } | ^ Data race detected between (1) non-atomic read on thread `unnamed-ID` and (2) deallocation on thread `main` at ALLOC. (2) just happened here | help: and (1) occurred earlier here - --> $DIR/stack_pop_race.rs:LL:CC + --> tests/fail/data_race/stack_pop_race.rs:LL:CC | LL | let _val = unsafe { *ptr.0 }; | ^^^^^^ = 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 = note: BACKTRACE (of the first span): - = note: inside `race` at $DIR/stack_pop_race.rs:LL:CC + = note: inside `race` at tests/fail/data_race/stack_pop_race.rs:LL:CC note: inside `main` - --> $DIR/stack_pop_race.rs:LL:CC + --> tests/fail/data_race/stack_pop_race.rs:LL:CC | LL | race(0); | ^^^^^^^ diff --git a/tests/fail/data_race/write_write_race.stderr b/tests/fail/data_race/write_write_race.stderr index 37b758ab2a..2ea54421b8 100644 --- a/tests/fail/data_race/write_write_race.stderr +++ b/tests/fail/data_race/write_write_race.stderr @@ -1,18 +1,18 @@ error: Undefined Behavior: Data race detected between (1) non-atomic write on thread `unnamed-ID` and (2) non-atomic write on thread `unnamed-ID` at ALLOC. (2) just happened here - --> $DIR/write_write_race.rs:LL:CC + --> tests/fail/data_race/write_write_race.rs:LL:CC | LL | *c.0 = 64; | ^^^^^^^^^ Data race detected between (1) non-atomic write on thread `unnamed-ID` and (2) non-atomic write on thread `unnamed-ID` at ALLOC. (2) just happened here | help: and (1) occurred earlier here - --> $DIR/write_write_race.rs:LL:CC + --> tests/fail/data_race/write_write_race.rs:LL:CC | LL | *c.0 = 32; | ^^^^^^^^^ = 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 = note: BACKTRACE (of the first span) on thread `unnamed-ID`: - = note: inside closure at $DIR/write_write_race.rs:LL:CC + = note: inside closure at tests/fail/data_race/write_write_race.rs:LL:CC note: some details are omitted, run with `MIRIFLAGS=-Zmiri-backtrace=full` for a verbose backtrace diff --git a/tests/fail/data_race/write_write_race_stack.stderr b/tests/fail/data_race/write_write_race_stack.stderr index 2503a4f4ba..0cd9de1131 100644 --- a/tests/fail/data_race/write_write_race_stack.stderr +++ b/tests/fail/data_race/write_write_race_stack.stderr @@ -1,18 +1,18 @@ error: Undefined Behavior: Data race detected between (1) non-atomic write on thread `unnamed-ID` and (2) non-atomic write on thread `unnamed-ID` at ALLOC. (2) just happened here - --> $DIR/write_write_race_stack.rs:LL:CC + --> tests/fail/data_race/write_write_race_stack.rs:LL:CC | LL | stack_var = 1usize; | ^^^^^^^^^^^^^^^^^^ Data race detected between (1) non-atomic write on thread `unnamed-ID` and (2) non-atomic write on thread `unnamed-ID` at ALLOC. (2) just happened here | help: and (1) occurred earlier here - --> $DIR/write_write_race_stack.rs:LL:CC + --> tests/fail/data_race/write_write_race_stack.rs:LL:CC | LL | *pointer.load(Ordering::Acquire) = 3; | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ = 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 = note: BACKTRACE (of the first span) on thread `unnamed-ID`: - = note: inside closure at $DIR/write_write_race_stack.rs:LL:CC + = note: inside closure at tests/fail/data_race/write_write_race_stack.rs:LL:CC note: some details are omitted, run with `MIRIFLAGS=-Zmiri-backtrace=full` for a verbose backtrace diff --git a/tests/fail/deny_lint.stderr b/tests/fail/deny_lint.stderr index d1c9b48180..fe96edf934 100644 --- a/tests/fail/deny_lint.stderr +++ b/tests/fail/deny_lint.stderr @@ -1,11 +1,11 @@ error: struct `Foo` is never constructed - --> $DIR/deny_lint.rs:LL:CC + --> tests/fail/deny_lint.rs:LL:CC | LL | struct Foo; | ^^^ | note: the lint level is defined here - --> $DIR/deny_lint.rs:LL:CC + --> tests/fail/deny_lint.rs:LL:CC | LL | #![deny(warnings, unused)] | ^^^^^^ diff --git a/tests/fail/dyn-call-trait-mismatch.stderr b/tests/fail/dyn-call-trait-mismatch.stderr index 019a55bcdc..3680a84fac 100644 --- a/tests/fail/dyn-call-trait-mismatch.stderr +++ b/tests/fail/dyn-call-trait-mismatch.stderr @@ -1,5 +1,5 @@ error: Undefined Behavior: using vtable for trait `T1` but trait `T2` was expected - --> $DIR/dyn-call-trait-mismatch.rs:LL:CC + --> tests/fail/dyn-call-trait-mismatch.rs:LL:CC | LL | r2.method2(); | ^^^^^^^^^^^^ using vtable for trait `T1` but trait `T2` was expected @@ -7,7 +7,7 @@ LL | r2.method2(); = 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 = note: BACKTRACE: - = note: inside `main` at $DIR/dyn-call-trait-mismatch.rs:LL:CC + = note: inside `main` at tests/fail/dyn-call-trait-mismatch.rs:LL:CC note: some details are omitted, run with `MIRIFLAGS=-Zmiri-backtrace=full` for a verbose backtrace diff --git a/tests/fail/dyn-upcast-nop-wrong-trait.stderr b/tests/fail/dyn-upcast-nop-wrong-trait.stderr index 4165d5ea15..54d9d385e9 100644 --- a/tests/fail/dyn-upcast-nop-wrong-trait.stderr +++ b/tests/fail/dyn-upcast-nop-wrong-trait.stderr @@ -1,5 +1,5 @@ error: Undefined Behavior: constructing invalid value: wrong trait in wide pointer vtable: expected `std::fmt::Debug + std::marker::Send + std::marker::Sync`, but encountered `std::fmt::Display` - --> $DIR/dyn-upcast-nop-wrong-trait.rs:LL:CC + --> tests/fail/dyn-upcast-nop-wrong-trait.rs:LL:CC | LL | let ptr: *const (dyn fmt::Debug + Send + Sync) = unsafe { std::mem::transmute(ptr) }; | ^^^^^^^^^^^^^^^^^^^^^^^^ constructing invalid value: wrong trait in wide pointer vtable: expected `std::fmt::Debug + std::marker::Send + std::marker::Sync`, but encountered `std::fmt::Display` @@ -7,7 +7,7 @@ LL | let ptr: *const (dyn fmt::Debug + Send + Sync) = unsafe { std::mem::tra = 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 = note: BACKTRACE: - = note: inside `main` at $DIR/dyn-upcast-nop-wrong-trait.rs:LL:CC + = note: inside `main` at tests/fail/dyn-upcast-nop-wrong-trait.rs:LL:CC note: some details are omitted, run with `MIRIFLAGS=-Zmiri-backtrace=full` for a verbose backtrace diff --git a/tests/fail/dyn-upcast-trait-mismatch.stderr b/tests/fail/dyn-upcast-trait-mismatch.stderr index 87b1361c3e..2129fe66e9 100644 --- a/tests/fail/dyn-upcast-trait-mismatch.stderr +++ b/tests/fail/dyn-upcast-trait-mismatch.stderr @@ -1,5 +1,5 @@ error: Undefined Behavior: using vtable for trait `Baz` but trait `Bar` was expected - --> $DIR/dyn-upcast-trait-mismatch.rs:LL:CC + --> tests/fail/dyn-upcast-trait-mismatch.rs:LL:CC | LL | let _err = baz_fake as *const dyn Foo; | ^^^^^^^^ using vtable for trait `Baz` but trait `Bar` was expected @@ -7,7 +7,7 @@ LL | let _err = baz_fake as *const dyn Foo; = 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 = note: BACKTRACE: - = note: inside `main` at $DIR/dyn-upcast-trait-mismatch.rs:LL:CC + = note: inside `main` at tests/fail/dyn-upcast-trait-mismatch.rs:LL:CC note: some details are omitted, run with `MIRIFLAGS=-Zmiri-backtrace=full` for a verbose backtrace diff --git a/tests/fail/enum-set-discriminant-niche-variant-wrong.stderr b/tests/fail/enum-set-discriminant-niche-variant-wrong.stderr index a48a0a993d..4e2b9c03ea 100644 --- a/tests/fail/enum-set-discriminant-niche-variant-wrong.stderr +++ b/tests/fail/enum-set-discriminant-niche-variant-wrong.stderr @@ -1,5 +1,5 @@ error: Undefined Behavior: trying to set discriminant of a Option> to the niched variant, but the value does not match - --> $DIR/enum-set-discriminant-niche-variant-wrong.rs:LL:CC + --> tests/fail/enum-set-discriminant-niche-variant-wrong.rs:LL:CC | LL | SetDiscriminant(*ptr, 1); | ^^^^^^^^^^^^^^^^^^^^^^^^ trying to set discriminant of a Option> to the niched variant, but the value does not match @@ -7,9 +7,9 @@ LL | SetDiscriminant(*ptr, 1); = 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 = note: BACKTRACE: - = note: inside `set_discriminant` at $DIR/enum-set-discriminant-niche-variant-wrong.rs:LL:CC + = note: inside `set_discriminant` at tests/fail/enum-set-discriminant-niche-variant-wrong.rs:LL:CC note: inside `main` - --> $DIR/enum-set-discriminant-niche-variant-wrong.rs:LL:CC + --> tests/fail/enum-set-discriminant-niche-variant-wrong.rs:LL:CC | LL | set_discriminant(&mut v); | ^^^^^^^^^^^^^^^^^^^^^^^^ diff --git a/tests/fail/environ-gets-deallocated.rs b/tests/fail/environ-gets-deallocated.rs index 5391a9176d..031158072a 100644 --- a/tests/fail/environ-gets-deallocated.rs +++ b/tests/fail/environ-gets-deallocated.rs @@ -1,4 +1,5 @@ -//@ignore-target-windows: Windows does not have a global environ list that the program can access directly +// Windows does not have a global environ list that the program can access directly +//@ignore-target: windows fn get_environ() -> *const *const u8 { extern "C" { diff --git a/tests/fail/environ-gets-deallocated.stderr b/tests/fail/environ-gets-deallocated.stderr index c9bda00493..bb3fe1cec7 100644 --- a/tests/fail/environ-gets-deallocated.stderr +++ b/tests/fail/environ-gets-deallocated.stderr @@ -1,5 +1,5 @@ error: Undefined Behavior: memory access failed: ALLOC has been freed, so this pointer is dangling - --> $DIR/environ-gets-deallocated.rs:LL:CC + --> tests/fail/environ-gets-deallocated.rs:LL:CC | LL | let _y = unsafe { *pointer }; | ^^^^^^^^ memory access failed: ALLOC has been freed, so this pointer is dangling @@ -7,7 +7,7 @@ LL | let _y = unsafe { *pointer }; = 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 = note: BACKTRACE: - = note: inside `main` at $DIR/environ-gets-deallocated.rs:LL:CC + = note: inside `main` at tests/fail/environ-gets-deallocated.rs:LL:CC note: some details are omitted, run with `MIRIFLAGS=-Zmiri-backtrace=full` for a verbose backtrace diff --git a/tests/fail/erroneous_const.stderr b/tests/fail/erroneous_const.stderr index ab036247a3..3528620cb6 100644 --- a/tests/fail/erroneous_const.stderr +++ b/tests/fail/erroneous_const.stderr @@ -1,13 +1,13 @@ error[E0080]: evaluation of `PrintName::::VOID` failed - --> $DIR/erroneous_const.rs:LL:CC + --> tests/fail/erroneous_const.rs:LL:CC | LL | const VOID: ! = panic!(); - | ^^^^^^^^ the evaluated program panicked at 'explicit panic', $DIR/erroneous_const.rs:LL:CC + | ^^^^^^^^ the evaluated program panicked at 'explicit panic', tests/fail/erroneous_const.rs:LL:CC | = note: this error originates in the macro `$crate::panic::panic_2021` which comes from the expansion of the macro `panic` (in Nightly builds, run with -Z macro-backtrace for more info) note: erroneous constant encountered - --> $DIR/erroneous_const.rs:LL:CC + --> tests/fail/erroneous_const.rs:LL:CC | LL | let _ = PrintName::::VOID; | ^^^^^^^^^^^^^^^^^^^^ diff --git a/tests/fail/erroneous_const2.stderr b/tests/fail/erroneous_const2.stderr index 2227436707..76f8cbcd28 100644 --- a/tests/fail/erroneous_const2.stderr +++ b/tests/fail/erroneous_const2.stderr @@ -1,17 +1,17 @@ error[E0080]: evaluation of constant value failed - --> $DIR/erroneous_const2.rs:LL:CC + --> tests/fail/erroneous_const2.rs:LL:CC | LL | const FOO: u32 = [X - Y, Y - X][(X < Y) as usize]; | ^^^^^ attempt to compute `5_u32 - 6_u32`, which would overflow note: erroneous constant encountered - --> $DIR/erroneous_const2.rs:LL:CC + --> tests/fail/erroneous_const2.rs:LL:CC | LL | println!("{}", FOO); | ^^^ note: erroneous constant encountered - --> $DIR/erroneous_const2.rs:LL:CC + --> tests/fail/erroneous_const2.rs:LL:CC | LL | println!("{}", FOO); | ^^^ @@ -19,7 +19,7 @@ LL | println!("{}", FOO); = note: duplicate diagnostic emitted due to `-Z deduplicate-diagnostics=no` note: erroneous constant encountered - --> $DIR/erroneous_const2.rs:LL:CC + --> tests/fail/erroneous_const2.rs:LL:CC | LL | println!("{}", FOO); | ^^^ diff --git a/tests/fail/extern-type-field-offset.stderr b/tests/fail/extern-type-field-offset.stderr index c07b63e0c0..1ed440c7a3 100644 --- a/tests/fail/extern-type-field-offset.stderr +++ b/tests/fail/extern-type-field-offset.stderr @@ -1,5 +1,5 @@ warning: reborrow of reference to `extern type` - --> $DIR/extern-type-field-offset.rs:LL:CC + --> tests/fail/extern-type-field-offset.rs:LL:CC | LL | let x: &Newtype = unsafe { &*(&buf as *const _ as *const Newtype) }; | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ reborrow of a reference to `extern type` is not properly supported @@ -7,17 +7,17 @@ LL | let x: &Newtype = unsafe { &*(&buf as *const _ as *const Newtype) }; = help: `extern type` are not compatible with the Stacked Borrows aliasing model implemented by Miri; Miri may miss bugs in this code = help: try running with `MIRIFLAGS=-Zmiri-tree-borrows` to use the more permissive but also even more experimental Tree Borrows aliasing checks instead = note: BACKTRACE: - = note: inside `main` at $DIR/extern-type-field-offset.rs:LL:CC + = note: inside `main` at tests/fail/extern-type-field-offset.rs:LL:CC error: unsupported operation: `extern type` field does not have a known offset - --> $DIR/extern-type-field-offset.rs:LL:CC + --> tests/fail/extern-type-field-offset.rs:LL:CC | LL | let _field = &x.a; | ^^^^ `extern type` field does not have a known offset | = help: this is likely not a bug in the program; it indicates that the program performed an operation that Miri does not support = note: BACKTRACE: - = note: inside `main` at $DIR/extern-type-field-offset.rs:LL:CC + = note: inside `main` at tests/fail/extern-type-field-offset.rs:LL:CC note: some details are omitted, run with `MIRIFLAGS=-Zmiri-backtrace=full` for a verbose backtrace diff --git a/tests/fail/extern_static.stderr b/tests/fail/extern_static.stderr index c7ab128e2f..c0bedbbcbf 100644 --- a/tests/fail/extern_static.stderr +++ b/tests/fail/extern_static.stderr @@ -1,12 +1,12 @@ error: unsupported operation: extern static `FOO` is not supported by Miri - --> $DIR/extern_static.rs:LL:CC + --> tests/fail/extern_static.rs:LL:CC | LL | let _val = std::ptr::addr_of!(FOO); | ^^^ extern static `FOO` is not supported by Miri | = help: this is likely not a bug in the program; it indicates that the program performed an operation that Miri does not support = note: BACKTRACE: - = note: inside `main` at $DIR/extern_static.rs:LL:CC + = note: inside `main` at tests/fail/extern_static.rs:LL:CC note: some details are omitted, run with `MIRIFLAGS=-Zmiri-backtrace=full` for a verbose backtrace diff --git a/tests/fail/extern_static_in_const.stderr b/tests/fail/extern_static_in_const.stderr index aa524c0646..067a2a2b64 100644 --- a/tests/fail/extern_static_in_const.stderr +++ b/tests/fail/extern_static_in_const.stderr @@ -1,12 +1,12 @@ error: unsupported operation: extern static `E` is not supported by Miri - --> $DIR/extern_static_in_const.rs:LL:CC + --> tests/fail/extern_static_in_const.rs:LL:CC | LL | let _val = X; | ^ extern static `E` is not supported by Miri | = help: this is likely not a bug in the program; it indicates that the program performed an operation that Miri does not support = note: BACKTRACE: - = note: inside `main` at $DIR/extern_static_in_const.rs:LL:CC + = note: inside `main` at tests/fail/extern_static_in_const.rs:LL:CC note: some details are omitted, run with `MIRIFLAGS=-Zmiri-backtrace=full` for a verbose backtrace diff --git a/tests/fail/extern_static_wrong_size.rs b/tests/fail/extern_static_wrong_size.rs index fee3c38c25..d448c0761d 100644 --- a/tests/fail/extern_static_wrong_size.rs +++ b/tests/fail/extern_static_wrong_size.rs @@ -1,4 +1,5 @@ -//@ only-target-linux: we need a specific extern supported on this target +// we need a specific extern supported on this target +//@ only-target: linux //@normalize-stderr-test: "[48] bytes" -> "N bytes" extern "C" { diff --git a/tests/fail/extern_static_wrong_size.stderr b/tests/fail/extern_static_wrong_size.stderr index 3c013a5d15..1af84e2368 100644 --- a/tests/fail/extern_static_wrong_size.stderr +++ b/tests/fail/extern_static_wrong_size.stderr @@ -1,12 +1,12 @@ error: unsupported operation: extern static `environ` has been declared as `extern_static_wrong_size::environ` with a size of 1 bytes and alignment of 1 bytes, but Miri emulates it via an extern static shim with a size of N bytes and alignment of N bytes - --> $DIR/extern_static_wrong_size.rs:LL:CC + --> tests/fail/extern_static_wrong_size.rs:LL:CC | LL | let _val = unsafe { environ }; | ^^^^^^^ extern static `environ` has been declared as `extern_static_wrong_size::environ` with a size of 1 bytes and alignment of 1 bytes, but Miri emulates it via an extern static shim with a size of N bytes and alignment of N bytes | = help: this is likely not a bug in the program; it indicates that the program performed an operation that Miri does not support = note: BACKTRACE: - = note: inside `main` at $DIR/extern_static_wrong_size.rs:LL:CC + = note: inside `main` at tests/fail/extern_static_wrong_size.rs:LL:CC note: some details are omitted, run with `MIRIFLAGS=-Zmiri-backtrace=full` for a verbose backtrace diff --git a/tests/fail/function_calls/arg_inplace_mutate.stack.stderr b/tests/fail/function_calls/arg_inplace_mutate.stack.stderr index 609426bb28..d9ab782986 100644 --- a/tests/fail/function_calls/arg_inplace_mutate.stack.stderr +++ b/tests/fail/function_calls/arg_inplace_mutate.stack.stderr @@ -1,5 +1,5 @@ error: Undefined Behavior: not granting access to tag because that would remove [Unique for ] which is strongly protected - --> $DIR/arg_inplace_mutate.rs:LL:CC + --> tests/fail/function_calls/arg_inplace_mutate.rs:LL:CC | LL | unsafe { ptr.write(S(0)) }; | ^^^^^^^^^^^^^^^ not granting access to tag because that would remove [Unique for ] which is strongly protected @@ -7,7 +7,7 @@ LL | unsafe { ptr.write(S(0)) }; = help: this indicates a potential bug in the program: it performed an invalid operation, but the Stacked Borrows rules it violated are still experimental = help: see https://github.com/rust-lang/unsafe-code-guidelines/blob/master/wip/stacked-borrows.md for further information help: was created by a SharedReadWrite retag at offsets [0x0..0x4] - --> $DIR/arg_inplace_mutate.rs:LL:CC + --> tests/fail/function_calls/arg_inplace_mutate.rs:LL:CC | LL | / mir! { LL | | let _unit: (); @@ -18,14 +18,14 @@ LL | | } LL | | } | |_____^ help: is this argument - --> $DIR/arg_inplace_mutate.rs:LL:CC + --> tests/fail/function_calls/arg_inplace_mutate.rs:LL:CC | LL | unsafe { ptr.write(S(0)) }; | ^^^^^^^^^^^^^^^^^^^^^^^^^^ = note: BACKTRACE (of the first span): - = note: inside `callee` at $DIR/arg_inplace_mutate.rs:LL:CC + = note: inside `callee` at tests/fail/function_calls/arg_inplace_mutate.rs:LL:CC note: inside `main` - --> $DIR/arg_inplace_mutate.rs:LL:CC + --> tests/fail/function_calls/arg_inplace_mutate.rs:LL:CC | LL | Call(_unit = callee(Move(*ptr), ptr), ReturnTo(after_call), UnwindContinue()) | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ diff --git a/tests/fail/function_calls/arg_inplace_mutate.tree.stderr b/tests/fail/function_calls/arg_inplace_mutate.tree.stderr index c187d24e5e..677952b39d 100644 --- a/tests/fail/function_calls/arg_inplace_mutate.tree.stderr +++ b/tests/fail/function_calls/arg_inplace_mutate.tree.stderr @@ -1,5 +1,5 @@ error: Undefined Behavior: write access through (root of the allocation) at ALLOC[0x0] is forbidden - --> $DIR/arg_inplace_mutate.rs:LL:CC + --> tests/fail/function_calls/arg_inplace_mutate.rs:LL:CC | LL | unsafe { ptr.write(S(0)) }; | ^^^^^^^^^^^^^^^ write access through (root of the allocation) at ALLOC[0x0] is forbidden @@ -9,7 +9,7 @@ LL | unsafe { ptr.write(S(0)) }; = help: this foreign write access would cause the protected tag (currently Active) to become Disabled = help: protected tags must never be Disabled help: the accessed tag was created here - --> $DIR/arg_inplace_mutate.rs:LL:CC + --> tests/fail/function_calls/arg_inplace_mutate.rs:LL:CC | LL | / mir! { LL | | let _unit: (); @@ -20,20 +20,20 @@ LL | | } LL | | } | |_____^ help: the protected tag was created here, in the initial state Reserved - --> $DIR/arg_inplace_mutate.rs:LL:CC + --> tests/fail/function_calls/arg_inplace_mutate.rs:LL:CC | LL | unsafe { ptr.write(S(0)) }; | ^^^^^^^^^^^^^^^^^^^^^^^^^^ help: the protected tag later transitioned to Active due to a child write access at offsets [0x0..0x4] - --> $DIR/arg_inplace_mutate.rs:LL:CC + --> tests/fail/function_calls/arg_inplace_mutate.rs:LL:CC | LL | unsafe { ptr.write(S(0)) }; | ^^^^^^^^^^^^^^^^^^^^^^^^^^ = help: this transition corresponds to the first write to a 2-phase borrowed mutable reference = note: BACKTRACE (of the first span): - = note: inside `callee` at $DIR/arg_inplace_mutate.rs:LL:CC + = note: inside `callee` at tests/fail/function_calls/arg_inplace_mutate.rs:LL:CC note: inside `main` - --> $DIR/arg_inplace_mutate.rs:LL:CC + --> tests/fail/function_calls/arg_inplace_mutate.rs:LL:CC | LL | Call(_unit = callee(Move(*ptr), ptr), ReturnTo(after_call), UnwindContinue()) | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ diff --git a/tests/fail/function_calls/arg_inplace_observe_after.stderr b/tests/fail/function_calls/arg_inplace_observe_after.stderr index 2cd9966bbf..7fd71c6084 100644 --- a/tests/fail/function_calls/arg_inplace_observe_after.stderr +++ b/tests/fail/function_calls/arg_inplace_observe_after.stderr @@ -1,5 +1,5 @@ error: Undefined Behavior: using uninitialized data, but this operation requires initialized memory - --> $DIR/arg_inplace_observe_after.rs:LL:CC + --> tests/fail/function_calls/arg_inplace_observe_after.rs:LL:CC | LL | _observe = non_copy.0; | ^^^^^^^^^^^^^^^^^^^^^ using uninitialized data, but this operation requires initialized memory @@ -7,7 +7,7 @@ LL | _observe = non_copy.0; = 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 = note: BACKTRACE: - = note: inside `main` at $DIR/arg_inplace_observe_after.rs:LL:CC + = note: inside `main` at tests/fail/function_calls/arg_inplace_observe_after.rs:LL:CC note: some details are omitted, run with `MIRIFLAGS=-Zmiri-backtrace=full` for a verbose backtrace diff --git a/tests/fail/function_calls/arg_inplace_observe_during.none.stderr b/tests/fail/function_calls/arg_inplace_observe_during.none.stderr index 1c73577f5c..032bbfa8f1 100644 --- a/tests/fail/function_calls/arg_inplace_observe_during.none.stderr +++ b/tests/fail/function_calls/arg_inplace_observe_during.none.stderr @@ -1,5 +1,5 @@ error: Undefined Behavior: using uninitialized data, but this operation requires initialized memory - --> $DIR/arg_inplace_observe_during.rs:LL:CC + --> tests/fail/function_calls/arg_inplace_observe_during.rs:LL:CC | LL | unsafe { ptr.read() }; | ^^^^^^^^^^ using uninitialized data, but this operation requires initialized memory @@ -7,9 +7,9 @@ LL | unsafe { ptr.read() }; = 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 = note: BACKTRACE: - = note: inside `change_arg` at $DIR/arg_inplace_observe_during.rs:LL:CC + = note: inside `change_arg` at tests/fail/function_calls/arg_inplace_observe_during.rs:LL:CC note: inside `main` - --> $DIR/arg_inplace_observe_during.rs:LL:CC + --> tests/fail/function_calls/arg_inplace_observe_during.rs:LL:CC | LL | Call(_unit = change_arg(Move(*ptr), ptr), ReturnTo(after_call), UnwindContinue()) | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ diff --git a/tests/fail/function_calls/arg_inplace_observe_during.stack.stderr b/tests/fail/function_calls/arg_inplace_observe_during.stack.stderr index 68b7c0307c..efdd6129d7 100644 --- a/tests/fail/function_calls/arg_inplace_observe_during.stack.stderr +++ b/tests/fail/function_calls/arg_inplace_observe_during.stack.stderr @@ -1,5 +1,5 @@ error: Undefined Behavior: not granting access to tag because that would remove [Unique for ] which is strongly protected - --> $DIR/arg_inplace_observe_during.rs:LL:CC + --> tests/fail/function_calls/arg_inplace_observe_during.rs:LL:CC | LL | unsafe { ptr.read() }; | ^^^^^^^^^^ not granting access to tag because that would remove [Unique for ] which is strongly protected @@ -7,7 +7,7 @@ LL | unsafe { ptr.read() }; = help: this indicates a potential bug in the program: it performed an invalid operation, but the Stacked Borrows rules it violated are still experimental = help: see https://github.com/rust-lang/unsafe-code-guidelines/blob/master/wip/stacked-borrows.md for further information help: was created by a SharedReadWrite retag at offsets [0x0..0x4] - --> $DIR/arg_inplace_observe_during.rs:LL:CC + --> tests/fail/function_calls/arg_inplace_observe_during.rs:LL:CC | LL | / mir! { LL | | let _unit: (); @@ -18,14 +18,14 @@ LL | | LL | | } | |_____^ help: is this argument - --> $DIR/arg_inplace_observe_during.rs:LL:CC + --> tests/fail/function_calls/arg_inplace_observe_during.rs:LL:CC | LL | x.0 = 0; | ^^^^^^^ = note: BACKTRACE (of the first span): - = note: inside `change_arg` at $DIR/arg_inplace_observe_during.rs:LL:CC + = note: inside `change_arg` at tests/fail/function_calls/arg_inplace_observe_during.rs:LL:CC note: inside `main` - --> $DIR/arg_inplace_observe_during.rs:LL:CC + --> tests/fail/function_calls/arg_inplace_observe_during.rs:LL:CC | LL | Call(_unit = change_arg(Move(*ptr), ptr), ReturnTo(after_call), UnwindContinue()) | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ diff --git a/tests/fail/function_calls/arg_inplace_observe_during.tree.stderr b/tests/fail/function_calls/arg_inplace_observe_during.tree.stderr index 64888cce61..5746ad1e13 100644 --- a/tests/fail/function_calls/arg_inplace_observe_during.tree.stderr +++ b/tests/fail/function_calls/arg_inplace_observe_during.tree.stderr @@ -1,5 +1,5 @@ error: Undefined Behavior: read access through (root of the allocation) at ALLOC[0x0] is forbidden - --> $DIR/arg_inplace_observe_during.rs:LL:CC + --> tests/fail/function_calls/arg_inplace_observe_during.rs:LL:CC | LL | unsafe { ptr.read() }; | ^^^^^^^^^^ read access through (root of the allocation) at ALLOC[0x0] is forbidden @@ -9,7 +9,7 @@ LL | unsafe { ptr.read() }; = help: this foreign read access would cause the protected tag (currently Active) to become Disabled = help: protected tags must never be Disabled help: the accessed tag was created here - --> $DIR/arg_inplace_observe_during.rs:LL:CC + --> tests/fail/function_calls/arg_inplace_observe_during.rs:LL:CC | LL | / mir! { LL | | let _unit: (); @@ -20,20 +20,20 @@ LL | | LL | | } | |_____^ help: the protected tag was created here, in the initial state Reserved - --> $DIR/arg_inplace_observe_during.rs:LL:CC + --> tests/fail/function_calls/arg_inplace_observe_during.rs:LL:CC | LL | x.0 = 0; | ^^^^^^^ help: the protected tag later transitioned to Active due to a child write access at offsets [0x0..0x4] - --> $DIR/arg_inplace_observe_during.rs:LL:CC + --> tests/fail/function_calls/arg_inplace_observe_during.rs:LL:CC | LL | x.0 = 0; | ^^^^^^^ = help: this transition corresponds to the first write to a 2-phase borrowed mutable reference = note: BACKTRACE (of the first span): - = note: inside `change_arg` at $DIR/arg_inplace_observe_during.rs:LL:CC + = note: inside `change_arg` at tests/fail/function_calls/arg_inplace_observe_during.rs:LL:CC note: inside `main` - --> $DIR/arg_inplace_observe_during.rs:LL:CC + --> tests/fail/function_calls/arg_inplace_observe_during.rs:LL:CC | LL | Call(_unit = change_arg(Move(*ptr), ptr), ReturnTo(after_call), UnwindContinue()) | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ diff --git a/tests/fail/function_calls/check_arg_abi.stderr b/tests/fail/function_calls/check_arg_abi.stderr index 2f24425ed1..bf1fbb7721 100644 --- a/tests/fail/function_calls/check_arg_abi.stderr +++ b/tests/fail/function_calls/check_arg_abi.stderr @@ -1,5 +1,5 @@ error: Undefined Behavior: calling a function with ABI C using caller ABI Rust - --> $DIR/check_arg_abi.rs:LL:CC + --> tests/fail/function_calls/check_arg_abi.rs:LL:CC | LL | let _ = malloc(0); | ^^^^^^^^^ calling a function with ABI C using caller ABI Rust @@ -7,7 +7,7 @@ LL | let _ = malloc(0); = 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 = note: BACKTRACE: - = note: inside `main` at $DIR/check_arg_abi.rs:LL:CC + = note: inside `main` at tests/fail/function_calls/check_arg_abi.rs:LL:CC note: some details are omitted, run with `MIRIFLAGS=-Zmiri-backtrace=full` for a verbose backtrace diff --git a/tests/fail/function_calls/check_arg_count_abort.stderr b/tests/fail/function_calls/check_arg_count_abort.stderr index d475801f41..687d0538b3 100644 --- a/tests/fail/function_calls/check_arg_count_abort.stderr +++ b/tests/fail/function_calls/check_arg_count_abort.stderr @@ -1,5 +1,5 @@ error: Undefined Behavior: incorrect number of arguments: got 1, expected 0 - --> $DIR/check_arg_count_abort.rs:LL:CC + --> tests/fail/function_calls/check_arg_count_abort.rs:LL:CC | LL | abort(1); | ^^^^^^^^ incorrect number of arguments: got 1, expected 0 @@ -7,7 +7,7 @@ LL | abort(1); = 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 = note: BACKTRACE: - = note: inside `main` at $DIR/check_arg_count_abort.rs:LL:CC + = note: inside `main` at tests/fail/function_calls/check_arg_count_abort.rs:LL:CC note: some details are omitted, run with `MIRIFLAGS=-Zmiri-backtrace=full` for a verbose backtrace diff --git a/tests/fail/function_calls/check_arg_count_too_few_args.stderr b/tests/fail/function_calls/check_arg_count_too_few_args.stderr index ad952804ec..d778eae64f 100644 --- a/tests/fail/function_calls/check_arg_count_too_few_args.stderr +++ b/tests/fail/function_calls/check_arg_count_too_few_args.stderr @@ -1,5 +1,5 @@ error: Undefined Behavior: incorrect number of arguments: got 0, expected 1 - --> $DIR/check_arg_count_too_few_args.rs:LL:CC + --> tests/fail/function_calls/check_arg_count_too_few_args.rs:LL:CC | LL | let _ = malloc(); | ^^^^^^^^ incorrect number of arguments: got 0, expected 1 @@ -7,7 +7,7 @@ LL | let _ = malloc(); = 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 = note: BACKTRACE: - = note: inside `main` at $DIR/check_arg_count_too_few_args.rs:LL:CC + = note: inside `main` at tests/fail/function_calls/check_arg_count_too_few_args.rs:LL:CC note: some details are omitted, run with `MIRIFLAGS=-Zmiri-backtrace=full` for a verbose backtrace diff --git a/tests/fail/function_calls/check_arg_count_too_many_args.stderr b/tests/fail/function_calls/check_arg_count_too_many_args.stderr index 3b1df8a9d4..dfec2a8628 100644 --- a/tests/fail/function_calls/check_arg_count_too_many_args.stderr +++ b/tests/fail/function_calls/check_arg_count_too_many_args.stderr @@ -1,5 +1,5 @@ error: Undefined Behavior: incorrect number of arguments: got 2, expected 1 - --> $DIR/check_arg_count_too_many_args.rs:LL:CC + --> tests/fail/function_calls/check_arg_count_too_many_args.rs:LL:CC | LL | let _ = malloc(1, 2); | ^^^^^^^^^^^^ incorrect number of arguments: got 2, expected 1 @@ -7,7 +7,7 @@ LL | let _ = malloc(1, 2); = 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 = note: BACKTRACE: - = note: inside `main` at $DIR/check_arg_count_too_many_args.rs:LL:CC + = note: inside `main` at tests/fail/function_calls/check_arg_count_too_many_args.rs:LL:CC note: some details are omitted, run with `MIRIFLAGS=-Zmiri-backtrace=full` for a verbose backtrace diff --git a/tests/fail/function_calls/check_callback_abi.stderr b/tests/fail/function_calls/check_callback_abi.stderr index 890fed09e4..6b0692e1c6 100644 --- a/tests/fail/function_calls/check_callback_abi.stderr +++ b/tests/fail/function_calls/check_callback_abi.stderr @@ -1,5 +1,5 @@ error: Undefined Behavior: calling a function with calling convention C using calling convention Rust - --> $DIR/check_callback_abi.rs:LL:CC + --> tests/fail/function_calls/check_callback_abi.rs:LL:CC | LL | / std::intrinsics::catch_unwind( LL | | @@ -12,7 +12,7 @@ LL | | ); = 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 = note: BACKTRACE: - = note: inside `main` at $DIR/check_callback_abi.rs:LL:CC + = note: inside `main` at tests/fail/function_calls/check_callback_abi.rs:LL:CC note: some details are omitted, run with `MIRIFLAGS=-Zmiri-backtrace=full` for a verbose backtrace diff --git a/tests/fail/function_calls/exported_symbol_abi_mismatch.cache.stderr b/tests/fail/function_calls/exported_symbol_abi_mismatch.cache.stderr index 2feba7d8e3..e4302ad1d3 100644 --- a/tests/fail/function_calls/exported_symbol_abi_mismatch.cache.stderr +++ b/tests/fail/function_calls/exported_symbol_abi_mismatch.cache.stderr @@ -1,5 +1,5 @@ error: Undefined Behavior: calling a function with calling convention Rust using calling convention C - --> $DIR/exported_symbol_abi_mismatch.rs:LL:CC + --> tests/fail/function_calls/exported_symbol_abi_mismatch.rs:LL:CC | LL | foo(); | ^^^^^ calling a function with calling convention Rust using calling convention C @@ -7,7 +7,7 @@ LL | foo(); = 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 = note: BACKTRACE: - = note: inside `main` at $DIR/exported_symbol_abi_mismatch.rs:LL:CC + = note: inside `main` at tests/fail/function_calls/exported_symbol_abi_mismatch.rs:LL:CC note: some details are omitted, run with `MIRIFLAGS=-Zmiri-backtrace=full` for a verbose backtrace diff --git a/tests/fail/function_calls/exported_symbol_abi_mismatch.fn_ptr.stderr b/tests/fail/function_calls/exported_symbol_abi_mismatch.fn_ptr.stderr index 0537508bab..9f40c48b33 100644 --- a/tests/fail/function_calls/exported_symbol_abi_mismatch.fn_ptr.stderr +++ b/tests/fail/function_calls/exported_symbol_abi_mismatch.fn_ptr.stderr @@ -1,5 +1,5 @@ error: Undefined Behavior: calling a function with calling convention Rust using calling convention C - --> $DIR/exported_symbol_abi_mismatch.rs:LL:CC + --> tests/fail/function_calls/exported_symbol_abi_mismatch.rs:LL:CC | LL | std::mem::transmute::(foo)(); | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ calling a function with calling convention Rust using calling convention C @@ -7,7 +7,7 @@ LL | std::mem::transmute::(foo)(); = 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 = note: BACKTRACE: - = note: inside `main` at $DIR/exported_symbol_abi_mismatch.rs:LL:CC + = note: inside `main` at tests/fail/function_calls/exported_symbol_abi_mismatch.rs:LL:CC note: some details are omitted, run with `MIRIFLAGS=-Zmiri-backtrace=full` for a verbose backtrace diff --git a/tests/fail/function_calls/exported_symbol_abi_mismatch.no_cache.stderr b/tests/fail/function_calls/exported_symbol_abi_mismatch.no_cache.stderr index 2feba7d8e3..e4302ad1d3 100644 --- a/tests/fail/function_calls/exported_symbol_abi_mismatch.no_cache.stderr +++ b/tests/fail/function_calls/exported_symbol_abi_mismatch.no_cache.stderr @@ -1,5 +1,5 @@ error: Undefined Behavior: calling a function with calling convention Rust using calling convention C - --> $DIR/exported_symbol_abi_mismatch.rs:LL:CC + --> tests/fail/function_calls/exported_symbol_abi_mismatch.rs:LL:CC | LL | foo(); | ^^^^^ calling a function with calling convention Rust using calling convention C @@ -7,7 +7,7 @@ LL | foo(); = 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 = note: BACKTRACE: - = note: inside `main` at $DIR/exported_symbol_abi_mismatch.rs:LL:CC + = note: inside `main` at tests/fail/function_calls/exported_symbol_abi_mismatch.rs:LL:CC note: some details are omitted, run with `MIRIFLAGS=-Zmiri-backtrace=full` for a verbose backtrace diff --git a/tests/fail/function_calls/exported_symbol_bad_unwind1.stderr b/tests/fail/function_calls/exported_symbol_bad_unwind1.stderr index a11a2b9568..5f306cc8ab 100644 --- a/tests/fail/function_calls/exported_symbol_bad_unwind1.stderr +++ b/tests/fail/function_calls/exported_symbol_bad_unwind1.stderr @@ -1,9 +1,9 @@ -thread 'main' panicked at $DIR/exported_symbol_bad_unwind1.rs:LL:CC: +thread 'main' panicked at tests/fail/function_calls/exported_symbol_bad_unwind1.rs:LL:CC: explicit panic 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: Undefined Behavior: unwinding past a stack frame that does not allow unwinding - --> $DIR/exported_symbol_bad_unwind1.rs:LL:CC + --> tests/fail/function_calls/exported_symbol_bad_unwind1.rs:LL:CC | LL | unsafe { unwind() } | ^^^^^^^^ unwinding past a stack frame that does not allow unwinding @@ -11,7 +11,7 @@ LL | unsafe { unwind() } = 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 = note: BACKTRACE: - = note: inside `main` at $DIR/exported_symbol_bad_unwind1.rs:LL:CC + = note: inside `main` at tests/fail/function_calls/exported_symbol_bad_unwind1.rs:LL:CC note: some details are omitted, run with `MIRIFLAGS=-Zmiri-backtrace=full` for a verbose backtrace diff --git a/tests/fail/function_calls/exported_symbol_bad_unwind2.both.stderr b/tests/fail/function_calls/exported_symbol_bad_unwind2.both.stderr index 12425cc489..aef45042e8 100644 --- a/tests/fail/function_calls/exported_symbol_bad_unwind2.both.stderr +++ b/tests/fail/function_calls/exported_symbol_bad_unwind2.both.stderr @@ -1,4 +1,4 @@ -thread 'main' panicked at $DIR/exported_symbol_bad_unwind2.rs:LL:CC: +thread 'main' panicked at tests/fail/function_calls/exported_symbol_bad_unwind2.rs:LL:CC: explicit panic 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 @@ -21,14 +21,14 @@ LL | ABORT(); = note: inside `core::panicking::panic_nounwind` at RUSTLIB/core/src/panicking.rs:LL:CC = note: inside `core::panicking::panic_cannot_unwind` at RUSTLIB/core/src/panicking.rs:LL:CC note: inside `nounwind` - --> $DIR/exported_symbol_bad_unwind2.rs:LL:CC + --> tests/fail/function_calls/exported_symbol_bad_unwind2.rs:LL:CC | LL | / extern "C-unwind" fn nounwind() { LL | | panic!(); LL | | } | |_^ note: inside `main` - --> $DIR/exported_symbol_bad_unwind2.rs:LL:CC + --> tests/fail/function_calls/exported_symbol_bad_unwind2.rs:LL:CC | LL | unsafe { nounwind() } | ^ diff --git a/tests/fail/function_calls/exported_symbol_bad_unwind2.definition.stderr b/tests/fail/function_calls/exported_symbol_bad_unwind2.definition.stderr index 12425cc489..aef45042e8 100644 --- a/tests/fail/function_calls/exported_symbol_bad_unwind2.definition.stderr +++ b/tests/fail/function_calls/exported_symbol_bad_unwind2.definition.stderr @@ -1,4 +1,4 @@ -thread 'main' panicked at $DIR/exported_symbol_bad_unwind2.rs:LL:CC: +thread 'main' panicked at tests/fail/function_calls/exported_symbol_bad_unwind2.rs:LL:CC: explicit panic 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 @@ -21,14 +21,14 @@ LL | ABORT(); = note: inside `core::panicking::panic_nounwind` at RUSTLIB/core/src/panicking.rs:LL:CC = note: inside `core::panicking::panic_cannot_unwind` at RUSTLIB/core/src/panicking.rs:LL:CC note: inside `nounwind` - --> $DIR/exported_symbol_bad_unwind2.rs:LL:CC + --> tests/fail/function_calls/exported_symbol_bad_unwind2.rs:LL:CC | LL | / extern "C-unwind" fn nounwind() { LL | | panic!(); LL | | } | |_^ note: inside `main` - --> $DIR/exported_symbol_bad_unwind2.rs:LL:CC + --> tests/fail/function_calls/exported_symbol_bad_unwind2.rs:LL:CC | LL | unsafe { nounwind() } | ^ diff --git a/tests/fail/function_calls/exported_symbol_bad_unwind2.extern_block.stderr b/tests/fail/function_calls/exported_symbol_bad_unwind2.extern_block.stderr index f9e299bf5d..a81e8226e5 100644 --- a/tests/fail/function_calls/exported_symbol_bad_unwind2.extern_block.stderr +++ b/tests/fail/function_calls/exported_symbol_bad_unwind2.extern_block.stderr @@ -1,9 +1,9 @@ -thread 'main' panicked at $DIR/exported_symbol_bad_unwind2.rs:LL:CC: +thread 'main' panicked at tests/fail/function_calls/exported_symbol_bad_unwind2.rs:LL:CC: explicit panic 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: Undefined Behavior: unwinding past a stack frame that does not allow unwinding - --> $DIR/exported_symbol_bad_unwind2.rs:LL:CC + --> tests/fail/function_calls/exported_symbol_bad_unwind2.rs:LL:CC | LL | unsafe { nounwind() } | ^ unwinding past a stack frame that does not allow unwinding @@ -11,7 +11,7 @@ LL | unsafe { nounwind() } = 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 = note: BACKTRACE: - = note: inside `main` at $DIR/exported_symbol_bad_unwind2.rs:LL:CC + = note: inside `main` at tests/fail/function_calls/exported_symbol_bad_unwind2.rs:LL:CC note: some details are omitted, run with `MIRIFLAGS=-Zmiri-backtrace=full` for a verbose backtrace diff --git a/tests/fail/function_calls/exported_symbol_clashing.stderr b/tests/fail/function_calls/exported_symbol_clashing.stderr index 2f561ed88e..e9e580ffc8 100644 --- a/tests/fail/function_calls/exported_symbol_clashing.stderr +++ b/tests/fail/function_calls/exported_symbol_clashing.stderr @@ -1,21 +1,21 @@ error: multiple definitions of symbol `foo` - --> $DIR/exported_symbol_clashing.rs:LL:CC + --> tests/fail/function_calls/exported_symbol_clashing.rs:LL:CC | LL | unsafe { foo() } | ^^^^^ multiple definitions of symbol `foo` | help: it's first defined here, in crate `exported_symbol_clashing` - --> $DIR/exported_symbol_clashing.rs:LL:CC + --> tests/fail/function_calls/exported_symbol_clashing.rs:LL:CC | LL | fn foo() {} | ^^^^^^^^ help: then it's defined here again, in crate `exported_symbol_clashing` - --> $DIR/exported_symbol_clashing.rs:LL:CC + --> tests/fail/function_calls/exported_symbol_clashing.rs:LL:CC | LL | fn bar() {} | ^^^^^^^^ = note: BACKTRACE (of the first span): - = note: inside `main` at $DIR/exported_symbol_clashing.rs:LL:CC + = note: inside `main` at tests/fail/function_calls/exported_symbol_clashing.rs:LL:CC note: some details are omitted, run with `MIRIFLAGS=-Zmiri-backtrace=full` for a verbose backtrace diff --git a/tests/fail/function_calls/exported_symbol_shim_clashing.stderr b/tests/fail/function_calls/exported_symbol_shim_clashing.stderr index d51156b3c3..fb9cc47c7a 100644 --- a/tests/fail/function_calls/exported_symbol_shim_clashing.stderr +++ b/tests/fail/function_calls/exported_symbol_shim_clashing.stderr @@ -1,11 +1,11 @@ error: found `malloc` symbol definition that clashes with a built-in shim - --> $DIR/exported_symbol_shim_clashing.rs:LL:CC + --> tests/fail/function_calls/exported_symbol_shim_clashing.rs:LL:CC | LL | malloc(0); | ^^^^^^^^^ found `malloc` symbol definition that clashes with a built-in shim | help: the `malloc` symbol is defined here - --> $DIR/exported_symbol_shim_clashing.rs:LL:CC + --> tests/fail/function_calls/exported_symbol_shim_clashing.rs:LL:CC | LL | / extern "C" fn malloc(_: usize) -> *mut std::ffi::c_void { LL | | @@ -13,7 +13,7 @@ LL | | unreachable!() LL | | } | |_^ = note: BACKTRACE (of the first span): - = note: inside `main` at $DIR/exported_symbol_shim_clashing.rs:LL:CC + = note: inside `main` at tests/fail/function_calls/exported_symbol_shim_clashing.rs:LL:CC note: some details are omitted, run with `MIRIFLAGS=-Zmiri-backtrace=full` for a verbose backtrace diff --git a/tests/fail/function_calls/exported_symbol_wrong_arguments.stderr b/tests/fail/function_calls/exported_symbol_wrong_arguments.stderr index 69b710b3d3..1ff9aa36f1 100644 --- a/tests/fail/function_calls/exported_symbol_wrong_arguments.stderr +++ b/tests/fail/function_calls/exported_symbol_wrong_arguments.stderr @@ -1,5 +1,5 @@ error: Undefined Behavior: calling a function with more arguments than it expected - --> $DIR/exported_symbol_wrong_arguments.rs:LL:CC + --> tests/fail/function_calls/exported_symbol_wrong_arguments.rs:LL:CC | LL | unsafe { foo(1) } | ^^^^^^ calling a function with more arguments than it expected @@ -7,7 +7,7 @@ LL | unsafe { foo(1) } = 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 = note: BACKTRACE: - = note: inside `main` at $DIR/exported_symbol_wrong_arguments.rs:LL:CC + = note: inside `main` at tests/fail/function_calls/exported_symbol_wrong_arguments.rs:LL:CC note: some details are omitted, run with `MIRIFLAGS=-Zmiri-backtrace=full` for a verbose backtrace diff --git a/tests/fail/function_calls/exported_symbol_wrong_type.stderr b/tests/fail/function_calls/exported_symbol_wrong_type.stderr index 96b483059b..29c87e8c43 100644 --- a/tests/fail/function_calls/exported_symbol_wrong_type.stderr +++ b/tests/fail/function_calls/exported_symbol_wrong_type.stderr @@ -1,5 +1,5 @@ error: Undefined Behavior: attempt to call an exported symbol that is not defined as a function - --> $DIR/exported_symbol_wrong_type.rs:LL:CC + --> tests/fail/function_calls/exported_symbol_wrong_type.rs:LL:CC | LL | unsafe { FOO() } | ^^^^^ attempt to call an exported symbol that is not defined as a function @@ -7,7 +7,7 @@ LL | unsafe { FOO() } = 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 = note: BACKTRACE: - = note: inside `main` at $DIR/exported_symbol_wrong_type.rs:LL:CC + = note: inside `main` at tests/fail/function_calls/exported_symbol_wrong_type.rs:LL:CC note: some details are omitted, run with `MIRIFLAGS=-Zmiri-backtrace=full` for a verbose backtrace diff --git a/tests/fail/function_calls/return_pointer_aliasing_read.none.stderr b/tests/fail/function_calls/return_pointer_aliasing_read.none.stderr index e8b766d0b0..9da2c3589d 100644 --- a/tests/fail/function_calls/return_pointer_aliasing_read.none.stderr +++ b/tests/fail/function_calls/return_pointer_aliasing_read.none.stderr @@ -1,5 +1,5 @@ error: Undefined Behavior: using uninitialized data, but this operation requires initialized memory - --> $DIR/return_pointer_aliasing_read.rs:LL:CC + --> tests/fail/function_calls/return_pointer_aliasing_read.rs:LL:CC | LL | unsafe { ptr.read() }; | ^^^^^^^^^^ using uninitialized data, but this operation requires initialized memory @@ -7,9 +7,9 @@ LL | unsafe { ptr.read() }; = 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 = note: BACKTRACE: - = note: inside `myfun` at $DIR/return_pointer_aliasing_read.rs:LL:CC + = note: inside `myfun` at tests/fail/function_calls/return_pointer_aliasing_read.rs:LL:CC note: inside `main` - --> $DIR/return_pointer_aliasing_read.rs:LL:CC + --> tests/fail/function_calls/return_pointer_aliasing_read.rs:LL:CC | LL | Call(*ptr = myfun(ptr), ReturnTo(after_call), UnwindContinue()) | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ diff --git a/tests/fail/function_calls/return_pointer_aliasing_read.stack.stderr b/tests/fail/function_calls/return_pointer_aliasing_read.stack.stderr index 941470e929..b009b0901c 100644 --- a/tests/fail/function_calls/return_pointer_aliasing_read.stack.stderr +++ b/tests/fail/function_calls/return_pointer_aliasing_read.stack.stderr @@ -1,5 +1,5 @@ error: Undefined Behavior: not granting access to tag because that would remove [Unique for ] which is strongly protected - --> $DIR/return_pointer_aliasing_read.rs:LL:CC + --> tests/fail/function_calls/return_pointer_aliasing_read.rs:LL:CC | LL | unsafe { ptr.read() }; | ^^^^^^^^^^ not granting access to tag because that would remove [Unique for ] which is strongly protected @@ -7,7 +7,7 @@ LL | unsafe { ptr.read() }; = help: this indicates a potential bug in the program: it performed an invalid operation, but the Stacked Borrows rules it violated are still experimental = help: see https://github.com/rust-lang/unsafe-code-guidelines/blob/master/wip/stacked-borrows.md for further information help: was created by a SharedReadWrite retag at offsets [0x0..0x4] - --> $DIR/return_pointer_aliasing_read.rs:LL:CC + --> tests/fail/function_calls/return_pointer_aliasing_read.rs:LL:CC | LL | / mir! { LL | | { @@ -18,14 +18,14 @@ LL | | } LL | | } | |_____^ help: is this argument - --> $DIR/return_pointer_aliasing_read.rs:LL:CC + --> tests/fail/function_calls/return_pointer_aliasing_read.rs:LL:CC | LL | unsafe { ptr.read() }; | ^^^^^^^^^^^^^^^^^^^^^ = note: BACKTRACE (of the first span): - = note: inside `myfun` at $DIR/return_pointer_aliasing_read.rs:LL:CC + = note: inside `myfun` at tests/fail/function_calls/return_pointer_aliasing_read.rs:LL:CC note: inside `main` - --> $DIR/return_pointer_aliasing_read.rs:LL:CC + --> tests/fail/function_calls/return_pointer_aliasing_read.rs:LL:CC | LL | Call(*ptr = myfun(ptr), ReturnTo(after_call), UnwindContinue()) | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ diff --git a/tests/fail/function_calls/return_pointer_aliasing_read.tree.stderr b/tests/fail/function_calls/return_pointer_aliasing_read.tree.stderr index 715ee33061..6d2cbe9b7c 100644 --- a/tests/fail/function_calls/return_pointer_aliasing_read.tree.stderr +++ b/tests/fail/function_calls/return_pointer_aliasing_read.tree.stderr @@ -1,5 +1,5 @@ error: Undefined Behavior: read access through (root of the allocation) at ALLOC[0x0] is forbidden - --> $DIR/return_pointer_aliasing_read.rs:LL:CC + --> tests/fail/function_calls/return_pointer_aliasing_read.rs:LL:CC | LL | unsafe { ptr.read() }; | ^^^^^^^^^^ read access through (root of the allocation) at ALLOC[0x0] is forbidden @@ -9,7 +9,7 @@ LL | unsafe { ptr.read() }; = help: this foreign read access would cause the protected tag (currently Active) to become Disabled = help: protected tags must never be Disabled help: the accessed tag was created here - --> $DIR/return_pointer_aliasing_read.rs:LL:CC + --> tests/fail/function_calls/return_pointer_aliasing_read.rs:LL:CC | LL | / mir! { LL | | { @@ -20,20 +20,20 @@ LL | | } LL | | } | |_____^ help: the protected tag was created here, in the initial state Reserved - --> $DIR/return_pointer_aliasing_read.rs:LL:CC + --> tests/fail/function_calls/return_pointer_aliasing_read.rs:LL:CC | LL | unsafe { ptr.read() }; | ^^^^^^^^^^^^^^^^^^^^^ help: the protected tag later transitioned to Active due to a child write access at offsets [0x0..0x4] - --> $DIR/return_pointer_aliasing_read.rs:LL:CC + --> tests/fail/function_calls/return_pointer_aliasing_read.rs:LL:CC | LL | unsafe { ptr.read() }; | ^^^^^^^^^^^^^^^^^^^^^ = help: this transition corresponds to the first write to a 2-phase borrowed mutable reference = note: BACKTRACE (of the first span): - = note: inside `myfun` at $DIR/return_pointer_aliasing_read.rs:LL:CC + = note: inside `myfun` at tests/fail/function_calls/return_pointer_aliasing_read.rs:LL:CC note: inside `main` - --> $DIR/return_pointer_aliasing_read.rs:LL:CC + --> tests/fail/function_calls/return_pointer_aliasing_read.rs:LL:CC | LL | Call(*ptr = myfun(ptr), ReturnTo(after_call), UnwindContinue()) | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ diff --git a/tests/fail/function_calls/return_pointer_aliasing_write.stack.stderr b/tests/fail/function_calls/return_pointer_aliasing_write.stack.stderr index 51cb270dd2..54f9a7aebd 100644 --- a/tests/fail/function_calls/return_pointer_aliasing_write.stack.stderr +++ b/tests/fail/function_calls/return_pointer_aliasing_write.stack.stderr @@ -1,5 +1,5 @@ error: Undefined Behavior: not granting access to tag because that would remove [Unique for ] which is strongly protected - --> $DIR/return_pointer_aliasing_write.rs:LL:CC + --> tests/fail/function_calls/return_pointer_aliasing_write.rs:LL:CC | LL | unsafe { ptr.write(0) }; | ^^^^^^^^^^^^ not granting access to tag because that would remove [Unique for ] which is strongly protected @@ -7,7 +7,7 @@ LL | unsafe { ptr.write(0) }; = help: this indicates a potential bug in the program: it performed an invalid operation, but the Stacked Borrows rules it violated are still experimental = help: see https://github.com/rust-lang/unsafe-code-guidelines/blob/master/wip/stacked-borrows.md for further information help: was created by a SharedReadWrite retag at offsets [0x0..0x4] - --> $DIR/return_pointer_aliasing_write.rs:LL:CC + --> tests/fail/function_calls/return_pointer_aliasing_write.rs:LL:CC | LL | / mir! { LL | | { @@ -18,14 +18,14 @@ LL | | } LL | | } | |_____^ help: is this argument - --> $DIR/return_pointer_aliasing_write.rs:LL:CC + --> tests/fail/function_calls/return_pointer_aliasing_write.rs:LL:CC | LL | unsafe { ptr.write(0) }; | ^^^^^^^^^^^^^^^^^^^^^^^ = note: BACKTRACE (of the first span): - = note: inside `myfun` at $DIR/return_pointer_aliasing_write.rs:LL:CC + = note: inside `myfun` at tests/fail/function_calls/return_pointer_aliasing_write.rs:LL:CC note: inside `main` - --> $DIR/return_pointer_aliasing_write.rs:LL:CC + --> tests/fail/function_calls/return_pointer_aliasing_write.rs:LL:CC | LL | Call(*ptr = myfun(ptr), ReturnTo(after_call), UnwindContinue()) | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ diff --git a/tests/fail/function_calls/return_pointer_aliasing_write.tree.stderr b/tests/fail/function_calls/return_pointer_aliasing_write.tree.stderr index 66ca1027ed..693534be2e 100644 --- a/tests/fail/function_calls/return_pointer_aliasing_write.tree.stderr +++ b/tests/fail/function_calls/return_pointer_aliasing_write.tree.stderr @@ -1,5 +1,5 @@ error: Undefined Behavior: write access through (root of the allocation) at ALLOC[0x0] is forbidden - --> $DIR/return_pointer_aliasing_write.rs:LL:CC + --> tests/fail/function_calls/return_pointer_aliasing_write.rs:LL:CC | LL | unsafe { ptr.write(0) }; | ^^^^^^^^^^^^ write access through (root of the allocation) at ALLOC[0x0] is forbidden @@ -9,7 +9,7 @@ LL | unsafe { ptr.write(0) }; = help: this foreign write access would cause the protected tag (currently Active) to become Disabled = help: protected tags must never be Disabled help: the accessed tag was created here - --> $DIR/return_pointer_aliasing_write.rs:LL:CC + --> tests/fail/function_calls/return_pointer_aliasing_write.rs:LL:CC | LL | / mir! { LL | | { @@ -20,20 +20,20 @@ LL | | } LL | | } | |_____^ help: the protected tag was created here, in the initial state Reserved - --> $DIR/return_pointer_aliasing_write.rs:LL:CC + --> tests/fail/function_calls/return_pointer_aliasing_write.rs:LL:CC | LL | unsafe { ptr.write(0) }; | ^^^^^^^^^^^^^^^^^^^^^^^ help: the protected tag later transitioned to Active due to a child write access at offsets [0x0..0x4] - --> $DIR/return_pointer_aliasing_write.rs:LL:CC + --> tests/fail/function_calls/return_pointer_aliasing_write.rs:LL:CC | LL | unsafe { ptr.write(0) }; | ^^^^^^^^^^^^^^^^^^^^^^^ = help: this transition corresponds to the first write to a 2-phase borrowed mutable reference = note: BACKTRACE (of the first span): - = note: inside `myfun` at $DIR/return_pointer_aliasing_write.rs:LL:CC + = note: inside `myfun` at tests/fail/function_calls/return_pointer_aliasing_write.rs:LL:CC note: inside `main` - --> $DIR/return_pointer_aliasing_write.rs:LL:CC + --> tests/fail/function_calls/return_pointer_aliasing_write.rs:LL:CC | LL | Call(*ptr = myfun(ptr), ReturnTo(after_call), UnwindContinue()) | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ diff --git a/tests/fail/function_calls/return_pointer_aliasing_write_tail_call.stack.stderr b/tests/fail/function_calls/return_pointer_aliasing_write_tail_call.stack.stderr index 7e527a440d..520937beae 100644 --- a/tests/fail/function_calls/return_pointer_aliasing_write_tail_call.stack.stderr +++ b/tests/fail/function_calls/return_pointer_aliasing_write_tail_call.stack.stderr @@ -1,5 +1,5 @@ error: Undefined Behavior: not granting access to tag because that would remove [Unique for ] which is strongly protected - --> $DIR/return_pointer_aliasing_write_tail_call.rs:LL:CC + --> tests/fail/function_calls/return_pointer_aliasing_write_tail_call.rs:LL:CC | LL | unsafe { ptr.write(0) }; | ^^^^^^^^^^^^ not granting access to tag because that would remove [Unique for ] which is strongly protected @@ -7,7 +7,7 @@ LL | unsafe { ptr.write(0) }; = help: this indicates a potential bug in the program: it performed an invalid operation, but the Stacked Borrows rules it violated are still experimental = help: see https://github.com/rust-lang/unsafe-code-guidelines/blob/master/wip/stacked-borrows.md for further information help: was created by a SharedReadWrite retag at offsets [0x0..0x4] - --> $DIR/return_pointer_aliasing_write_tail_call.rs:LL:CC + --> tests/fail/function_calls/return_pointer_aliasing_write_tail_call.rs:LL:CC | LL | / mir! { LL | | { @@ -18,14 +18,14 @@ LL | | } LL | | } | |_____^ help: is this argument - --> $DIR/return_pointer_aliasing_write_tail_call.rs:LL:CC + --> tests/fail/function_calls/return_pointer_aliasing_write_tail_call.rs:LL:CC | LL | unsafe { ptr.write(0) }; | ^^^^^^^^^^^^^^^^^^^^^^^ = note: BACKTRACE (of the first span): - = note: inside `myfun2` at $DIR/return_pointer_aliasing_write_tail_call.rs:LL:CC + = note: inside `myfun2` at tests/fail/function_calls/return_pointer_aliasing_write_tail_call.rs:LL:CC note: inside `main` - --> $DIR/return_pointer_aliasing_write_tail_call.rs:LL:CC + --> tests/fail/function_calls/return_pointer_aliasing_write_tail_call.rs:LL:CC | LL | Call(*ptr = myfun(ptr), ReturnTo(after_call), UnwindContinue()) | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ diff --git a/tests/fail/function_calls/return_pointer_aliasing_write_tail_call.tree.stderr b/tests/fail/function_calls/return_pointer_aliasing_write_tail_call.tree.stderr index b1f2cab031..a879189d0c 100644 --- a/tests/fail/function_calls/return_pointer_aliasing_write_tail_call.tree.stderr +++ b/tests/fail/function_calls/return_pointer_aliasing_write_tail_call.tree.stderr @@ -1,5 +1,5 @@ error: Undefined Behavior: write access through (root of the allocation) at ALLOC[0x0] is forbidden - --> $DIR/return_pointer_aliasing_write_tail_call.rs:LL:CC + --> tests/fail/function_calls/return_pointer_aliasing_write_tail_call.rs:LL:CC | LL | unsafe { ptr.write(0) }; | ^^^^^^^^^^^^ write access through (root of the allocation) at ALLOC[0x0] is forbidden @@ -9,7 +9,7 @@ LL | unsafe { ptr.write(0) }; = help: this foreign write access would cause the protected tag (currently Active) to become Disabled = help: protected tags must never be Disabled help: the accessed tag was created here - --> $DIR/return_pointer_aliasing_write_tail_call.rs:LL:CC + --> tests/fail/function_calls/return_pointer_aliasing_write_tail_call.rs:LL:CC | LL | / mir! { LL | | { @@ -20,20 +20,20 @@ LL | | } LL | | } | |_____^ help: the protected tag was created here, in the initial state Reserved - --> $DIR/return_pointer_aliasing_write_tail_call.rs:LL:CC + --> tests/fail/function_calls/return_pointer_aliasing_write_tail_call.rs:LL:CC | LL | unsafe { ptr.write(0) }; | ^^^^^^^^^^^^^^^^^^^^^^^ help: the protected tag later transitioned to Active due to a child write access at offsets [0x0..0x4] - --> $DIR/return_pointer_aliasing_write_tail_call.rs:LL:CC + --> tests/fail/function_calls/return_pointer_aliasing_write_tail_call.rs:LL:CC | LL | unsafe { ptr.write(0) }; | ^^^^^^^^^^^^^^^^^^^^^^^ = help: this transition corresponds to the first write to a 2-phase borrowed mutable reference = note: BACKTRACE (of the first span): - = note: inside `myfun2` at $DIR/return_pointer_aliasing_write_tail_call.rs:LL:CC + = note: inside `myfun2` at tests/fail/function_calls/return_pointer_aliasing_write_tail_call.rs:LL:CC note: inside `main` - --> $DIR/return_pointer_aliasing_write_tail_call.rs:LL:CC + --> tests/fail/function_calls/return_pointer_aliasing_write_tail_call.rs:LL:CC | LL | Call(*ptr = myfun(ptr), ReturnTo(after_call), UnwindContinue()) | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ diff --git a/tests/fail/function_calls/return_pointer_on_unwind.stderr b/tests/fail/function_calls/return_pointer_on_unwind.stderr index 83efc9974e..db876cb5ce 100644 --- a/tests/fail/function_calls/return_pointer_on_unwind.stderr +++ b/tests/fail/function_calls/return_pointer_on_unwind.stderr @@ -1,9 +1,9 @@ -thread 'main' panicked at $DIR/return_pointer_on_unwind.rs:LL:CC: +thread 'main' panicked at tests/fail/function_calls/return_pointer_on_unwind.rs:LL:CC: explicit panic 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: Undefined Behavior: using uninitialized data, but this operation requires initialized memory - --> $DIR/return_pointer_on_unwind.rs:LL:CC + --> tests/fail/function_calls/return_pointer_on_unwind.rs:LL:CC | LL | dbg!(x.0); | ^^^^^^^^^ using uninitialized data, but this operation requires initialized memory diff --git a/tests/fail/function_calls/simd_feature_flag_difference.rs b/tests/fail/function_calls/simd_feature_flag_difference.rs index e98a3abadf..200f1062a3 100644 --- a/tests/fail/function_calls/simd_feature_flag_difference.rs +++ b/tests/fail/function_calls/simd_feature_flag_difference.rs @@ -1,4 +1,4 @@ -//@only-target-x86_64 +//@only-target: x86_64 #![allow(improper_ctypes_definitions)] use std::arch::x86_64::*; use std::mem::transmute; diff --git a/tests/fail/function_calls/simd_feature_flag_difference.stderr b/tests/fail/function_calls/simd_feature_flag_difference.stderr index 2544421c7e..1d5b331be6 100644 --- a/tests/fail/function_calls/simd_feature_flag_difference.stderr +++ b/tests/fail/function_calls/simd_feature_flag_difference.stderr @@ -1,5 +1,5 @@ error: Undefined Behavior: calling a function that requires unavailable target features: avx - --> $DIR/simd_feature_flag_difference.rs:LL:CC + --> tests/fail/function_calls/simd_feature_flag_difference.rs:LL:CC | LL | unsafe { foo(0.0, x) } | ^^^^^^^^^^^ calling a function that requires unavailable target features: avx @@ -7,9 +7,9 @@ LL | unsafe { foo(0.0, x) } = 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 = note: BACKTRACE: - = note: inside `bar` at $DIR/simd_feature_flag_difference.rs:LL:CC + = note: inside `bar` at tests/fail/function_calls/simd_feature_flag_difference.rs:LL:CC note: inside `main` - --> $DIR/simd_feature_flag_difference.rs:LL:CC + --> tests/fail/function_calls/simd_feature_flag_difference.rs:LL:CC | LL | let copy = bar(input); | ^^^^^^^^^^ diff --git a/tests/fail/function_calls/target_feature.rs b/tests/fail/function_calls/target_feature.rs index 84e01eb480..f8b7f473d9 100644 --- a/tests/fail/function_calls/target_feature.rs +++ b/tests/fail/function_calls/target_feature.rs @@ -1,5 +1,5 @@ -//@only-target-x86_64: uses x86 target features -//@ignore-target-x86_64-apple-darwin: that target actually has ssse3 +//@only-target: x86_64: uses x86 target features +//@ignore-target: x86_64-apple-darwin: that target actually has ssse3 fn main() { assert!(!is_x86_feature_detected!("ssse3")); diff --git a/tests/fail/function_calls/target_feature.stderr b/tests/fail/function_calls/target_feature.stderr index 4d3cf6e9d3..937bd4a595 100644 --- a/tests/fail/function_calls/target_feature.stderr +++ b/tests/fail/function_calls/target_feature.stderr @@ -1,5 +1,5 @@ error: Undefined Behavior: calling a function that requires unavailable target features: ssse3 - --> $DIR/target_feature.rs:LL:CC + --> tests/fail/function_calls/target_feature.rs:LL:CC | LL | ssse3_fn(); | ^^^^^^^^^^ calling a function that requires unavailable target features: ssse3 @@ -7,7 +7,7 @@ LL | ssse3_fn(); = 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 = note: BACKTRACE: - = note: inside `main` at $DIR/target_feature.rs:LL:CC + = note: inside `main` at tests/fail/function_calls/target_feature.rs:LL:CC note: some details are omitted, run with `MIRIFLAGS=-Zmiri-backtrace=full` for a verbose backtrace diff --git a/tests/fail/function_calls/target_feature_wasm.rs b/tests/fail/function_calls/target_feature_wasm.rs index bd400e8824..71a0f90138 100644 --- a/tests/fail/function_calls/target_feature_wasm.rs +++ b/tests/fail/function_calls/target_feature_wasm.rs @@ -1,4 +1,4 @@ -//@only-target-wasm: tests WASM-specific behavior +//@only-target: wasm: tests WASM-specific behavior //@compile-flags: -C target-feature=-simd128 fn main() { diff --git a/tests/fail/function_pointers/abi_mismatch_array_vs_struct.stderr b/tests/fail/function_pointers/abi_mismatch_array_vs_struct.stderr index 2b2a898ce7..521cececc3 100644 --- a/tests/fail/function_pointers/abi_mismatch_array_vs_struct.stderr +++ b/tests/fail/function_pointers/abi_mismatch_array_vs_struct.stderr @@ -1,5 +1,5 @@ error: Undefined Behavior: calling a function with argument of type S passing data of type [i32; 4] - --> $DIR/abi_mismatch_array_vs_struct.rs:LL:CC + --> tests/fail/function_pointers/abi_mismatch_array_vs_struct.rs:LL:CC | LL | g(Default::default()) | ^^^^^^^^^^^^^^^^^^^^^ calling a function with argument of type S passing data of type [i32; 4] @@ -9,7 +9,7 @@ LL | g(Default::default()) = help: this means these two types are not *guaranteed* to be ABI-compatible across all targets = help: if you think this code should be accepted anyway, please report an issue with Miri = note: BACKTRACE: - = note: inside `main` at $DIR/abi_mismatch_array_vs_struct.rs:LL:CC + = note: inside `main` at tests/fail/function_pointers/abi_mismatch_array_vs_struct.rs:LL:CC note: some details are omitted, run with `MIRIFLAGS=-Zmiri-backtrace=full` for a verbose backtrace diff --git a/tests/fail/function_pointers/abi_mismatch_int_vs_float.stderr b/tests/fail/function_pointers/abi_mismatch_int_vs_float.stderr index 752e17116d..2070429925 100644 --- a/tests/fail/function_pointers/abi_mismatch_int_vs_float.stderr +++ b/tests/fail/function_pointers/abi_mismatch_int_vs_float.stderr @@ -1,5 +1,5 @@ error: Undefined Behavior: calling a function with argument of type f32 passing data of type i32 - --> $DIR/abi_mismatch_int_vs_float.rs:LL:CC + --> tests/fail/function_pointers/abi_mismatch_int_vs_float.rs:LL:CC | LL | g(42) | ^^^^^ calling a function with argument of type f32 passing data of type i32 @@ -9,7 +9,7 @@ LL | g(42) = help: this means these two types are not *guaranteed* to be ABI-compatible across all targets = help: if you think this code should be accepted anyway, please report an issue with Miri = note: BACKTRACE: - = note: inside `main` at $DIR/abi_mismatch_int_vs_float.rs:LL:CC + = note: inside `main` at tests/fail/function_pointers/abi_mismatch_int_vs_float.rs:LL:CC note: some details are omitted, run with `MIRIFLAGS=-Zmiri-backtrace=full` for a verbose backtrace diff --git a/tests/fail/function_pointers/abi_mismatch_raw_pointer.stderr b/tests/fail/function_pointers/abi_mismatch_raw_pointer.stderr index 907a8e50c4..3e3d07e148 100644 --- a/tests/fail/function_pointers/abi_mismatch_raw_pointer.stderr +++ b/tests/fail/function_pointers/abi_mismatch_raw_pointer.stderr @@ -1,5 +1,5 @@ error: Undefined Behavior: calling a function with argument of type *const [i32] passing data of type *const i32 - --> $DIR/abi_mismatch_raw_pointer.rs:LL:CC + --> tests/fail/function_pointers/abi_mismatch_raw_pointer.rs:LL:CC | LL | g(&42 as *const i32) | ^^^^^^^^^^^^^^^^^^^^ calling a function with argument of type *const [i32] passing data of type *const i32 @@ -9,7 +9,7 @@ LL | g(&42 as *const i32) = help: this means these two types are not *guaranteed* to be ABI-compatible across all targets = help: if you think this code should be accepted anyway, please report an issue with Miri = note: BACKTRACE: - = note: inside `main` at $DIR/abi_mismatch_raw_pointer.rs:LL:CC + = note: inside `main` at tests/fail/function_pointers/abi_mismatch_raw_pointer.rs:LL:CC note: some details are omitted, run with `MIRIFLAGS=-Zmiri-backtrace=full` for a verbose backtrace diff --git a/tests/fail/function_pointers/abi_mismatch_repr_C.stderr b/tests/fail/function_pointers/abi_mismatch_repr_C.stderr index 8ec19db813..6b92824494 100644 --- a/tests/fail/function_pointers/abi_mismatch_repr_C.stderr +++ b/tests/fail/function_pointers/abi_mismatch_repr_C.stderr @@ -1,5 +1,5 @@ error: Undefined Behavior: calling a function with argument of type S2 passing data of type S1 - --> $DIR/abi_mismatch_repr_C.rs:LL:CC + --> tests/fail/function_pointers/abi_mismatch_repr_C.rs:LL:CC | LL | fnptr(S1(NonZero::new(1).unwrap())); | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ calling a function with argument of type S2 passing data of type S1 @@ -9,7 +9,7 @@ LL | fnptr(S1(NonZero::new(1).unwrap())); = help: this means these two types are not *guaranteed* to be ABI-compatible across all targets = help: if you think this code should be accepted anyway, please report an issue with Miri = note: BACKTRACE: - = note: inside `main` at $DIR/abi_mismatch_repr_C.rs:LL:CC + = note: inside `main` at tests/fail/function_pointers/abi_mismatch_repr_C.rs:LL:CC note: some details are omitted, run with `MIRIFLAGS=-Zmiri-backtrace=full` for a verbose backtrace diff --git a/tests/fail/function_pointers/abi_mismatch_return_type.stderr b/tests/fail/function_pointers/abi_mismatch_return_type.stderr index 3793590f84..51539b078a 100644 --- a/tests/fail/function_pointers/abi_mismatch_return_type.stderr +++ b/tests/fail/function_pointers/abi_mismatch_return_type.stderr @@ -1,5 +1,5 @@ error: Undefined Behavior: calling a function with return type u32 passing return place of type () - --> $DIR/abi_mismatch_return_type.rs:LL:CC + --> tests/fail/function_pointers/abi_mismatch_return_type.rs:LL:CC | LL | g() | ^^^ calling a function with return type u32 passing return place of type () @@ -9,7 +9,7 @@ LL | g() = help: this means these two types are not *guaranteed* to be ABI-compatible across all targets = help: if you think this code should be accepted anyway, please report an issue with Miri = note: BACKTRACE: - = note: inside `main` at $DIR/abi_mismatch_return_type.rs:LL:CC + = note: inside `main` at tests/fail/function_pointers/abi_mismatch_return_type.rs:LL:CC note: some details are omitted, run with `MIRIFLAGS=-Zmiri-backtrace=full` for a verbose backtrace diff --git a/tests/fail/function_pointers/abi_mismatch_simple.stderr b/tests/fail/function_pointers/abi_mismatch_simple.stderr index 0c533c1417..16a83b8e34 100644 --- a/tests/fail/function_pointers/abi_mismatch_simple.stderr +++ b/tests/fail/function_pointers/abi_mismatch_simple.stderr @@ -1,5 +1,5 @@ error: Undefined Behavior: calling a function with argument of type (i32, i32) passing data of type i32 - --> $DIR/abi_mismatch_simple.rs:LL:CC + --> tests/fail/function_pointers/abi_mismatch_simple.rs:LL:CC | LL | g(42) | ^^^^^ calling a function with argument of type (i32, i32) passing data of type i32 @@ -9,7 +9,7 @@ LL | g(42) = help: this means these two types are not *guaranteed* to be ABI-compatible across all targets = help: if you think this code should be accepted anyway, please report an issue with Miri = note: BACKTRACE: - = note: inside `main` at $DIR/abi_mismatch_simple.rs:LL:CC + = note: inside `main` at tests/fail/function_pointers/abi_mismatch_simple.rs:LL:CC note: some details are omitted, run with `MIRIFLAGS=-Zmiri-backtrace=full` for a verbose backtrace diff --git a/tests/fail/function_pointers/abi_mismatch_too_few_args.stderr b/tests/fail/function_pointers/abi_mismatch_too_few_args.stderr index 2e50d054e7..760826805c 100644 --- a/tests/fail/function_pointers/abi_mismatch_too_few_args.stderr +++ b/tests/fail/function_pointers/abi_mismatch_too_few_args.stderr @@ -1,5 +1,5 @@ error: Undefined Behavior: calling a function with fewer arguments than it requires - --> $DIR/abi_mismatch_too_few_args.rs:LL:CC + --> tests/fail/function_pointers/abi_mismatch_too_few_args.rs:LL:CC | LL | g() | ^^^ calling a function with fewer arguments than it requires @@ -7,7 +7,7 @@ LL | g() = 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 = note: BACKTRACE: - = note: inside `main` at $DIR/abi_mismatch_too_few_args.rs:LL:CC + = note: inside `main` at tests/fail/function_pointers/abi_mismatch_too_few_args.rs:LL:CC note: some details are omitted, run with `MIRIFLAGS=-Zmiri-backtrace=full` for a verbose backtrace diff --git a/tests/fail/function_pointers/abi_mismatch_too_many_args.stderr b/tests/fail/function_pointers/abi_mismatch_too_many_args.stderr index facfe9d31f..9552250546 100644 --- a/tests/fail/function_pointers/abi_mismatch_too_many_args.stderr +++ b/tests/fail/function_pointers/abi_mismatch_too_many_args.stderr @@ -1,5 +1,5 @@ error: Undefined Behavior: calling a function with more arguments than it expected - --> $DIR/abi_mismatch_too_many_args.rs:LL:CC + --> tests/fail/function_pointers/abi_mismatch_too_many_args.rs:LL:CC | LL | g(42) | ^^^^^ calling a function with more arguments than it expected @@ -7,7 +7,7 @@ LL | g(42) = 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 = note: BACKTRACE: - = note: inside `main` at $DIR/abi_mismatch_too_many_args.rs:LL:CC + = note: inside `main` at tests/fail/function_pointers/abi_mismatch_too_many_args.rs:LL:CC note: some details are omitted, run with `MIRIFLAGS=-Zmiri-backtrace=full` for a verbose backtrace diff --git a/tests/fail/function_pointers/abi_mismatch_vector.stderr b/tests/fail/function_pointers/abi_mismatch_vector.stderr index ef4b60b83b..021be890d2 100644 --- a/tests/fail/function_pointers/abi_mismatch_vector.stderr +++ b/tests/fail/function_pointers/abi_mismatch_vector.stderr @@ -1,5 +1,5 @@ error: Undefined Behavior: calling a function with argument of type std::simd::Simd passing data of type std::simd::Simd - --> $DIR/abi_mismatch_vector.rs:LL:CC + --> tests/fail/function_pointers/abi_mismatch_vector.rs:LL:CC | LL | g(Default::default()) | ^^^^^^^^^^^^^^^^^^^^^ calling a function with argument of type std::simd::Simd passing data of type std::simd::Simd @@ -9,7 +9,7 @@ LL | g(Default::default()) = help: this means these two types are not *guaranteed* to be ABI-compatible across all targets = help: if you think this code should be accepted anyway, please report an issue with Miri = note: BACKTRACE: - = note: inside `main` at $DIR/abi_mismatch_vector.rs:LL:CC + = note: inside `main` at tests/fail/function_pointers/abi_mismatch_vector.rs:LL:CC note: some details are omitted, run with `MIRIFLAGS=-Zmiri-backtrace=full` for a verbose backtrace diff --git a/tests/fail/function_pointers/cast_box_int_to_fn_ptr.stderr b/tests/fail/function_pointers/cast_box_int_to_fn_ptr.stderr index f95a62535d..6112e92c93 100644 --- a/tests/fail/function_pointers/cast_box_int_to_fn_ptr.stderr +++ b/tests/fail/function_pointers/cast_box_int_to_fn_ptr.stderr @@ -1,5 +1,5 @@ error: Undefined Behavior: using ALLOC as function pointer but it does not point to a function - --> $DIR/cast_box_int_to_fn_ptr.rs:LL:CC + --> tests/fail/function_pointers/cast_box_int_to_fn_ptr.rs:LL:CC | LL | (*g)(42) | ^^^^^^^^ using ALLOC as function pointer but it does not point to a function @@ -7,7 +7,7 @@ LL | (*g)(42) = 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 = note: BACKTRACE: - = note: inside `main` at $DIR/cast_box_int_to_fn_ptr.rs:LL:CC + = note: inside `main` at tests/fail/function_pointers/cast_box_int_to_fn_ptr.rs:LL:CC note: some details are omitted, run with `MIRIFLAGS=-Zmiri-backtrace=full` for a verbose backtrace diff --git a/tests/fail/function_pointers/cast_int_to_fn_ptr.stderr b/tests/fail/function_pointers/cast_int_to_fn_ptr.stderr index 347afa7705..f2d9933188 100644 --- a/tests/fail/function_pointers/cast_int_to_fn_ptr.stderr +++ b/tests/fail/function_pointers/cast_int_to_fn_ptr.stderr @@ -1,5 +1,5 @@ error: Undefined Behavior: out-of-bounds pointer use: expected a pointer to some allocation, but got 0x2a[noalloc] which is a dangling pointer (it has no provenance) - --> $DIR/cast_int_to_fn_ptr.rs:LL:CC + --> tests/fail/function_pointers/cast_int_to_fn_ptr.rs:LL:CC | LL | g(42) | ^^^^^ out-of-bounds pointer use: expected a pointer to some allocation, but got 0x2a[noalloc] which is a dangling pointer (it has no provenance) @@ -7,7 +7,7 @@ LL | g(42) = 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 = note: BACKTRACE: - = note: inside `main` at $DIR/cast_int_to_fn_ptr.rs:LL:CC + = note: inside `main` at tests/fail/function_pointers/cast_int_to_fn_ptr.rs:LL:CC note: some details are omitted, run with `MIRIFLAGS=-Zmiri-backtrace=full` for a verbose backtrace diff --git a/tests/fail/function_pointers/deref_fn_ptr.stderr b/tests/fail/function_pointers/deref_fn_ptr.stderr index b5cee95d66..f7cc82b80d 100644 --- a/tests/fail/function_pointers/deref_fn_ptr.stderr +++ b/tests/fail/function_pointers/deref_fn_ptr.stderr @@ -1,5 +1,5 @@ error: Undefined Behavior: accessing ALLOC which contains a function - --> $DIR/deref_fn_ptr.rs:LL:CC + --> tests/fail/function_pointers/deref_fn_ptr.rs:LL:CC | LL | *std::mem::transmute::(f) | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ accessing ALLOC which contains a function @@ -7,7 +7,7 @@ LL | *std::mem::transmute::(f) = 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 = note: BACKTRACE: - = note: inside `main` at $DIR/deref_fn_ptr.rs:LL:CC + = note: inside `main` at tests/fail/function_pointers/deref_fn_ptr.rs:LL:CC note: some details are omitted, run with `MIRIFLAGS=-Zmiri-backtrace=full` for a verbose backtrace diff --git a/tests/fail/function_pointers/execute_memory.stderr b/tests/fail/function_pointers/execute_memory.stderr index 4370e6d6a2..e057318428 100644 --- a/tests/fail/function_pointers/execute_memory.stderr +++ b/tests/fail/function_pointers/execute_memory.stderr @@ -1,5 +1,5 @@ error: Undefined Behavior: using ALLOC as function pointer but it does not point to a function - --> $DIR/execute_memory.rs:LL:CC + --> tests/fail/function_pointers/execute_memory.rs:LL:CC | LL | f() | ^^^ using ALLOC as function pointer but it does not point to a function @@ -7,7 +7,7 @@ LL | f() = 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 = note: BACKTRACE: - = note: inside `main` at $DIR/execute_memory.rs:LL:CC + = note: inside `main` at tests/fail/function_pointers/execute_memory.rs:LL:CC note: some details are omitted, run with `MIRIFLAGS=-Zmiri-backtrace=full` for a verbose backtrace diff --git a/tests/fail/function_pointers/fn_ptr_offset.stderr b/tests/fail/function_pointers/fn_ptr_offset.stderr index e66ab68186..4ed09683c6 100644 --- a/tests/fail/function_pointers/fn_ptr_offset.stderr +++ b/tests/fail/function_pointers/fn_ptr_offset.stderr @@ -1,5 +1,5 @@ error: Undefined Behavior: using ALLOC+0x1 as function pointer but it does not point to a function - --> $DIR/fn_ptr_offset.rs:LL:CC + --> tests/fail/function_pointers/fn_ptr_offset.rs:LL:CC | LL | x(); | ^^^ using ALLOC+0x1 as function pointer but it does not point to a function @@ -7,7 +7,7 @@ LL | x(); = 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 = note: BACKTRACE: - = note: inside `main` at $DIR/fn_ptr_offset.rs:LL:CC + = note: inside `main` at tests/fail/function_pointers/fn_ptr_offset.rs:LL:CC note: some details are omitted, run with `MIRIFLAGS=-Zmiri-backtrace=full` for a verbose backtrace diff --git a/tests/fail/intrinsic_fallback_is_spec.stderr b/tests/fail/intrinsic_fallback_is_spec.stderr index db3941a32a..a36b0fca80 100644 --- a/tests/fail/intrinsic_fallback_is_spec.stderr +++ b/tests/fail/intrinsic_fallback_is_spec.stderr @@ -1,12 +1,12 @@ error: unsupported operation: Miri can only use intrinsic fallback bodies that exactly reflect the specification: they fully check for UB and are as non-deterministic as possible. After verifying that `ptr_guaranteed_cmp` does so, add the `#[miri::intrinsic_fallback_is_spec]` attribute to it; also ping @rust-lang/miri when you do that - --> $DIR/intrinsic_fallback_is_spec.rs:LL:CC + --> tests/fail/intrinsic_fallback_is_spec.rs:LL:CC | LL | ptr_guaranteed_cmp::<()>(std::ptr::null(), std::ptr::null()); | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ Miri can only use intrinsic fallback bodies that exactly reflect the specification: they fully check for UB and are as non-deterministic as possible. After verifying that `ptr_guaranteed_cmp` does so, add the `#[miri::intrinsic_fallback_is_spec]` attribute to it; also ping @rust-lang/miri when you do that | = help: this is likely not a bug in the program; it indicates that the program performed an operation that Miri does not support = note: BACKTRACE: - = note: inside `main` at $DIR/intrinsic_fallback_is_spec.rs:LL:CC + = note: inside `main` at tests/fail/intrinsic_fallback_is_spec.rs:LL:CC note: some details are omitted, run with `MIRIFLAGS=-Zmiri-backtrace=full` for a verbose backtrace diff --git a/tests/fail/intrinsics/assume.stderr b/tests/fail/intrinsics/assume.stderr index 7fa6f7b5bf..eadbd2c0d5 100644 --- a/tests/fail/intrinsics/assume.stderr +++ b/tests/fail/intrinsics/assume.stderr @@ -1,5 +1,5 @@ error: Undefined Behavior: `assume` called with `false` - --> $DIR/assume.rs:LL:CC + --> tests/fail/intrinsics/assume.rs:LL:CC | LL | std::intrinsics::assume(x > 42); | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ `assume` called with `false` @@ -7,7 +7,7 @@ LL | std::intrinsics::assume(x > 42); = 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 = note: BACKTRACE: - = note: inside `main` at $DIR/assume.rs:LL:CC + = note: inside `main` at tests/fail/intrinsics/assume.rs:LL:CC note: some details are omitted, run with `MIRIFLAGS=-Zmiri-backtrace=full` for a verbose backtrace diff --git a/tests/fail/intrinsics/copy_overflow.stderr b/tests/fail/intrinsics/copy_overflow.stderr index b7c92cf4a5..c50c7c1ef4 100644 --- a/tests/fail/intrinsics/copy_overflow.stderr +++ b/tests/fail/intrinsics/copy_overflow.stderr @@ -1,5 +1,5 @@ error: Undefined Behavior: overflow computing total size of `copy` - --> $DIR/copy_overflow.rs:LL:CC + --> tests/fail/intrinsics/copy_overflow.rs:LL:CC | LL | (&mut y as *mut i32).copy_from(&x, 1usize << (mem::size_of::() * 8 - 1)); | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ overflow computing total size of `copy` @@ -7,7 +7,7 @@ LL | (&mut y as *mut i32).copy_from(&x, 1usize << (mem::size_of:: = 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 = note: BACKTRACE: - = note: inside `main` at $DIR/copy_overflow.rs:LL:CC + = note: inside `main` at tests/fail/intrinsics/copy_overflow.rs:LL:CC note: some details are omitted, run with `MIRIFLAGS=-Zmiri-backtrace=full` for a verbose backtrace diff --git a/tests/fail/intrinsics/copy_overlapping.stderr b/tests/fail/intrinsics/copy_overlapping.stderr index e9ea262caf..fef5a0a82a 100644 --- a/tests/fail/intrinsics/copy_overlapping.stderr +++ b/tests/fail/intrinsics/copy_overlapping.stderr @@ -1,5 +1,5 @@ error: Undefined Behavior: `copy_nonoverlapping` called on overlapping ranges - --> $DIR/copy_overlapping.rs:LL:CC + --> tests/fail/intrinsics/copy_overlapping.rs:LL:CC | LL | copy_nonoverlapping(a, b, 2); | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ `copy_nonoverlapping` called on overlapping ranges @@ -7,7 +7,7 @@ LL | copy_nonoverlapping(a, b, 2); = 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 = note: BACKTRACE: - = note: inside `main` at $DIR/copy_overlapping.rs:LL:CC + = note: inside `main` at tests/fail/intrinsics/copy_overlapping.rs:LL:CC note: some details are omitted, run with `MIRIFLAGS=-Zmiri-backtrace=full` for a verbose backtrace diff --git a/tests/fail/intrinsics/copy_unaligned.stderr b/tests/fail/intrinsics/copy_unaligned.stderr index d190f3de6b..2d0edd4e6c 100644 --- a/tests/fail/intrinsics/copy_unaligned.stderr +++ b/tests/fail/intrinsics/copy_unaligned.stderr @@ -1,5 +1,5 @@ error: Undefined Behavior: accessing memory with alignment ALIGN, but alignment ALIGN is required - --> $DIR/copy_unaligned.rs:LL:CC + --> tests/fail/intrinsics/copy_unaligned.rs:LL:CC | LL | copy_nonoverlapping(&data[5], ptr, 0); | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ accessing memory with alignment ALIGN, but alignment ALIGN is required @@ -7,7 +7,7 @@ LL | copy_nonoverlapping(&data[5], ptr, 0); = 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 = note: BACKTRACE: - = note: inside `main` at $DIR/copy_unaligned.rs:LL:CC + = note: inside `main` at tests/fail/intrinsics/copy_unaligned.rs:LL:CC note: some details are omitted, run with `MIRIFLAGS=-Zmiri-backtrace=full` for a verbose backtrace diff --git a/tests/fail/intrinsics/ctlz_nonzero.stderr b/tests/fail/intrinsics/ctlz_nonzero.stderr index 9889daaa85..5ad3b8ad2a 100644 --- a/tests/fail/intrinsics/ctlz_nonzero.stderr +++ b/tests/fail/intrinsics/ctlz_nonzero.stderr @@ -1,5 +1,5 @@ error: Undefined Behavior: `ctlz_nonzero` called on 0 - --> $DIR/ctlz_nonzero.rs:LL:CC + --> tests/fail/intrinsics/ctlz_nonzero.rs:LL:CC | LL | ctlz_nonzero(0u8); | ^^^^^^^^^^^^^^^^^ `ctlz_nonzero` called on 0 @@ -7,7 +7,7 @@ LL | ctlz_nonzero(0u8); = 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 = note: BACKTRACE: - = note: inside `main` at $DIR/ctlz_nonzero.rs:LL:CC + = note: inside `main` at tests/fail/intrinsics/ctlz_nonzero.rs:LL:CC note: some details are omitted, run with `MIRIFLAGS=-Zmiri-backtrace=full` for a verbose backtrace diff --git a/tests/fail/intrinsics/cttz_nonzero.stderr b/tests/fail/intrinsics/cttz_nonzero.stderr index 0f75657e17..d0263ac1e4 100644 --- a/tests/fail/intrinsics/cttz_nonzero.stderr +++ b/tests/fail/intrinsics/cttz_nonzero.stderr @@ -1,5 +1,5 @@ error: Undefined Behavior: `cttz_nonzero` called on 0 - --> $DIR/cttz_nonzero.rs:LL:CC + --> tests/fail/intrinsics/cttz_nonzero.rs:LL:CC | LL | cttz_nonzero(0u8); | ^^^^^^^^^^^^^^^^^ `cttz_nonzero` called on 0 @@ -7,7 +7,7 @@ LL | cttz_nonzero(0u8); = 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 = note: BACKTRACE: - = note: inside `main` at $DIR/cttz_nonzero.rs:LL:CC + = note: inside `main` at tests/fail/intrinsics/cttz_nonzero.rs:LL:CC note: some details are omitted, run with `MIRIFLAGS=-Zmiri-backtrace=full` for a verbose backtrace diff --git a/tests/fail/intrinsics/div-by-zero.stderr b/tests/fail/intrinsics/div-by-zero.stderr index 9f66e63ca5..e276874ba2 100644 --- a/tests/fail/intrinsics/div-by-zero.stderr +++ b/tests/fail/intrinsics/div-by-zero.stderr @@ -1,5 +1,5 @@ error: Undefined Behavior: dividing by zero - --> $DIR/div-by-zero.rs:LL:CC + --> tests/fail/intrinsics/div-by-zero.rs:LL:CC | LL | let _n = unchecked_div(1i64, 0); | ^^^^^^^^^^^^^^^^^^^^^^ dividing by zero @@ -7,7 +7,7 @@ LL | let _n = unchecked_div(1i64, 0); = 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 = note: BACKTRACE: - = note: inside `main` at $DIR/div-by-zero.rs:LL:CC + = note: inside `main` at tests/fail/intrinsics/div-by-zero.rs:LL:CC note: some details are omitted, run with `MIRIFLAGS=-Zmiri-backtrace=full` for a verbose backtrace diff --git a/tests/fail/intrinsics/exact_div1.stderr b/tests/fail/intrinsics/exact_div1.stderr index ca6125ab89..f133baecfa 100644 --- a/tests/fail/intrinsics/exact_div1.stderr +++ b/tests/fail/intrinsics/exact_div1.stderr @@ -1,5 +1,5 @@ error: Undefined Behavior: calculating the remainder with a divisor of zero - --> $DIR/exact_div1.rs:LL:CC + --> tests/fail/intrinsics/exact_div1.rs:LL:CC | LL | unsafe { std::intrinsics::exact_div(2, 0) }; | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ calculating the remainder with a divisor of zero @@ -7,7 +7,7 @@ LL | unsafe { std::intrinsics::exact_div(2, 0) }; = 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 = note: BACKTRACE: - = note: inside `main` at $DIR/exact_div1.rs:LL:CC + = note: inside `main` at tests/fail/intrinsics/exact_div1.rs:LL:CC note: some details are omitted, run with `MIRIFLAGS=-Zmiri-backtrace=full` for a verbose backtrace diff --git a/tests/fail/intrinsics/exact_div2.stderr b/tests/fail/intrinsics/exact_div2.stderr index 306e9bdc23..315417fe8d 100644 --- a/tests/fail/intrinsics/exact_div2.stderr +++ b/tests/fail/intrinsics/exact_div2.stderr @@ -1,5 +1,5 @@ error: Undefined Behavior: exact_div: 2_u16 cannot be divided by 3_u16 without remainder - --> $DIR/exact_div2.rs:LL:CC + --> tests/fail/intrinsics/exact_div2.rs:LL:CC | LL | unsafe { std::intrinsics::exact_div(2u16, 3) }; | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ exact_div: 2_u16 cannot be divided by 3_u16 without remainder @@ -7,7 +7,7 @@ LL | unsafe { std::intrinsics::exact_div(2u16, 3) }; = 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 = note: BACKTRACE: - = note: inside `main` at $DIR/exact_div2.rs:LL:CC + = note: inside `main` at tests/fail/intrinsics/exact_div2.rs:LL:CC note: some details are omitted, run with `MIRIFLAGS=-Zmiri-backtrace=full` for a verbose backtrace diff --git a/tests/fail/intrinsics/exact_div3.stderr b/tests/fail/intrinsics/exact_div3.stderr index cbcb093a4e..42f52540a4 100644 --- a/tests/fail/intrinsics/exact_div3.stderr +++ b/tests/fail/intrinsics/exact_div3.stderr @@ -1,5 +1,5 @@ error: Undefined Behavior: exact_div: -19_i8 cannot be divided by 2_i8 without remainder - --> $DIR/exact_div3.rs:LL:CC + --> tests/fail/intrinsics/exact_div3.rs:LL:CC | LL | unsafe { std::intrinsics::exact_div(-19i8, 2) }; | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ exact_div: -19_i8 cannot be divided by 2_i8 without remainder @@ -7,7 +7,7 @@ LL | unsafe { std::intrinsics::exact_div(-19i8, 2) }; = 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 = note: BACKTRACE: - = note: inside `main` at $DIR/exact_div3.rs:LL:CC + = note: inside `main` at tests/fail/intrinsics/exact_div3.rs:LL:CC note: some details are omitted, run with `MIRIFLAGS=-Zmiri-backtrace=full` for a verbose backtrace diff --git a/tests/fail/intrinsics/exact_div4.stderr b/tests/fail/intrinsics/exact_div4.stderr index 1b903bc97a..723ed4e49e 100644 --- a/tests/fail/intrinsics/exact_div4.stderr +++ b/tests/fail/intrinsics/exact_div4.stderr @@ -1,5 +1,5 @@ error: Undefined Behavior: overflow in signed remainder (dividing MIN by -1) - --> $DIR/exact_div4.rs:LL:CC + --> tests/fail/intrinsics/exact_div4.rs:LL:CC | LL | unsafe { std::intrinsics::exact_div(i64::MIN, -1) }; | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ overflow in signed remainder (dividing MIN by -1) @@ -7,7 +7,7 @@ LL | unsafe { std::intrinsics::exact_div(i64::MIN, -1) }; = 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 = note: BACKTRACE: - = note: inside `main` at $DIR/exact_div4.rs:LL:CC + = note: inside `main` at tests/fail/intrinsics/exact_div4.rs:LL:CC note: some details are omitted, run with `MIRIFLAGS=-Zmiri-backtrace=full` for a verbose backtrace diff --git a/tests/fail/intrinsics/fast_math_both.stderr b/tests/fail/intrinsics/fast_math_both.stderr index feba0c5991..7579a81e3e 100644 --- a/tests/fail/intrinsics/fast_math_both.stderr +++ b/tests/fail/intrinsics/fast_math_both.stderr @@ -1,5 +1,5 @@ error: Undefined Behavior: `fsub_fast` intrinsic called with non-finite value as both parameters - --> $DIR/fast_math_both.rs:LL:CC + --> tests/fail/intrinsics/fast_math_both.rs:LL:CC | LL | ...: f32 = core::intrinsics::fsub_fast(f32::NAN, f32::NAN); | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ `fsub_fast` intrinsic called with non-finite value as both parameters @@ -7,7 +7,7 @@ LL | ...: f32 = core::intrinsics::fsub_fast(f32::NAN, f32::NAN); = 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 = note: BACKTRACE: - = note: inside `main` at $DIR/fast_math_both.rs:LL:CC + = note: inside `main` at tests/fail/intrinsics/fast_math_both.rs:LL:CC note: some details are omitted, run with `MIRIFLAGS=-Zmiri-backtrace=full` for a verbose backtrace diff --git a/tests/fail/intrinsics/fast_math_first.stderr b/tests/fail/intrinsics/fast_math_first.stderr index b26b5a3721..8295ec1089 100644 --- a/tests/fail/intrinsics/fast_math_first.stderr +++ b/tests/fail/intrinsics/fast_math_first.stderr @@ -1,5 +1,5 @@ error: Undefined Behavior: `frem_fast` intrinsic called with non-finite value as first parameter - --> $DIR/fast_math_first.rs:LL:CC + --> tests/fail/intrinsics/fast_math_first.rs:LL:CC | LL | ... let _x: f32 = core::intrinsics::frem_fast(f32::NAN, 3.2); | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ `frem_fast` intrinsic called with non-finite value as first parameter @@ -7,7 +7,7 @@ LL | ... let _x: f32 = core::intrinsics::frem_fast(f32::NAN, 3.2); = 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 = note: BACKTRACE: - = note: inside `main` at $DIR/fast_math_first.rs:LL:CC + = note: inside `main` at tests/fail/intrinsics/fast_math_first.rs:LL:CC note: some details are omitted, run with `MIRIFLAGS=-Zmiri-backtrace=full` for a verbose backtrace diff --git a/tests/fail/intrinsics/fast_math_result.stderr b/tests/fail/intrinsics/fast_math_result.stderr index 5b24d22502..8ddbd4cc19 100644 --- a/tests/fail/intrinsics/fast_math_result.stderr +++ b/tests/fail/intrinsics/fast_math_result.stderr @@ -1,5 +1,5 @@ error: Undefined Behavior: `fdiv_fast` intrinsic produced non-finite value as result - --> $DIR/fast_math_result.rs:LL:CC + --> tests/fail/intrinsics/fast_math_result.rs:LL:CC | LL | let _x: f32 = core::intrinsics::fdiv_fast(1.0, 0.0); | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ `fdiv_fast` intrinsic produced non-finite value as result @@ -7,7 +7,7 @@ LL | let _x: f32 = core::intrinsics::fdiv_fast(1.0, 0.0); = 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 = note: BACKTRACE: - = note: inside `main` at $DIR/fast_math_result.rs:LL:CC + = note: inside `main` at tests/fail/intrinsics/fast_math_result.rs:LL:CC note: some details are omitted, run with `MIRIFLAGS=-Zmiri-backtrace=full` for a verbose backtrace diff --git a/tests/fail/intrinsics/fast_math_second.stderr b/tests/fail/intrinsics/fast_math_second.stderr index cb46aa97a8..0fde006b3b 100644 --- a/tests/fail/intrinsics/fast_math_second.stderr +++ b/tests/fail/intrinsics/fast_math_second.stderr @@ -1,5 +1,5 @@ error: Undefined Behavior: `fmul_fast` intrinsic called with non-finite value as second parameter - --> $DIR/fast_math_second.rs:LL:CC + --> tests/fail/intrinsics/fast_math_second.rs:LL:CC | LL | ...f32 = core::intrinsics::fmul_fast(3.4f32, f32::INFINITY); | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ `fmul_fast` intrinsic called with non-finite value as second parameter @@ -7,7 +7,7 @@ LL | ...f32 = core::intrinsics::fmul_fast(3.4f32, f32::INFINITY); = 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 = note: BACKTRACE: - = note: inside `main` at $DIR/fast_math_second.rs:LL:CC + = note: inside `main` at tests/fail/intrinsics/fast_math_second.rs:LL:CC note: some details are omitted, run with `MIRIFLAGS=-Zmiri-backtrace=full` for a verbose backtrace diff --git a/tests/fail/intrinsics/float_to_int_32_inf1.stderr b/tests/fail/intrinsics/float_to_int_32_inf1.stderr index 2de8f3420b..bcc8ff667f 100644 --- a/tests/fail/intrinsics/float_to_int_32_inf1.stderr +++ b/tests/fail/intrinsics/float_to_int_32_inf1.stderr @@ -1,5 +1,5 @@ error: Undefined Behavior: `float_to_int_unchecked` intrinsic called on +Inf_f32 which cannot be represented in target type `i32` - --> $DIR/float_to_int_32_inf1.rs:LL:CC + --> tests/fail/intrinsics/float_to_int_32_inf1.rs:LL:CC | LL | float_to_int_unchecked::(f32::INFINITY); | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ `float_to_int_unchecked` intrinsic called on +Inf_f32 which cannot be represented in target type `i32` @@ -7,7 +7,7 @@ LL | float_to_int_unchecked::(f32::INFINITY); = 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 = note: BACKTRACE: - = note: inside `main` at $DIR/float_to_int_32_inf1.rs:LL:CC + = note: inside `main` at tests/fail/intrinsics/float_to_int_32_inf1.rs:LL:CC note: some details are omitted, run with `MIRIFLAGS=-Zmiri-backtrace=full` for a verbose backtrace diff --git a/tests/fail/intrinsics/float_to_int_32_infneg1.stderr b/tests/fail/intrinsics/float_to_int_32_infneg1.stderr index 53ed208bde..9ac910c8d2 100644 --- a/tests/fail/intrinsics/float_to_int_32_infneg1.stderr +++ b/tests/fail/intrinsics/float_to_int_32_infneg1.stderr @@ -1,5 +1,5 @@ error: Undefined Behavior: `float_to_int_unchecked` intrinsic called on -Inf_f32 which cannot be represented in target type `i32` - --> $DIR/float_to_int_32_infneg1.rs:LL:CC + --> tests/fail/intrinsics/float_to_int_32_infneg1.rs:LL:CC | LL | float_to_int_unchecked::(f32::NEG_INFINITY); | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ `float_to_int_unchecked` intrinsic called on -Inf_f32 which cannot be represented in target type `i32` @@ -7,7 +7,7 @@ LL | float_to_int_unchecked::(f32::NEG_INFINITY); = 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 = note: BACKTRACE: - = note: inside `main` at $DIR/float_to_int_32_infneg1.rs:LL:CC + = note: inside `main` at tests/fail/intrinsics/float_to_int_32_infneg1.rs:LL:CC note: some details are omitted, run with `MIRIFLAGS=-Zmiri-backtrace=full` for a verbose backtrace diff --git a/tests/fail/intrinsics/float_to_int_32_nan.stderr b/tests/fail/intrinsics/float_to_int_32_nan.stderr index afda7124c1..b377b70136 100644 --- a/tests/fail/intrinsics/float_to_int_32_nan.stderr +++ b/tests/fail/intrinsics/float_to_int_32_nan.stderr @@ -1,5 +1,5 @@ error: Undefined Behavior: `float_to_int_unchecked` intrinsic called on NaN_f32 which cannot be represented in target type `u32` - --> $DIR/float_to_int_32_nan.rs:LL:CC + --> tests/fail/intrinsics/float_to_int_32_nan.rs:LL:CC | LL | float_to_int_unchecked::(f32::NAN); | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ `float_to_int_unchecked` intrinsic called on NaN_f32 which cannot be represented in target type `u32` @@ -7,7 +7,7 @@ LL | float_to_int_unchecked::(f32::NAN); = 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 = note: BACKTRACE: - = note: inside `main` at $DIR/float_to_int_32_nan.rs:LL:CC + = note: inside `main` at tests/fail/intrinsics/float_to_int_32_nan.rs:LL:CC note: some details are omitted, run with `MIRIFLAGS=-Zmiri-backtrace=full` for a verbose backtrace diff --git a/tests/fail/intrinsics/float_to_int_32_nanneg.stderr b/tests/fail/intrinsics/float_to_int_32_nanneg.stderr index 8ba46de864..2a0dcdfaee 100644 --- a/tests/fail/intrinsics/float_to_int_32_nanneg.stderr +++ b/tests/fail/intrinsics/float_to_int_32_nanneg.stderr @@ -1,5 +1,5 @@ error: Undefined Behavior: `float_to_int_unchecked` intrinsic called on NaN_f32 which cannot be represented in target type `u32` - --> $DIR/float_to_int_32_nanneg.rs:LL:CC + --> tests/fail/intrinsics/float_to_int_32_nanneg.rs:LL:CC | LL | float_to_int_unchecked::(-f32::NAN); | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ `float_to_int_unchecked` intrinsic called on NaN_f32 which cannot be represented in target type `u32` @@ -7,7 +7,7 @@ LL | float_to_int_unchecked::(-f32::NAN); = 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 = note: BACKTRACE: - = note: inside `main` at $DIR/float_to_int_32_nanneg.rs:LL:CC + = note: inside `main` at tests/fail/intrinsics/float_to_int_32_nanneg.rs:LL:CC note: some details are omitted, run with `MIRIFLAGS=-Zmiri-backtrace=full` for a verbose backtrace diff --git a/tests/fail/intrinsics/float_to_int_32_neg.stderr b/tests/fail/intrinsics/float_to_int_32_neg.stderr index 9f4b2af216..45be75e2f0 100644 --- a/tests/fail/intrinsics/float_to_int_32_neg.stderr +++ b/tests/fail/intrinsics/float_to_int_32_neg.stderr @@ -1,5 +1,5 @@ error: Undefined Behavior: `float_to_int_unchecked` intrinsic called on -1f32 which cannot be represented in target type `u32` - --> $DIR/float_to_int_32_neg.rs:LL:CC + --> tests/fail/intrinsics/float_to_int_32_neg.rs:LL:CC | LL | float_to_int_unchecked::(-1.000000001f32); | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ `float_to_int_unchecked` intrinsic called on -1f32 which cannot be represented in target type `u32` @@ -7,7 +7,7 @@ LL | float_to_int_unchecked::(-1.000000001f32); = 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 = note: BACKTRACE: - = note: inside `main` at $DIR/float_to_int_32_neg.rs:LL:CC + = note: inside `main` at tests/fail/intrinsics/float_to_int_32_neg.rs:LL:CC note: some details are omitted, run with `MIRIFLAGS=-Zmiri-backtrace=full` for a verbose backtrace diff --git a/tests/fail/intrinsics/float_to_int_32_too_big1.stderr b/tests/fail/intrinsics/float_to_int_32_too_big1.stderr index a8e56ddb59..8597dc0b07 100644 --- a/tests/fail/intrinsics/float_to_int_32_too_big1.stderr +++ b/tests/fail/intrinsics/float_to_int_32_too_big1.stderr @@ -1,5 +1,5 @@ error: Undefined Behavior: `float_to_int_unchecked` intrinsic called on 2.14748365E+9f32 which cannot be represented in target type `i32` - --> $DIR/float_to_int_32_too_big1.rs:LL:CC + --> tests/fail/intrinsics/float_to_int_32_too_big1.rs:LL:CC | LL | float_to_int_unchecked::(2147483648.0f32); | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ `float_to_int_unchecked` intrinsic called on 2.14748365E+9f32 which cannot be represented in target type `i32` @@ -7,7 +7,7 @@ LL | float_to_int_unchecked::(2147483648.0f32); = 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 = note: BACKTRACE: - = note: inside `main` at $DIR/float_to_int_32_too_big1.rs:LL:CC + = note: inside `main` at tests/fail/intrinsics/float_to_int_32_too_big1.rs:LL:CC note: some details are omitted, run with `MIRIFLAGS=-Zmiri-backtrace=full` for a verbose backtrace diff --git a/tests/fail/intrinsics/float_to_int_32_too_big2.stderr b/tests/fail/intrinsics/float_to_int_32_too_big2.stderr index a966e2e639..d79004e642 100644 --- a/tests/fail/intrinsics/float_to_int_32_too_big2.stderr +++ b/tests/fail/intrinsics/float_to_int_32_too_big2.stderr @@ -1,5 +1,5 @@ error: Undefined Behavior: `float_to_int_unchecked` intrinsic called on 4.2949673E+9f32 which cannot be represented in target type `u32` - --> $DIR/float_to_int_32_too_big2.rs:LL:CC + --> tests/fail/intrinsics/float_to_int_32_too_big2.rs:LL:CC | LL | float_to_int_unchecked::((u32::MAX - 127) as f32); | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ `float_to_int_unchecked` intrinsic called on 4.2949673E+9f32 which cannot be represented in target type `u32` @@ -7,7 +7,7 @@ LL | float_to_int_unchecked::((u32::MAX - 127) as f32); = 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 = note: BACKTRACE: - = note: inside `main` at $DIR/float_to_int_32_too_big2.rs:LL:CC + = note: inside `main` at tests/fail/intrinsics/float_to_int_32_too_big2.rs:LL:CC note: some details are omitted, run with `MIRIFLAGS=-Zmiri-backtrace=full` for a verbose backtrace diff --git a/tests/fail/intrinsics/float_to_int_32_too_small1.stderr b/tests/fail/intrinsics/float_to_int_32_too_small1.stderr index 6115b381eb..6a1d48f480 100644 --- a/tests/fail/intrinsics/float_to_int_32_too_small1.stderr +++ b/tests/fail/intrinsics/float_to_int_32_too_small1.stderr @@ -1,5 +1,5 @@ error: Undefined Behavior: `float_to_int_unchecked` intrinsic called on -2.1474839E+9f32 which cannot be represented in target type `i32` - --> $DIR/float_to_int_32_too_small1.rs:LL:CC + --> tests/fail/intrinsics/float_to_int_32_too_small1.rs:LL:CC | LL | float_to_int_unchecked::(-2147483904.0f32); | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ `float_to_int_unchecked` intrinsic called on -2.1474839E+9f32 which cannot be represented in target type `i32` @@ -7,7 +7,7 @@ LL | float_to_int_unchecked::(-2147483904.0f32); = 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 = note: BACKTRACE: - = note: inside `main` at $DIR/float_to_int_32_too_small1.rs:LL:CC + = note: inside `main` at tests/fail/intrinsics/float_to_int_32_too_small1.rs:LL:CC note: some details are omitted, run with `MIRIFLAGS=-Zmiri-backtrace=full` for a verbose backtrace diff --git a/tests/fail/intrinsics/float_to_int_64_inf1.stderr b/tests/fail/intrinsics/float_to_int_64_inf1.stderr index 5db9fb1417..d77544cb37 100644 --- a/tests/fail/intrinsics/float_to_int_64_inf1.stderr +++ b/tests/fail/intrinsics/float_to_int_64_inf1.stderr @@ -1,5 +1,5 @@ error: Undefined Behavior: `float_to_int_unchecked` intrinsic called on +Inf_f64 which cannot be represented in target type `u128` - --> $DIR/float_to_int_64_inf1.rs:LL:CC + --> tests/fail/intrinsics/float_to_int_64_inf1.rs:LL:CC | LL | float_to_int_unchecked::(f64::INFINITY); | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ `float_to_int_unchecked` intrinsic called on +Inf_f64 which cannot be represented in target type `u128` @@ -7,7 +7,7 @@ LL | float_to_int_unchecked::(f64::INFINITY); = 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 = note: BACKTRACE: - = note: inside `main` at $DIR/float_to_int_64_inf1.rs:LL:CC + = note: inside `main` at tests/fail/intrinsics/float_to_int_64_inf1.rs:LL:CC note: some details are omitted, run with `MIRIFLAGS=-Zmiri-backtrace=full` for a verbose backtrace diff --git a/tests/fail/intrinsics/float_to_int_64_infneg1.stderr b/tests/fail/intrinsics/float_to_int_64_infneg1.stderr index 3e8dadb79e..c6f9eb4113 100644 --- a/tests/fail/intrinsics/float_to_int_64_infneg1.stderr +++ b/tests/fail/intrinsics/float_to_int_64_infneg1.stderr @@ -1,5 +1,5 @@ error: Undefined Behavior: `float_to_int_unchecked` intrinsic called on -Inf_f64 which cannot be represented in target type `u128` - --> $DIR/float_to_int_64_infneg1.rs:LL:CC + --> tests/fail/intrinsics/float_to_int_64_infneg1.rs:LL:CC | LL | float_to_int_unchecked::(f64::NEG_INFINITY); | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ `float_to_int_unchecked` intrinsic called on -Inf_f64 which cannot be represented in target type `u128` @@ -7,7 +7,7 @@ LL | float_to_int_unchecked::(f64::NEG_INFINITY); = 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 = note: BACKTRACE: - = note: inside `main` at $DIR/float_to_int_64_infneg1.rs:LL:CC + = note: inside `main` at tests/fail/intrinsics/float_to_int_64_infneg1.rs:LL:CC note: some details are omitted, run with `MIRIFLAGS=-Zmiri-backtrace=full` for a verbose backtrace diff --git a/tests/fail/intrinsics/float_to_int_64_infneg2.stderr b/tests/fail/intrinsics/float_to_int_64_infneg2.stderr index cb59974bf4..fc80f1679c 100644 --- a/tests/fail/intrinsics/float_to_int_64_infneg2.stderr +++ b/tests/fail/intrinsics/float_to_int_64_infneg2.stderr @@ -1,5 +1,5 @@ error: Undefined Behavior: `float_to_int_unchecked` intrinsic called on -Inf_f64 which cannot be represented in target type `i128` - --> $DIR/float_to_int_64_infneg2.rs:LL:CC + --> tests/fail/intrinsics/float_to_int_64_infneg2.rs:LL:CC | LL | float_to_int_unchecked::(f64::NEG_INFINITY); | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ `float_to_int_unchecked` intrinsic called on -Inf_f64 which cannot be represented in target type `i128` @@ -7,7 +7,7 @@ LL | float_to_int_unchecked::(f64::NEG_INFINITY); = 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 = note: BACKTRACE: - = note: inside `main` at $DIR/float_to_int_64_infneg2.rs:LL:CC + = note: inside `main` at tests/fail/intrinsics/float_to_int_64_infneg2.rs:LL:CC note: some details are omitted, run with `MIRIFLAGS=-Zmiri-backtrace=full` for a verbose backtrace diff --git a/tests/fail/intrinsics/float_to_int_64_nan.stderr b/tests/fail/intrinsics/float_to_int_64_nan.stderr index 6869706051..01059ed5a7 100644 --- a/tests/fail/intrinsics/float_to_int_64_nan.stderr +++ b/tests/fail/intrinsics/float_to_int_64_nan.stderr @@ -1,5 +1,5 @@ error: Undefined Behavior: `float_to_int_unchecked` intrinsic called on NaN_f64 which cannot be represented in target type `u32` - --> $DIR/float_to_int_64_nan.rs:LL:CC + --> tests/fail/intrinsics/float_to_int_64_nan.rs:LL:CC | LL | float_to_int_unchecked::(f64::NAN); | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ `float_to_int_unchecked` intrinsic called on NaN_f64 which cannot be represented in target type `u32` @@ -7,7 +7,7 @@ LL | float_to_int_unchecked::(f64::NAN); = 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 = note: BACKTRACE: - = note: inside `main` at $DIR/float_to_int_64_nan.rs:LL:CC + = note: inside `main` at tests/fail/intrinsics/float_to_int_64_nan.rs:LL:CC note: some details are omitted, run with `MIRIFLAGS=-Zmiri-backtrace=full` for a verbose backtrace diff --git a/tests/fail/intrinsics/float_to_int_64_neg.stderr b/tests/fail/intrinsics/float_to_int_64_neg.stderr index 505a6463cd..f17d502d51 100644 --- a/tests/fail/intrinsics/float_to_int_64_neg.stderr +++ b/tests/fail/intrinsics/float_to_int_64_neg.stderr @@ -1,5 +1,5 @@ error: Undefined Behavior: `float_to_int_unchecked` intrinsic called on -1.0000000000000999f64 which cannot be represented in target type `u128` - --> $DIR/float_to_int_64_neg.rs:LL:CC + --> tests/fail/intrinsics/float_to_int_64_neg.rs:LL:CC | LL | float_to_int_unchecked::(-1.0000000000001f64); | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ `float_to_int_unchecked` intrinsic called on -1.0000000000000999f64 which cannot be represented in target type `u128` @@ -7,7 +7,7 @@ LL | float_to_int_unchecked::(-1.0000000000001f64); = 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 = note: BACKTRACE: - = note: inside `main` at $DIR/float_to_int_64_neg.rs:LL:CC + = note: inside `main` at tests/fail/intrinsics/float_to_int_64_neg.rs:LL:CC note: some details are omitted, run with `MIRIFLAGS=-Zmiri-backtrace=full` for a verbose backtrace diff --git a/tests/fail/intrinsics/float_to_int_64_too_big1.stderr b/tests/fail/intrinsics/float_to_int_64_too_big1.stderr index bcfd394686..9379be3f82 100644 --- a/tests/fail/intrinsics/float_to_int_64_too_big1.stderr +++ b/tests/fail/intrinsics/float_to_int_64_too_big1.stderr @@ -1,5 +1,5 @@ error: Undefined Behavior: `float_to_int_unchecked` intrinsic called on 2147483648f64 which cannot be represented in target type `i32` - --> $DIR/float_to_int_64_too_big1.rs:LL:CC + --> tests/fail/intrinsics/float_to_int_64_too_big1.rs:LL:CC | LL | float_to_int_unchecked::(2147483648.0f64); | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ `float_to_int_unchecked` intrinsic called on 2147483648f64 which cannot be represented in target type `i32` @@ -7,7 +7,7 @@ LL | float_to_int_unchecked::(2147483648.0f64); = 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 = note: BACKTRACE: - = note: inside `main` at $DIR/float_to_int_64_too_big1.rs:LL:CC + = note: inside `main` at tests/fail/intrinsics/float_to_int_64_too_big1.rs:LL:CC note: some details are omitted, run with `MIRIFLAGS=-Zmiri-backtrace=full` for a verbose backtrace diff --git a/tests/fail/intrinsics/float_to_int_64_too_big2.stderr b/tests/fail/intrinsics/float_to_int_64_too_big2.stderr index ac6139d7e7..1c0a0e0e88 100644 --- a/tests/fail/intrinsics/float_to_int_64_too_big2.stderr +++ b/tests/fail/intrinsics/float_to_int_64_too_big2.stderr @@ -1,5 +1,5 @@ error: Undefined Behavior: `float_to_int_unchecked` intrinsic called on 9.2233720368547758E+18f64 which cannot be represented in target type `i64` - --> $DIR/float_to_int_64_too_big2.rs:LL:CC + --> tests/fail/intrinsics/float_to_int_64_too_big2.rs:LL:CC | LL | float_to_int_unchecked::(9223372036854775808.0f64); | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ `float_to_int_unchecked` intrinsic called on 9.2233720368547758E+18f64 which cannot be represented in target type `i64` @@ -7,7 +7,7 @@ LL | float_to_int_unchecked::(9223372036854775808.0f64); = 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 = note: BACKTRACE: - = note: inside `main` at $DIR/float_to_int_64_too_big2.rs:LL:CC + = note: inside `main` at tests/fail/intrinsics/float_to_int_64_too_big2.rs:LL:CC note: some details are omitted, run with `MIRIFLAGS=-Zmiri-backtrace=full` for a verbose backtrace diff --git a/tests/fail/intrinsics/float_to_int_64_too_big3.stderr b/tests/fail/intrinsics/float_to_int_64_too_big3.stderr index e289b4c0fc..54ff73d596 100644 --- a/tests/fail/intrinsics/float_to_int_64_too_big3.stderr +++ b/tests/fail/intrinsics/float_to_int_64_too_big3.stderr @@ -1,5 +1,5 @@ error: Undefined Behavior: `float_to_int_unchecked` intrinsic called on 1.8446744073709552E+19f64 which cannot be represented in target type `u64` - --> $DIR/float_to_int_64_too_big3.rs:LL:CC + --> tests/fail/intrinsics/float_to_int_64_too_big3.rs:LL:CC | LL | float_to_int_unchecked::(18446744073709551616.0f64); | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ `float_to_int_unchecked` intrinsic called on 1.8446744073709552E+19f64 which cannot be represented in target type `u64` @@ -7,7 +7,7 @@ LL | float_to_int_unchecked::(18446744073709551616.0f64); = 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 = note: BACKTRACE: - = note: inside `main` at $DIR/float_to_int_64_too_big3.rs:LL:CC + = note: inside `main` at tests/fail/intrinsics/float_to_int_64_too_big3.rs:LL:CC note: some details are omitted, run with `MIRIFLAGS=-Zmiri-backtrace=full` for a verbose backtrace diff --git a/tests/fail/intrinsics/float_to_int_64_too_big4.stderr b/tests/fail/intrinsics/float_to_int_64_too_big4.stderr index 657c72daa6..b622867c09 100644 --- a/tests/fail/intrinsics/float_to_int_64_too_big4.stderr +++ b/tests/fail/intrinsics/float_to_int_64_too_big4.stderr @@ -1,5 +1,5 @@ error: Undefined Behavior: `float_to_int_unchecked` intrinsic called on 3.4028236692093846E+38f64 which cannot be represented in target type `u128` - --> $DIR/float_to_int_64_too_big4.rs:LL:CC + --> tests/fail/intrinsics/float_to_int_64_too_big4.rs:LL:CC | LL | float_to_int_unchecked::(u128::MAX as f64); | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ `float_to_int_unchecked` intrinsic called on 3.4028236692093846E+38f64 which cannot be represented in target type `u128` @@ -7,7 +7,7 @@ LL | float_to_int_unchecked::(u128::MAX as f64); = 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 = note: BACKTRACE: - = note: inside `main` at $DIR/float_to_int_64_too_big4.rs:LL:CC + = note: inside `main` at tests/fail/intrinsics/float_to_int_64_too_big4.rs:LL:CC note: some details are omitted, run with `MIRIFLAGS=-Zmiri-backtrace=full` for a verbose backtrace diff --git a/tests/fail/intrinsics/float_to_int_64_too_big5.stderr b/tests/fail/intrinsics/float_to_int_64_too_big5.stderr index 2a61b5fe15..ffb8b0d174 100644 --- a/tests/fail/intrinsics/float_to_int_64_too_big5.stderr +++ b/tests/fail/intrinsics/float_to_int_64_too_big5.stderr @@ -1,5 +1,5 @@ error: Undefined Behavior: `float_to_int_unchecked` intrinsic called on 2.4028236692093845E+38f64 which cannot be represented in target type `i128` - --> $DIR/float_to_int_64_too_big5.rs:LL:CC + --> tests/fail/intrinsics/float_to_int_64_too_big5.rs:LL:CC | LL | float_to_int_unchecked::(240282366920938463463374607431768211455.0f64); | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ `float_to_int_unchecked` intrinsic called on 2.4028236692093845E+38f64 which cannot be represented in target type `i128` @@ -7,7 +7,7 @@ LL | float_to_int_unchecked::(2402823669209384634633746074317 = 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 = note: BACKTRACE: - = note: inside `main` at $DIR/float_to_int_64_too_big5.rs:LL:CC + = note: inside `main` at tests/fail/intrinsics/float_to_int_64_too_big5.rs:LL:CC note: some details are omitted, run with `MIRIFLAGS=-Zmiri-backtrace=full` for a verbose backtrace diff --git a/tests/fail/intrinsics/float_to_int_64_too_big6.stderr b/tests/fail/intrinsics/float_to_int_64_too_big6.stderr index 1b4b76ced1..8c5d81e01c 100644 --- a/tests/fail/intrinsics/float_to_int_64_too_big6.stderr +++ b/tests/fail/intrinsics/float_to_int_64_too_big6.stderr @@ -1,5 +1,5 @@ error: Undefined Behavior: `float_to_int_unchecked` intrinsic called on 1.7976931348623157E+308f64 which cannot be represented in target type `u128` - --> $DIR/float_to_int_64_too_big6.rs:LL:CC + --> tests/fail/intrinsics/float_to_int_64_too_big6.rs:LL:CC | LL | float_to_int_unchecked::(f64::MAX); | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ `float_to_int_unchecked` intrinsic called on 1.7976931348623157E+308f64 which cannot be represented in target type `u128` @@ -7,7 +7,7 @@ LL | float_to_int_unchecked::(f64::MAX); = 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 = note: BACKTRACE: - = note: inside `main` at $DIR/float_to_int_64_too_big6.rs:LL:CC + = note: inside `main` at tests/fail/intrinsics/float_to_int_64_too_big6.rs:LL:CC note: some details are omitted, run with `MIRIFLAGS=-Zmiri-backtrace=full` for a verbose backtrace diff --git a/tests/fail/intrinsics/float_to_int_64_too_big7.stderr b/tests/fail/intrinsics/float_to_int_64_too_big7.stderr index 47df8d90c0..237540e2a6 100644 --- a/tests/fail/intrinsics/float_to_int_64_too_big7.stderr +++ b/tests/fail/intrinsics/float_to_int_64_too_big7.stderr @@ -1,5 +1,5 @@ error: Undefined Behavior: `float_to_int_unchecked` intrinsic called on -1.7976931348623157E+308f64 which cannot be represented in target type `i128` - --> $DIR/float_to_int_64_too_big7.rs:LL:CC + --> tests/fail/intrinsics/float_to_int_64_too_big7.rs:LL:CC | LL | float_to_int_unchecked::(f64::MIN); | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ `float_to_int_unchecked` intrinsic called on -1.7976931348623157E+308f64 which cannot be represented in target type `i128` @@ -7,7 +7,7 @@ LL | float_to_int_unchecked::(f64::MIN); = 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 = note: BACKTRACE: - = note: inside `main` at $DIR/float_to_int_64_too_big7.rs:LL:CC + = note: inside `main` at tests/fail/intrinsics/float_to_int_64_too_big7.rs:LL:CC note: some details are omitted, run with `MIRIFLAGS=-Zmiri-backtrace=full` for a verbose backtrace diff --git a/tests/fail/intrinsics/float_to_int_64_too_small1.stderr b/tests/fail/intrinsics/float_to_int_64_too_small1.stderr index c5eb405ee9..d1b9076d14 100644 --- a/tests/fail/intrinsics/float_to_int_64_too_small1.stderr +++ b/tests/fail/intrinsics/float_to_int_64_too_small1.stderr @@ -1,5 +1,5 @@ error: Undefined Behavior: `float_to_int_unchecked` intrinsic called on -2147483649f64 which cannot be represented in target type `i32` - --> $DIR/float_to_int_64_too_small1.rs:LL:CC + --> tests/fail/intrinsics/float_to_int_64_too_small1.rs:LL:CC | LL | float_to_int_unchecked::(-2147483649.0f64); | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ `float_to_int_unchecked` intrinsic called on -2147483649f64 which cannot be represented in target type `i32` @@ -7,7 +7,7 @@ LL | float_to_int_unchecked::(-2147483649.0f64); = 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 = note: BACKTRACE: - = note: inside `main` at $DIR/float_to_int_64_too_small1.rs:LL:CC + = note: inside `main` at tests/fail/intrinsics/float_to_int_64_too_small1.rs:LL:CC note: some details are omitted, run with `MIRIFLAGS=-Zmiri-backtrace=full` for a verbose backtrace diff --git a/tests/fail/intrinsics/float_to_int_64_too_small2.stderr b/tests/fail/intrinsics/float_to_int_64_too_small2.stderr index e7d12a18a2..bc167cd069 100644 --- a/tests/fail/intrinsics/float_to_int_64_too_small2.stderr +++ b/tests/fail/intrinsics/float_to_int_64_too_small2.stderr @@ -1,5 +1,5 @@ error: Undefined Behavior: `float_to_int_unchecked` intrinsic called on -9.2233720368547778E+18f64 which cannot be represented in target type `i64` - --> $DIR/float_to_int_64_too_small2.rs:LL:CC + --> tests/fail/intrinsics/float_to_int_64_too_small2.rs:LL:CC | LL | float_to_int_unchecked::(-9223372036854777856.0f64); | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ `float_to_int_unchecked` intrinsic called on -9.2233720368547778E+18f64 which cannot be represented in target type `i64` @@ -7,7 +7,7 @@ LL | float_to_int_unchecked::(-9223372036854777856.0f64); = 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 = note: BACKTRACE: - = note: inside `main` at $DIR/float_to_int_64_too_small2.rs:LL:CC + = note: inside `main` at tests/fail/intrinsics/float_to_int_64_too_small2.rs:LL:CC note: some details are omitted, run with `MIRIFLAGS=-Zmiri-backtrace=full` for a verbose backtrace diff --git a/tests/fail/intrinsics/float_to_int_64_too_small3.stderr b/tests/fail/intrinsics/float_to_int_64_too_small3.stderr index 3d8366c725..60c637b02d 100644 --- a/tests/fail/intrinsics/float_to_int_64_too_small3.stderr +++ b/tests/fail/intrinsics/float_to_int_64_too_small3.stderr @@ -1,5 +1,5 @@ error: Undefined Behavior: `float_to_int_unchecked` intrinsic called on -2.4028236692093845E+38f64 which cannot be represented in target type `i128` - --> $DIR/float_to_int_64_too_small3.rs:LL:CC + --> tests/fail/intrinsics/float_to_int_64_too_small3.rs:LL:CC | LL | float_to_int_unchecked::(-240282366920938463463374607431768211455.0f64); | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ `float_to_int_unchecked` intrinsic called on -2.4028236692093845E+38f64 which cannot be represented in target type `i128` @@ -7,7 +7,7 @@ LL | float_to_int_unchecked::(-240282366920938463463374607431 = 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 = note: BACKTRACE: - = note: inside `main` at $DIR/float_to_int_64_too_small3.rs:LL:CC + = note: inside `main` at tests/fail/intrinsics/float_to_int_64_too_small3.rs:LL:CC note: some details are omitted, run with `MIRIFLAGS=-Zmiri-backtrace=full` for a verbose backtrace diff --git a/tests/fail/intrinsics/intrinsic_target_feature.rs b/tests/fail/intrinsics/intrinsic_target_feature.rs index eb5a16360f..4842d075cb 100644 --- a/tests/fail/intrinsics/intrinsic_target_feature.rs +++ b/tests/fail/intrinsics/intrinsic_target_feature.rs @@ -2,12 +2,7 @@ // Any new targets that are added to CI should be ignored here. // We cannot use `cfg`-based tricks here since the output would be // different for non-x86 targets. -//@ignore-target-aarch64 -//@ignore-target-arm -//@ignore-target-avr -//@ignore-target-s390x -//@ignore-target-thumbv7em -//@ignore-target-wasm +//@ignore-target: aarch64 arm avr s390x thumbv7em wasm // Explicitly disable SSE4.1 because it is enabled by default on macOS //@compile-flags: -C target-feature=-sse4.1 diff --git a/tests/fail/intrinsics/intrinsic_target_feature.stderr b/tests/fail/intrinsics/intrinsic_target_feature.stderr index 8e83d20854..a846fc5dec 100644 --- a/tests/fail/intrinsics/intrinsic_target_feature.stderr +++ b/tests/fail/intrinsics/intrinsic_target_feature.stderr @@ -1,5 +1,5 @@ error: Undefined Behavior: attempted to call intrinsic `llvm.x86.sse41.dpps` that requires missing target feature sse4.1 - --> $DIR/intrinsic_target_feature.rs:LL:CC + --> tests/fail/intrinsics/intrinsic_target_feature.rs:LL:CC | LL | dpps(_mm_setzero_ps(), _mm_setzero_ps(), 0); | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ attempted to call intrinsic `llvm.x86.sse41.dpps` that requires missing target feature sse4.1 @@ -7,7 +7,7 @@ LL | dpps(_mm_setzero_ps(), _mm_setzero_ps(), 0); = 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 = note: BACKTRACE: - = note: inside `main` at $DIR/intrinsic_target_feature.rs:LL:CC + = note: inside `main` at tests/fail/intrinsics/intrinsic_target_feature.rs:LL:CC note: some details are omitted, run with `MIRIFLAGS=-Zmiri-backtrace=full` for a verbose backtrace diff --git a/tests/fail/intrinsics/ptr_metadata_uninit_slice_data.stderr b/tests/fail/intrinsics/ptr_metadata_uninit_slice_data.stderr index 6478dcc250..16708ec275 100644 --- a/tests/fail/intrinsics/ptr_metadata_uninit_slice_data.stderr +++ b/tests/fail/intrinsics/ptr_metadata_uninit_slice_data.stderr @@ -1,5 +1,5 @@ error: Undefined Behavior: using uninitialized data, but this operation requires initialized memory - --> $DIR/ptr_metadata_uninit_slice_data.rs:LL:CC + --> tests/fail/intrinsics/ptr_metadata_uninit_slice_data.rs:LL:CC | LL | RET = PtrMetadata(*p); | ^^^^^^^^^^^^^^^^^^^^^ using uninitialized data, but this operation requires initialized memory @@ -7,9 +7,9 @@ LL | RET = PtrMetadata(*p); = 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 = note: BACKTRACE: - = note: inside `deref_meta` at $DIR/ptr_metadata_uninit_slice_data.rs:LL:CC + = note: inside `deref_meta` at tests/fail/intrinsics/ptr_metadata_uninit_slice_data.rs:LL:CC note: inside `main` - --> $DIR/ptr_metadata_uninit_slice_data.rs:LL:CC + --> tests/fail/intrinsics/ptr_metadata_uninit_slice_data.rs:LL:CC | LL | let _meta = deref_meta(p.as_ptr().cast()); | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ diff --git a/tests/fail/intrinsics/ptr_metadata_uninit_slice_len.stderr b/tests/fail/intrinsics/ptr_metadata_uninit_slice_len.stderr index 84023cf793..ed7acfaa1e 100644 --- a/tests/fail/intrinsics/ptr_metadata_uninit_slice_len.stderr +++ b/tests/fail/intrinsics/ptr_metadata_uninit_slice_len.stderr @@ -1,5 +1,5 @@ warning: integer-to-pointer cast - --> $DIR/ptr_metadata_uninit_slice_len.rs:LL:CC + --> tests/fail/intrinsics/ptr_metadata_uninit_slice_len.rs:LL:CC | LL | (*p.as_mut_ptr().cast::<[*const i32; 2]>())[0] = 4 as *const i32; | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ integer-to-pointer cast @@ -10,10 +10,10 @@ LL | (*p.as_mut_ptr().cast::<[*const i32; 2]>())[0] = 4 as *const i32; = help: you can then set `MIRIFLAGS=-Zmiri-strict-provenance` to ensure you are not relying on `with_exposed_provenance` semantics = help: alternatively, `MIRIFLAGS=-Zmiri-permissive-provenance` disables this warning = note: BACKTRACE: - = note: inside `main` at $DIR/ptr_metadata_uninit_slice_len.rs:LL:CC + = note: inside `main` at tests/fail/intrinsics/ptr_metadata_uninit_slice_len.rs:LL:CC error: Undefined Behavior: using uninitialized data, but this operation requires initialized memory - --> $DIR/ptr_metadata_uninit_slice_len.rs:LL:CC + --> tests/fail/intrinsics/ptr_metadata_uninit_slice_len.rs:LL:CC | LL | RET = PtrMetadata(*p); | ^^^^^^^^^^^^^^^^^^^^^ using uninitialized data, but this operation requires initialized memory @@ -21,9 +21,9 @@ LL | RET = PtrMetadata(*p); = 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 = note: BACKTRACE: - = note: inside `deref_meta` at $DIR/ptr_metadata_uninit_slice_len.rs:LL:CC + = note: inside `deref_meta` at tests/fail/intrinsics/ptr_metadata_uninit_slice_len.rs:LL:CC note: inside `main` - --> $DIR/ptr_metadata_uninit_slice_len.rs:LL:CC + --> tests/fail/intrinsics/ptr_metadata_uninit_slice_len.rs:LL:CC | LL | let _meta = deref_meta(p.as_ptr().cast()); | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ diff --git a/tests/fail/intrinsics/ptr_metadata_uninit_thin.stderr b/tests/fail/intrinsics/ptr_metadata_uninit_thin.stderr index 0e218de0ee..4e0b8d9a42 100644 --- a/tests/fail/intrinsics/ptr_metadata_uninit_thin.stderr +++ b/tests/fail/intrinsics/ptr_metadata_uninit_thin.stderr @@ -1,5 +1,5 @@ error: Undefined Behavior: using uninitialized data, but this operation requires initialized memory - --> $DIR/ptr_metadata_uninit_thin.rs:LL:CC + --> tests/fail/intrinsics/ptr_metadata_uninit_thin.rs:LL:CC | LL | RET = PtrMetadata(*p); | ^^^^^^^^^^^^^^^^^^^^^ using uninitialized data, but this operation requires initialized memory @@ -7,9 +7,9 @@ LL | RET = PtrMetadata(*p); = 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 = note: BACKTRACE: - = note: inside `deref_meta` at $DIR/ptr_metadata_uninit_thin.rs:LL:CC + = note: inside `deref_meta` at tests/fail/intrinsics/ptr_metadata_uninit_thin.rs:LL:CC note: inside `main` - --> $DIR/ptr_metadata_uninit_thin.rs:LL:CC + --> tests/fail/intrinsics/ptr_metadata_uninit_thin.rs:LL:CC | LL | let _meta = deref_meta(p.as_ptr()); | ^^^^^^^^^^^^^^^^^^^^^^ diff --git a/tests/fail/intrinsics/ptr_offset_from_different_ints.stderr b/tests/fail/intrinsics/ptr_offset_from_different_ints.stderr index bf36c54ac7..7ef66390fc 100644 --- a/tests/fail/intrinsics/ptr_offset_from_different_ints.stderr +++ b/tests/fail/intrinsics/ptr_offset_from_different_ints.stderr @@ -1,5 +1,5 @@ error: Undefined Behavior: out-of-bounds `offset_from` origin: expected a pointer to the end of 1 byte of memory, but got 0xb[noalloc] which is a dangling pointer (it has no provenance) - --> $DIR/ptr_offset_from_different_ints.rs:LL:CC + --> tests/fail/intrinsics/ptr_offset_from_different_ints.rs:LL:CC | LL | let _ = p1.byte_offset_from(p2); | ^^^^^^^^^^^^^^^^^^^^^^^ out-of-bounds `offset_from` origin: expected a pointer to the end of 1 byte of memory, but got 0xb[noalloc] which is a dangling pointer (it has no provenance) @@ -7,7 +7,7 @@ LL | let _ = p1.byte_offset_from(p2); = 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 = note: BACKTRACE: - = note: inside `main` at $DIR/ptr_offset_from_different_ints.rs:LL:CC + = note: inside `main` at tests/fail/intrinsics/ptr_offset_from_different_ints.rs:LL:CC note: some details are omitted, run with `MIRIFLAGS=-Zmiri-backtrace=full` for a verbose backtrace diff --git a/tests/fail/intrinsics/ptr_offset_from_unsigned_neg.stderr b/tests/fail/intrinsics/ptr_offset_from_unsigned_neg.stderr index e436f9029d..a0a8e97e7f 100644 --- a/tests/fail/intrinsics/ptr_offset_from_unsigned_neg.stderr +++ b/tests/fail/intrinsics/ptr_offset_from_unsigned_neg.stderr @@ -1,5 +1,5 @@ error: Undefined Behavior: `ptr_offset_from_unsigned` called when first pointer has smaller address than second: $ADDR < $ADDR - --> $DIR/ptr_offset_from_unsigned_neg.rs:LL:CC + --> tests/fail/intrinsics/ptr_offset_from_unsigned_neg.rs:LL:CC | LL | let _val = unsafe { ptr1.sub_ptr(ptr2) }; | ^^^^^^^^^^^^^^^^^^ `ptr_offset_from_unsigned` called when first pointer has smaller address than second: $ADDR < $ADDR @@ -7,7 +7,7 @@ LL | let _val = unsafe { ptr1.sub_ptr(ptr2) }; = 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 = note: BACKTRACE: - = note: inside `main` at $DIR/ptr_offset_from_unsigned_neg.rs:LL:CC + = note: inside `main` at tests/fail/intrinsics/ptr_offset_from_unsigned_neg.rs:LL:CC note: some details are omitted, run with `MIRIFLAGS=-Zmiri-backtrace=full` for a verbose backtrace diff --git a/tests/fail/intrinsics/ptr_offset_int_plus_int.stderr b/tests/fail/intrinsics/ptr_offset_int_plus_int.stderr index 8d37da6506..c87ce32178 100644 --- a/tests/fail/intrinsics/ptr_offset_int_plus_int.stderr +++ b/tests/fail/intrinsics/ptr_offset_int_plus_int.stderr @@ -1,5 +1,5 @@ error: Undefined Behavior: out-of-bounds pointer arithmetic: expected a pointer to 1 byte of memory, but got 0x1[noalloc] which is a dangling pointer (it has no provenance) - --> $DIR/ptr_offset_int_plus_int.rs:LL:CC + --> tests/fail/intrinsics/ptr_offset_int_plus_int.rs:LL:CC | LL | let _val = (1 as *mut u8).offset(1); | ^^^^^^^^^^^^^^^^^^^^^^^^ out-of-bounds pointer arithmetic: expected a pointer to 1 byte of memory, but got 0x1[noalloc] which is a dangling pointer (it has no provenance) @@ -7,7 +7,7 @@ LL | let _val = (1 as *mut u8).offset(1); = 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 = note: BACKTRACE: - = note: inside `main` at $DIR/ptr_offset_int_plus_int.rs:LL:CC + = note: inside `main` at tests/fail/intrinsics/ptr_offset_int_plus_int.rs:LL:CC note: some details are omitted, run with `MIRIFLAGS=-Zmiri-backtrace=full` for a verbose backtrace diff --git a/tests/fail/intrinsics/ptr_offset_int_plus_ptr.stderr b/tests/fail/intrinsics/ptr_offset_int_plus_ptr.stderr index 2cd02bee2c..78239d5013 100644 --- a/tests/fail/intrinsics/ptr_offset_int_plus_ptr.stderr +++ b/tests/fail/intrinsics/ptr_offset_int_plus_ptr.stderr @@ -1,5 +1,5 @@ error: Undefined Behavior: out-of-bounds pointer arithmetic: expected a pointer to $BYTES bytes of memory, but got 0x1[noalloc] which is a dangling pointer (it has no provenance) - --> $DIR/ptr_offset_int_plus_ptr.rs:LL:CC + --> tests/fail/intrinsics/ptr_offset_int_plus_ptr.rs:LL:CC | LL | let _val = (1 as *mut u8).offset(ptr as isize); | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ out-of-bounds pointer arithmetic: expected a pointer to $BYTES bytes of memory, but got 0x1[noalloc] which is a dangling pointer (it has no provenance) @@ -7,7 +7,7 @@ LL | let _val = (1 as *mut u8).offset(ptr as isize); = 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 = note: BACKTRACE: - = note: inside `main` at $DIR/ptr_offset_int_plus_ptr.rs:LL:CC + = note: inside `main` at tests/fail/intrinsics/ptr_offset_int_plus_ptr.rs:LL:CC note: some details are omitted, run with `MIRIFLAGS=-Zmiri-backtrace=full` for a verbose backtrace diff --git a/tests/fail/intrinsics/ptr_offset_out_of_bounds.stderr b/tests/fail/intrinsics/ptr_offset_out_of_bounds.stderr index c4548200f0..4f6b45b897 100644 --- a/tests/fail/intrinsics/ptr_offset_out_of_bounds.stderr +++ b/tests/fail/intrinsics/ptr_offset_out_of_bounds.stderr @@ -1,5 +1,5 @@ error: Undefined Behavior: out-of-bounds pointer arithmetic: expected a pointer to 5 bytes of memory, but got ALLOC which is only 4 bytes from the end of the allocation - --> $DIR/ptr_offset_out_of_bounds.rs:LL:CC + --> tests/fail/intrinsics/ptr_offset_out_of_bounds.rs:LL:CC | LL | let x = unsafe { x.offset(5) }; | ^^^^^^^^^^^ out-of-bounds pointer arithmetic: expected a pointer to 5 bytes of memory, but got ALLOC which is only 4 bytes from the end of the allocation @@ -7,12 +7,12 @@ LL | let x = unsafe { x.offset(5) }; = 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 help: ALLOC was allocated here: - --> $DIR/ptr_offset_out_of_bounds.rs:LL:CC + --> tests/fail/intrinsics/ptr_offset_out_of_bounds.rs:LL:CC | LL | let v = [0i8; 4]; | ^ = note: BACKTRACE (of the first span): - = note: inside `main` at $DIR/ptr_offset_out_of_bounds.rs:LL:CC + = note: inside `main` at tests/fail/intrinsics/ptr_offset_out_of_bounds.rs:LL:CC note: some details are omitted, run with `MIRIFLAGS=-Zmiri-backtrace=full` for a verbose backtrace diff --git a/tests/fail/intrinsics/ptr_offset_out_of_bounds_neg.stderr b/tests/fail/intrinsics/ptr_offset_out_of_bounds_neg.stderr index 8041e1542c..2dd4c943e8 100644 --- a/tests/fail/intrinsics/ptr_offset_out_of_bounds_neg.stderr +++ b/tests/fail/intrinsics/ptr_offset_out_of_bounds_neg.stderr @@ -1,5 +1,5 @@ error: Undefined Behavior: out-of-bounds pointer arithmetic: expected a pointer to the end of 1 byte of memory, but got ALLOC which is at the beginning of the allocation - --> $DIR/ptr_offset_out_of_bounds_neg.rs:LL:CC + --> tests/fail/intrinsics/ptr_offset_out_of_bounds_neg.rs:LL:CC | LL | let x = unsafe { x.offset(-1) }; | ^^^^^^^^^^^^ out-of-bounds pointer arithmetic: expected a pointer to the end of 1 byte of memory, but got ALLOC which is at the beginning of the allocation @@ -7,12 +7,12 @@ LL | let x = unsafe { x.offset(-1) }; = 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 help: ALLOC was allocated here: - --> $DIR/ptr_offset_out_of_bounds_neg.rs:LL:CC + --> tests/fail/intrinsics/ptr_offset_out_of_bounds_neg.rs:LL:CC | LL | let v = [0i8; 4]; | ^ = note: BACKTRACE (of the first span): - = note: inside `main` at $DIR/ptr_offset_out_of_bounds_neg.rs:LL:CC + = note: inside `main` at tests/fail/intrinsics/ptr_offset_out_of_bounds_neg.rs:LL:CC note: some details are omitted, run with `MIRIFLAGS=-Zmiri-backtrace=full` for a verbose backtrace diff --git a/tests/fail/intrinsics/ptr_offset_overflow.stderr b/tests/fail/intrinsics/ptr_offset_overflow.stderr index ee5aebc6ea..d03c9f870e 100644 --- a/tests/fail/intrinsics/ptr_offset_overflow.stderr +++ b/tests/fail/intrinsics/ptr_offset_overflow.stderr @@ -1,5 +1,5 @@ error: Undefined Behavior: out-of-bounds pointer arithmetic: expected a pointer to the end of $BYTES bytes of memory, but got ALLOC which is at the beginning of the allocation - --> $DIR/ptr_offset_overflow.rs:LL:CC + --> tests/fail/intrinsics/ptr_offset_overflow.rs:LL:CC | LL | let x = unsafe { x.offset(isize::MIN) }; | ^^^^^^^^^^^^^^^^^^^^ out-of-bounds pointer arithmetic: expected a pointer to the end of $BYTES bytes of memory, but got ALLOC which is at the beginning of the allocation @@ -7,12 +7,12 @@ LL | let x = unsafe { x.offset(isize::MIN) }; = 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 help: ALLOC was allocated here: - --> $DIR/ptr_offset_overflow.rs:LL:CC + --> tests/fail/intrinsics/ptr_offset_overflow.rs:LL:CC | LL | let v = [0i8; 4]; | ^ = note: BACKTRACE (of the first span): - = note: inside `main` at $DIR/ptr_offset_overflow.rs:LL:CC + = note: inside `main` at tests/fail/intrinsics/ptr_offset_overflow.rs:LL:CC note: some details are omitted, run with `MIRIFLAGS=-Zmiri-backtrace=full` for a verbose backtrace diff --git a/tests/fail/intrinsics/rem-by-zero.stderr b/tests/fail/intrinsics/rem-by-zero.stderr index 9b9fe4da13..cb5ddc80dd 100644 --- a/tests/fail/intrinsics/rem-by-zero.stderr +++ b/tests/fail/intrinsics/rem-by-zero.stderr @@ -1,5 +1,5 @@ error: Undefined Behavior: calculating the remainder with a divisor of zero - --> $DIR/rem-by-zero.rs:LL:CC + --> tests/fail/intrinsics/rem-by-zero.rs:LL:CC | LL | let _n = unchecked_rem(3u32, 0); | ^^^^^^^^^^^^^^^^^^^^^^ calculating the remainder with a divisor of zero @@ -7,7 +7,7 @@ LL | let _n = unchecked_rem(3u32, 0); = 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 = note: BACKTRACE: - = note: inside `main` at $DIR/rem-by-zero.rs:LL:CC + = note: inside `main` at tests/fail/intrinsics/rem-by-zero.rs:LL:CC note: some details are omitted, run with `MIRIFLAGS=-Zmiri-backtrace=full` for a verbose backtrace diff --git a/tests/fail/intrinsics/simd-div-by-zero.stderr b/tests/fail/intrinsics/simd-div-by-zero.stderr index 44d3749d68..b3579758f8 100644 --- a/tests/fail/intrinsics/simd-div-by-zero.stderr +++ b/tests/fail/intrinsics/simd-div-by-zero.stderr @@ -1,5 +1,5 @@ error: Undefined Behavior: dividing by zero - --> $DIR/simd-div-by-zero.rs:LL:CC + --> tests/fail/intrinsics/simd-div-by-zero.rs:LL:CC | LL | simd_div(x, y); | ^^^^^^^^^^^^^^ dividing by zero @@ -7,7 +7,7 @@ LL | simd_div(x, y); = 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 = note: BACKTRACE: - = note: inside `main` at $DIR/simd-div-by-zero.rs:LL:CC + = note: inside `main` at tests/fail/intrinsics/simd-div-by-zero.rs:LL:CC note: some details are omitted, run with `MIRIFLAGS=-Zmiri-backtrace=full` for a verbose backtrace diff --git a/tests/fail/intrinsics/simd-div-overflow.stderr b/tests/fail/intrinsics/simd-div-overflow.stderr index 85058b008e..1144f8cf70 100644 --- a/tests/fail/intrinsics/simd-div-overflow.stderr +++ b/tests/fail/intrinsics/simd-div-overflow.stderr @@ -1,5 +1,5 @@ error: Undefined Behavior: overflow in signed division (dividing MIN by -1) - --> $DIR/simd-div-overflow.rs:LL:CC + --> tests/fail/intrinsics/simd-div-overflow.rs:LL:CC | LL | simd_div(x, y); | ^^^^^^^^^^^^^^ overflow in signed division (dividing MIN by -1) @@ -7,7 +7,7 @@ LL | simd_div(x, y); = 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 = note: BACKTRACE: - = note: inside `main` at $DIR/simd-div-overflow.rs:LL:CC + = note: inside `main` at tests/fail/intrinsics/simd-div-overflow.rs:LL:CC note: some details are omitted, run with `MIRIFLAGS=-Zmiri-backtrace=full` for a verbose backtrace diff --git a/tests/fail/intrinsics/simd-extract.stderr b/tests/fail/intrinsics/simd-extract.stderr index dc6b22de49..fdf08e8303 100644 --- a/tests/fail/intrinsics/simd-extract.stderr +++ b/tests/fail/intrinsics/simd-extract.stderr @@ -1,5 +1,5 @@ error: Undefined Behavior: `simd_extract` index 4 is out-of-bounds of vector with length 4 - --> $DIR/simd-extract.rs:LL:CC + --> tests/fail/intrinsics/simd-extract.rs:LL:CC | LL | let _x: i32 = unsafe { std::intrinsics::simd::simd_extract(v, 4) }; | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ `simd_extract` index 4 is out-of-bounds of vector with length 4 @@ -7,7 +7,7 @@ LL | let _x: i32 = unsafe { std::intrinsics::simd::simd_extract(v, 4) }; = 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 = note: BACKTRACE: - = note: inside `main` at $DIR/simd-extract.rs:LL:CC + = note: inside `main` at tests/fail/intrinsics/simd-extract.rs:LL:CC note: some details are omitted, run with `MIRIFLAGS=-Zmiri-backtrace=full` for a verbose backtrace diff --git a/tests/fail/intrinsics/simd-float-to-int.stderr b/tests/fail/intrinsics/simd-float-to-int.stderr index d75fefe1de..e34ebd3d7f 100644 --- a/tests/fail/intrinsics/simd-float-to-int.stderr +++ b/tests/fail/intrinsics/simd-float-to-int.stderr @@ -1,5 +1,5 @@ error: Undefined Behavior: `simd_cast` intrinsic called on 3.40282347E+38f32 which cannot be represented in target type `i32` - --> $DIR/simd-float-to-int.rs:LL:CC + --> tests/fail/intrinsics/simd-float-to-int.rs:LL:CC | LL | let _x: i32x2 = f32x2::from_array([f32::MAX, f32::MIN]).to_int_unchecked(); | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ `simd_cast` intrinsic called on 3.40282347E+38f32 which cannot be represented in target type `i32` @@ -7,7 +7,7 @@ LL | let _x: i32x2 = f32x2::from_array([f32::MAX, f32::MIN]).to_int_unch = 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 = note: BACKTRACE: - = note: inside `main` at $DIR/simd-float-to-int.rs:LL:CC + = note: inside `main` at tests/fail/intrinsics/simd-float-to-int.rs:LL:CC note: some details are omitted, run with `MIRIFLAGS=-Zmiri-backtrace=full` for a verbose backtrace diff --git a/tests/fail/intrinsics/simd-gather.stderr b/tests/fail/intrinsics/simd-gather.stderr index bc8d0b041d..ee1c900961 100644 --- a/tests/fail/intrinsics/simd-gather.stderr +++ b/tests/fail/intrinsics/simd-gather.stderr @@ -1,5 +1,5 @@ error: Undefined Behavior: memory access failed: expected a pointer to 1 byte of memory, but got ALLOC+0x9 which is at or beyond the end of the allocation of size 9 bytes - --> $DIR/simd-gather.rs:LL:CC + --> tests/fail/intrinsics/simd-gather.rs:LL:CC | LL | let _result = Simd::gather_select_unchecked(&vec, Mask::splat(true), idxs, Simd::splat(0)); | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ memory access failed: expected a pointer to 1 byte of memory, but got ALLOC+0x9 which is at or beyond the end of the allocation of size 9 bytes @@ -7,7 +7,7 @@ LL | let _result = Simd::gather_select_unchecked(&vec, Mask::splat(true) = 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 = note: BACKTRACE: - = note: inside `main` at $DIR/simd-gather.rs:LL:CC + = note: inside `main` at tests/fail/intrinsics/simd-gather.rs:LL:CC note: some details are omitted, run with `MIRIFLAGS=-Zmiri-backtrace=full` for a verbose backtrace diff --git a/tests/fail/intrinsics/simd-reduce-invalid-bool.stderr b/tests/fail/intrinsics/simd-reduce-invalid-bool.stderr index b6c43d34b9..db76897fae 100644 --- a/tests/fail/intrinsics/simd-reduce-invalid-bool.stderr +++ b/tests/fail/intrinsics/simd-reduce-invalid-bool.stderr @@ -1,5 +1,5 @@ error: Undefined Behavior: each element of a SIMD mask must be all-0-bits or all-1-bits - --> $DIR/simd-reduce-invalid-bool.rs:LL:CC + --> tests/fail/intrinsics/simd-reduce-invalid-bool.rs:LL:CC | LL | simd_reduce_any(x); | ^^^^^^^^^^^^^^^^^^ each element of a SIMD mask must be all-0-bits or all-1-bits @@ -7,7 +7,7 @@ LL | simd_reduce_any(x); = 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 = note: BACKTRACE: - = note: inside `main` at $DIR/simd-reduce-invalid-bool.rs:LL:CC + = note: inside `main` at tests/fail/intrinsics/simd-reduce-invalid-bool.rs:LL:CC note: some details are omitted, run with `MIRIFLAGS=-Zmiri-backtrace=full` for a verbose backtrace diff --git a/tests/fail/intrinsics/simd-rem-by-zero.stderr b/tests/fail/intrinsics/simd-rem-by-zero.stderr index d29d22d8ae..ec136a62ff 100644 --- a/tests/fail/intrinsics/simd-rem-by-zero.stderr +++ b/tests/fail/intrinsics/simd-rem-by-zero.stderr @@ -1,5 +1,5 @@ error: Undefined Behavior: calculating the remainder with a divisor of zero - --> $DIR/simd-rem-by-zero.rs:LL:CC + --> tests/fail/intrinsics/simd-rem-by-zero.rs:LL:CC | LL | simd_rem(x, y); | ^^^^^^^^^^^^^^ calculating the remainder with a divisor of zero @@ -7,7 +7,7 @@ LL | simd_rem(x, y); = 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 = note: BACKTRACE: - = note: inside `main` at $DIR/simd-rem-by-zero.rs:LL:CC + = note: inside `main` at tests/fail/intrinsics/simd-rem-by-zero.rs:LL:CC note: some details are omitted, run with `MIRIFLAGS=-Zmiri-backtrace=full` for a verbose backtrace diff --git a/tests/fail/intrinsics/simd-scatter.stderr b/tests/fail/intrinsics/simd-scatter.stderr index aae77edcb6..aaacb94f45 100644 --- a/tests/fail/intrinsics/simd-scatter.stderr +++ b/tests/fail/intrinsics/simd-scatter.stderr @@ -1,5 +1,5 @@ error: Undefined Behavior: memory access failed: expected a pointer to 1 byte of memory, but got ALLOC+0x9 which is at or beyond the end of the allocation of size 9 bytes - --> $DIR/simd-scatter.rs:LL:CC + --> tests/fail/intrinsics/simd-scatter.rs:LL:CC | LL | / Simd::from_array([-27, 82, -41, 124]).scatter_select_unchecked( LL | | @@ -12,12 +12,12 @@ LL | | ); = 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 help: ALLOC was allocated here: - --> $DIR/simd-scatter.rs:LL:CC + --> tests/fail/intrinsics/simd-scatter.rs:LL:CC | LL | let mut vec: Vec = vec![10, 11, 12, 13, 14, 15, 16, 17, 18]; | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ = note: BACKTRACE (of the first span): - = note: inside `main` at $DIR/simd-scatter.rs:LL:CC + = note: inside `main` at tests/fail/intrinsics/simd-scatter.rs:LL:CC = note: this error originates in the macro `vec` (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 diff --git a/tests/fail/intrinsics/simd-select-bitmask-invalid.stderr b/tests/fail/intrinsics/simd-select-bitmask-invalid.stderr index 1f978e13bb..9acb51d8c5 100644 --- a/tests/fail/intrinsics/simd-select-bitmask-invalid.stderr +++ b/tests/fail/intrinsics/simd-select-bitmask-invalid.stderr @@ -1,5 +1,5 @@ error: Undefined Behavior: a SIMD bitmask less than 8 bits long must be filled with 0s for the remaining bits - --> $DIR/simd-select-bitmask-invalid.rs:LL:CC + --> tests/fail/intrinsics/simd-select-bitmask-invalid.rs:LL:CC | LL | simd_select_bitmask(0b11111111u8, x, x); | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ a SIMD bitmask less than 8 bits long must be filled with 0s for the remaining bits @@ -7,7 +7,7 @@ LL | simd_select_bitmask(0b11111111u8, x, x); = 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 = note: BACKTRACE: - = note: inside `main` at $DIR/simd-select-bitmask-invalid.rs:LL:CC + = note: inside `main` at tests/fail/intrinsics/simd-select-bitmask-invalid.rs:LL:CC note: some details are omitted, run with `MIRIFLAGS=-Zmiri-backtrace=full` for a verbose backtrace diff --git a/tests/fail/intrinsics/simd-select-invalid-bool.stderr b/tests/fail/intrinsics/simd-select-invalid-bool.stderr index e0c0547483..52b497046d 100644 --- a/tests/fail/intrinsics/simd-select-invalid-bool.stderr +++ b/tests/fail/intrinsics/simd-select-invalid-bool.stderr @@ -1,5 +1,5 @@ error: Undefined Behavior: each element of a SIMD mask must be all-0-bits or all-1-bits - --> $DIR/simd-select-invalid-bool.rs:LL:CC + --> tests/fail/intrinsics/simd-select-invalid-bool.rs:LL:CC | LL | simd_select(x, x, x); | ^^^^^^^^^^^^^^^^^^^^ each element of a SIMD mask must be all-0-bits or all-1-bits @@ -7,7 +7,7 @@ LL | simd_select(x, x, x); = 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 = note: BACKTRACE: - = note: inside `main` at $DIR/simd-select-invalid-bool.rs:LL:CC + = note: inside `main` at tests/fail/intrinsics/simd-select-invalid-bool.rs:LL:CC note: some details are omitted, run with `MIRIFLAGS=-Zmiri-backtrace=full` for a verbose backtrace diff --git a/tests/fail/intrinsics/simd-shl-too-far.stderr b/tests/fail/intrinsics/simd-shl-too-far.stderr index 475067db80..f7dfd0743f 100644 --- a/tests/fail/intrinsics/simd-shl-too-far.stderr +++ b/tests/fail/intrinsics/simd-shl-too-far.stderr @@ -1,5 +1,5 @@ error: Undefined Behavior: overflowing shift by 100 in `simd_shl` in lane 0 - --> $DIR/simd-shl-too-far.rs:LL:CC + --> tests/fail/intrinsics/simd-shl-too-far.rs:LL:CC | LL | simd_shl(x, y); | ^^^^^^^^^^^^^^ overflowing shift by 100 in `simd_shl` in lane 0 @@ -7,7 +7,7 @@ LL | simd_shl(x, y); = 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 = note: BACKTRACE: - = note: inside `main` at $DIR/simd-shl-too-far.rs:LL:CC + = note: inside `main` at tests/fail/intrinsics/simd-shl-too-far.rs:LL:CC note: some details are omitted, run with `MIRIFLAGS=-Zmiri-backtrace=full` for a verbose backtrace diff --git a/tests/fail/intrinsics/simd-shr-too-far.stderr b/tests/fail/intrinsics/simd-shr-too-far.stderr index 0d6307837d..52259635d2 100644 --- a/tests/fail/intrinsics/simd-shr-too-far.stderr +++ b/tests/fail/intrinsics/simd-shr-too-far.stderr @@ -1,5 +1,5 @@ error: Undefined Behavior: overflowing shift by 40 in `simd_shr` in lane 1 - --> $DIR/simd-shr-too-far.rs:LL:CC + --> tests/fail/intrinsics/simd-shr-too-far.rs:LL:CC | LL | simd_shr(x, y); | ^^^^^^^^^^^^^^ overflowing shift by 40 in `simd_shr` in lane 1 @@ -7,7 +7,7 @@ LL | simd_shr(x, y); = 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 = note: BACKTRACE: - = note: inside `main` at $DIR/simd-shr-too-far.rs:LL:CC + = note: inside `main` at tests/fail/intrinsics/simd-shr-too-far.rs:LL:CC note: some details are omitted, run with `MIRIFLAGS=-Zmiri-backtrace=full` for a verbose backtrace diff --git a/tests/fail/intrinsics/typed-swap-invalid-array.stderr b/tests/fail/intrinsics/typed-swap-invalid-array.stderr index 15f01c1c09..20b20412e7 100644 --- a/tests/fail/intrinsics/typed-swap-invalid-array.stderr +++ b/tests/fail/intrinsics/typed-swap-invalid-array.stderr @@ -1,5 +1,5 @@ error: Undefined Behavior: constructing invalid value at [0]: encountered 0x02, but expected a boolean - --> $DIR/typed-swap-invalid-array.rs:LL:CC + --> tests/fail/intrinsics/typed-swap-invalid-array.rs:LL:CC | LL | typed_swap(a, b); | ^^^^^^^^^^^^^^^^ constructing invalid value at [0]: encountered 0x02, but expected a boolean @@ -7,9 +7,9 @@ LL | typed_swap(a, b); = 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 = note: BACKTRACE: - = note: inside `invalid_array` at $DIR/typed-swap-invalid-array.rs:LL:CC + = note: inside `invalid_array` at tests/fail/intrinsics/typed-swap-invalid-array.rs:LL:CC note: inside `main` - --> $DIR/typed-swap-invalid-array.rs:LL:CC + --> tests/fail/intrinsics/typed-swap-invalid-array.rs:LL:CC | LL | invalid_array(); | ^^^^^^^^^^^^^^^ diff --git a/tests/fail/intrinsics/typed-swap-invalid-scalar.stderr b/tests/fail/intrinsics/typed-swap-invalid-scalar.stderr index 262ca202f9..6062465f36 100644 --- a/tests/fail/intrinsics/typed-swap-invalid-scalar.stderr +++ b/tests/fail/intrinsics/typed-swap-invalid-scalar.stderr @@ -1,5 +1,5 @@ error: Undefined Behavior: constructing invalid value: encountered 0x02, but expected a boolean - --> $DIR/typed-swap-invalid-scalar.rs:LL:CC + --> tests/fail/intrinsics/typed-swap-invalid-scalar.rs:LL:CC | LL | typed_swap(a, b); | ^^^^^^^^^^^^^^^^ constructing invalid value: encountered 0x02, but expected a boolean @@ -7,9 +7,9 @@ LL | typed_swap(a, b); = 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 = note: BACKTRACE: - = note: inside `invalid_scalar` at $DIR/typed-swap-invalid-scalar.rs:LL:CC + = note: inside `invalid_scalar` at tests/fail/intrinsics/typed-swap-invalid-scalar.rs:LL:CC note: inside `main` - --> $DIR/typed-swap-invalid-scalar.rs:LL:CC + --> tests/fail/intrinsics/typed-swap-invalid-scalar.rs:LL:CC | LL | invalid_scalar(); | ^^^^^^^^^^^^^^^^ diff --git a/tests/fail/intrinsics/unchecked_add1.stderr b/tests/fail/intrinsics/unchecked_add1.stderr index eae9ec7a44..f6fe453587 100644 --- a/tests/fail/intrinsics/unchecked_add1.stderr +++ b/tests/fail/intrinsics/unchecked_add1.stderr @@ -1,5 +1,5 @@ error: Undefined Behavior: arithmetic overflow in `unchecked_add` - --> $DIR/unchecked_add1.rs:LL:CC + --> tests/fail/intrinsics/unchecked_add1.rs:LL:CC | LL | let _val = unsafe { 40000u16.unchecked_add(30000) }; | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ arithmetic overflow in `unchecked_add` @@ -7,7 +7,7 @@ LL | let _val = unsafe { 40000u16.unchecked_add(30000) }; = 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 = note: BACKTRACE: - = note: inside `main` at $DIR/unchecked_add1.rs:LL:CC + = note: inside `main` at tests/fail/intrinsics/unchecked_add1.rs:LL:CC note: some details are omitted, run with `MIRIFLAGS=-Zmiri-backtrace=full` for a verbose backtrace diff --git a/tests/fail/intrinsics/unchecked_add2.stderr b/tests/fail/intrinsics/unchecked_add2.stderr index 6a0dcfcd22..0fd1e8ff91 100644 --- a/tests/fail/intrinsics/unchecked_add2.stderr +++ b/tests/fail/intrinsics/unchecked_add2.stderr @@ -1,5 +1,5 @@ error: Undefined Behavior: arithmetic overflow in `unchecked_add` - --> $DIR/unchecked_add2.rs:LL:CC + --> tests/fail/intrinsics/unchecked_add2.rs:LL:CC | LL | let _val = unsafe { (-30000i16).unchecked_add(-8000) }; | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ arithmetic overflow in `unchecked_add` @@ -7,7 +7,7 @@ LL | let _val = unsafe { (-30000i16).unchecked_add(-8000) }; = 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 = note: BACKTRACE: - = note: inside `main` at $DIR/unchecked_add2.rs:LL:CC + = note: inside `main` at tests/fail/intrinsics/unchecked_add2.rs:LL:CC note: some details are omitted, run with `MIRIFLAGS=-Zmiri-backtrace=full` for a verbose backtrace diff --git a/tests/fail/intrinsics/unchecked_div1.stderr b/tests/fail/intrinsics/unchecked_div1.stderr index 9dc4bcaee2..f7aef4914e 100644 --- a/tests/fail/intrinsics/unchecked_div1.stderr +++ b/tests/fail/intrinsics/unchecked_div1.stderr @@ -1,5 +1,5 @@ error: Undefined Behavior: overflow in signed division (dividing MIN by -1) - --> $DIR/unchecked_div1.rs:LL:CC + --> tests/fail/intrinsics/unchecked_div1.rs:LL:CC | LL | std::intrinsics::unchecked_div(i16::MIN, -1); | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ overflow in signed division (dividing MIN by -1) @@ -7,7 +7,7 @@ LL | std::intrinsics::unchecked_div(i16::MIN, -1); = 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 = note: BACKTRACE: - = note: inside `main` at $DIR/unchecked_div1.rs:LL:CC + = note: inside `main` at tests/fail/intrinsics/unchecked_div1.rs:LL:CC note: some details are omitted, run with `MIRIFLAGS=-Zmiri-backtrace=full` for a verbose backtrace diff --git a/tests/fail/intrinsics/unchecked_mul1.stderr b/tests/fail/intrinsics/unchecked_mul1.stderr index e37d9827c8..ad7bbaebee 100644 --- a/tests/fail/intrinsics/unchecked_mul1.stderr +++ b/tests/fail/intrinsics/unchecked_mul1.stderr @@ -1,5 +1,5 @@ error: Undefined Behavior: arithmetic overflow in `unchecked_mul` - --> $DIR/unchecked_mul1.rs:LL:CC + --> tests/fail/intrinsics/unchecked_mul1.rs:LL:CC | LL | let _val = unsafe { 300u16.unchecked_mul(250u16) }; | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ arithmetic overflow in `unchecked_mul` @@ -7,7 +7,7 @@ LL | let _val = unsafe { 300u16.unchecked_mul(250u16) }; = 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 = note: BACKTRACE: - = note: inside `main` at $DIR/unchecked_mul1.rs:LL:CC + = note: inside `main` at tests/fail/intrinsics/unchecked_mul1.rs:LL:CC note: some details are omitted, run with `MIRIFLAGS=-Zmiri-backtrace=full` for a verbose backtrace diff --git a/tests/fail/intrinsics/unchecked_mul2.stderr b/tests/fail/intrinsics/unchecked_mul2.stderr index 949077ce61..75de5d2338 100644 --- a/tests/fail/intrinsics/unchecked_mul2.stderr +++ b/tests/fail/intrinsics/unchecked_mul2.stderr @@ -1,5 +1,5 @@ error: Undefined Behavior: arithmetic overflow in `unchecked_mul` - --> $DIR/unchecked_mul2.rs:LL:CC + --> tests/fail/intrinsics/unchecked_mul2.rs:LL:CC | LL | let _val = unsafe { 1_000_000_000i32.unchecked_mul(-4) }; | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ arithmetic overflow in `unchecked_mul` @@ -7,7 +7,7 @@ LL | let _val = unsafe { 1_000_000_000i32.unchecked_mul(-4) }; = 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 = note: BACKTRACE: - = note: inside `main` at $DIR/unchecked_mul2.rs:LL:CC + = note: inside `main` at tests/fail/intrinsics/unchecked_mul2.rs:LL:CC note: some details are omitted, run with `MIRIFLAGS=-Zmiri-backtrace=full` for a verbose backtrace diff --git a/tests/fail/intrinsics/unchecked_shl.stderr b/tests/fail/intrinsics/unchecked_shl.stderr index f30cf4479e..fcf6e1aea0 100644 --- a/tests/fail/intrinsics/unchecked_shl.stderr +++ b/tests/fail/intrinsics/unchecked_shl.stderr @@ -1,5 +1,5 @@ error: Undefined Behavior: overflowing shift by 8 in `unchecked_shl` - --> $DIR/unchecked_shl.rs:LL:CC + --> tests/fail/intrinsics/unchecked_shl.rs:LL:CC | LL | let _n = 1i8.unchecked_shl(8); | ^^^^^^^^^^^^^^^^^^^^ overflowing shift by 8 in `unchecked_shl` @@ -7,7 +7,7 @@ LL | let _n = 1i8.unchecked_shl(8); = 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 = note: BACKTRACE: - = note: inside `main` at $DIR/unchecked_shl.rs:LL:CC + = note: inside `main` at tests/fail/intrinsics/unchecked_shl.rs:LL:CC note: some details are omitted, run with `MIRIFLAGS=-Zmiri-backtrace=full` for a verbose backtrace diff --git a/tests/fail/intrinsics/unchecked_shl2.stderr b/tests/fail/intrinsics/unchecked_shl2.stderr index a572f34b92..c38139e4c2 100644 --- a/tests/fail/intrinsics/unchecked_shl2.stderr +++ b/tests/fail/intrinsics/unchecked_shl2.stderr @@ -1,5 +1,5 @@ error: Undefined Behavior: overflowing shift by -1 in `unchecked_shl` - --> $DIR/unchecked_shl2.rs:LL:CC + --> tests/fail/intrinsics/unchecked_shl2.rs:LL:CC | LL | let _n = intrinsics::unchecked_shl(1i8, -1); | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ overflowing shift by -1 in `unchecked_shl` @@ -7,7 +7,7 @@ LL | let _n = intrinsics::unchecked_shl(1i8, -1); = 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 = note: BACKTRACE: - = note: inside `main` at $DIR/unchecked_shl2.rs:LL:CC + = note: inside `main` at tests/fail/intrinsics/unchecked_shl2.rs:LL:CC note: some details are omitted, run with `MIRIFLAGS=-Zmiri-backtrace=full` for a verbose backtrace diff --git a/tests/fail/intrinsics/unchecked_shr.stderr b/tests/fail/intrinsics/unchecked_shr.stderr index 22e0b1a0d9..e95227fe89 100644 --- a/tests/fail/intrinsics/unchecked_shr.stderr +++ b/tests/fail/intrinsics/unchecked_shr.stderr @@ -1,5 +1,5 @@ error: Undefined Behavior: overflowing shift by 64 in `unchecked_shr` - --> $DIR/unchecked_shr.rs:LL:CC + --> tests/fail/intrinsics/unchecked_shr.rs:LL:CC | LL | let _n = 1i64.unchecked_shr(64); | ^^^^^^^^^^^^^^^^^^^^^^ overflowing shift by 64 in `unchecked_shr` @@ -7,7 +7,7 @@ LL | let _n = 1i64.unchecked_shr(64); = 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 = note: BACKTRACE: - = note: inside `main` at $DIR/unchecked_shr.rs:LL:CC + = note: inside `main` at tests/fail/intrinsics/unchecked_shr.rs:LL:CC note: some details are omitted, run with `MIRIFLAGS=-Zmiri-backtrace=full` for a verbose backtrace diff --git a/tests/fail/intrinsics/unchecked_sub1.stderr b/tests/fail/intrinsics/unchecked_sub1.stderr index 39bfd8a238..fdd30186c3 100644 --- a/tests/fail/intrinsics/unchecked_sub1.stderr +++ b/tests/fail/intrinsics/unchecked_sub1.stderr @@ -1,5 +1,5 @@ error: Undefined Behavior: arithmetic overflow in `unchecked_sub` - --> $DIR/unchecked_sub1.rs:LL:CC + --> tests/fail/intrinsics/unchecked_sub1.rs:LL:CC | LL | let _val = unsafe { 14u32.unchecked_sub(22) }; | ^^^^^^^^^^^^^^^^^^^^^^^ arithmetic overflow in `unchecked_sub` @@ -7,7 +7,7 @@ LL | let _val = unsafe { 14u32.unchecked_sub(22) }; = 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 = note: BACKTRACE: - = note: inside `main` at $DIR/unchecked_sub1.rs:LL:CC + = note: inside `main` at tests/fail/intrinsics/unchecked_sub1.rs:LL:CC note: some details are omitted, run with `MIRIFLAGS=-Zmiri-backtrace=full` for a verbose backtrace diff --git a/tests/fail/intrinsics/unchecked_sub2.stderr b/tests/fail/intrinsics/unchecked_sub2.stderr index 604eba99e0..c27bb32c9d 100644 --- a/tests/fail/intrinsics/unchecked_sub2.stderr +++ b/tests/fail/intrinsics/unchecked_sub2.stderr @@ -1,5 +1,5 @@ error: Undefined Behavior: arithmetic overflow in `unchecked_sub` - --> $DIR/unchecked_sub2.rs:LL:CC + --> tests/fail/intrinsics/unchecked_sub2.rs:LL:CC | LL | let _val = unsafe { 30000i16.unchecked_sub(-7000) }; | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ arithmetic overflow in `unchecked_sub` @@ -7,7 +7,7 @@ LL | let _val = unsafe { 30000i16.unchecked_sub(-7000) }; = 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 = note: BACKTRACE: - = note: inside `main` at $DIR/unchecked_sub2.rs:LL:CC + = note: inside `main` at tests/fail/intrinsics/unchecked_sub2.rs:LL:CC note: some details are omitted, run with `MIRIFLAGS=-Zmiri-backtrace=full` for a verbose backtrace diff --git a/tests/fail/intrinsics/uninit_uninhabited_type.stderr b/tests/fail/intrinsics/uninit_uninhabited_type.stderr index 67fd60e572..ffc3a3eae9 100644 --- a/tests/fail/intrinsics/uninit_uninhabited_type.stderr +++ b/tests/fail/intrinsics/uninit_uninhabited_type.stderr @@ -17,7 +17,7 @@ LL | ABORT(); = note: inside `std::panicking::begin_panic_handler` at RUSTLIB/std/src/panicking.rs:LL:CC = note: inside `core::panicking::panic_nounwind` at RUSTLIB/core/src/panicking.rs:LL:CC note: inside `main` - --> $DIR/uninit_uninhabited_type.rs:LL:CC + --> tests/fail/intrinsics/uninit_uninhabited_type.rs:LL:CC | LL | let _ = unsafe { std::mem::uninitialized::() }; | ^ diff --git a/tests/fail/intrinsics/write_bytes_overflow.stderr b/tests/fail/intrinsics/write_bytes_overflow.stderr index 326c180fad..71f53a3199 100644 --- a/tests/fail/intrinsics/write_bytes_overflow.stderr +++ b/tests/fail/intrinsics/write_bytes_overflow.stderr @@ -1,5 +1,5 @@ error: Undefined Behavior: overflow computing total size of `write_bytes` - --> $DIR/write_bytes_overflow.rs:LL:CC + --> tests/fail/intrinsics/write_bytes_overflow.rs:LL:CC | LL | (&mut y as *mut i32).write_bytes(0u8, 1usize << (mem::size_of::() * 8 - 1)); | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ overflow computing total size of `write_bytes` @@ -7,7 +7,7 @@ LL | (&mut y as *mut i32).write_bytes(0u8, 1usize << (mem::size_of:: $DIR/zero_fn_ptr.rs:LL:CC + --> tests/fail/intrinsics/zero_fn_ptr.rs:LL:CC | LL | let _ = unsafe { std::mem::zeroed::() }; | ^ diff --git a/tests/fail/issue-miri-1112.stderr b/tests/fail/issue-miri-1112.stderr index 7ac65c152e..ffbbd26921 100644 --- a/tests/fail/issue-miri-1112.stderr +++ b/tests/fail/issue-miri-1112.stderr @@ -1,5 +1,5 @@ error: Undefined Behavior: constructing invalid value: encountered $HEX[ALLOC], but expected a vtable pointer - --> $DIR/issue-miri-1112.rs:LL:CC + --> tests/fail/issue-miri-1112.rs:LL:CC | LL | let obj = std::mem::transmute::(obj); | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ constructing invalid value: encountered $HEX[ALLOC], but expected a vtable pointer @@ -7,9 +7,9 @@ LL | let obj = std::mem::transmute::(obj) = 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 = note: BACKTRACE: - = note: inside `FunnyPointer::from_data_ptr` at $DIR/issue-miri-1112.rs:LL:CC + = note: inside `FunnyPointer::from_data_ptr` at tests/fail/issue-miri-1112.rs:LL:CC note: inside `main` - --> $DIR/issue-miri-1112.rs:LL:CC + --> tests/fail/issue-miri-1112.rs:LL:CC | LL | let _raw: &FunnyPointer = FunnyPointer::from_data_ptr(&hello, &meta as *const _); | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ diff --git a/tests/fail/issue-miri-3288-ice-symbolic-alignment-extern-static.stderr b/tests/fail/issue-miri-3288-ice-symbolic-alignment-extern-static.stderr index 4064d7fe4e..91f9095955 100644 --- a/tests/fail/issue-miri-3288-ice-symbolic-alignment-extern-static.stderr +++ b/tests/fail/issue-miri-3288-ice-symbolic-alignment-extern-static.stderr @@ -1,12 +1,12 @@ error: unsupported operation: extern static `_dispatch_queue_attr_concurrent` is not supported by Miri - --> $DIR/issue-miri-3288-ice-symbolic-alignment-extern-static.rs:LL:CC + --> tests/fail/issue-miri-3288-ice-symbolic-alignment-extern-static.rs:LL:CC | LL | let _val = *DISPATCH_QUEUE_CONCURRENT; | ^^^^^^^^^^^^^^^^^^^^^^^^^ extern static `_dispatch_queue_attr_concurrent` is not supported by Miri | = help: this is likely not a bug in the program; it indicates that the program performed an operation that Miri does not support = note: BACKTRACE: - = note: inside `main` at $DIR/issue-miri-3288-ice-symbolic-alignment-extern-static.rs:LL:CC + = note: inside `main` at tests/fail/issue-miri-3288-ice-symbolic-alignment-extern-static.rs:LL:CC note: some details are omitted, run with `MIRIFLAGS=-Zmiri-backtrace=full` for a verbose backtrace diff --git a/tests/fail/layout_cycle.stderr b/tests/fail/layout_cycle.stderr index cc343d6431..9f53de3523 100644 --- a/tests/fail/layout_cycle.stderr +++ b/tests/fail/layout_cycle.stderr @@ -13,12 +13,12 @@ LL | intrinsics::size_of::() = note: BACKTRACE: = note: inside `std::mem::size_of::>>` at RUSTLIB/core/src/mem/mod.rs:LL:CC note: inside `foo::>` - --> $DIR/layout_cycle.rs:LL:CC + --> tests/fail/layout_cycle.rs:LL:CC | LL | mem::size_of::>() | ^^^^^^^^^^^^^^^^^^^^^^ note: inside `main` - --> $DIR/layout_cycle.rs:LL:CC + --> tests/fail/layout_cycle.rs:LL:CC | LL | println!("{}", foo::>()); | ^^^^^^^^^^^^^^ diff --git a/tests/fail/memleak.stderr b/tests/fail/memleak.stderr index a9ee76fbe8..85ab7e9d50 100644 --- a/tests/fail/memleak.stderr +++ b/tests/fail/memleak.stderr @@ -11,7 +11,7 @@ LL | __rust_alloc(layout.size(), layout.align()) = note: inside `alloc::alloc::exchange_malloc` at RUSTLIB/alloc/src/alloc.rs:LL:CC = note: inside `std::boxed::Box::::new` at RUSTLIB/alloc/src/boxed.rs:LL:CC note: inside `main` - --> $DIR/memleak.rs:LL:CC + --> tests/fail/memleak.rs:LL:CC | LL | std::mem::forget(Box::new(42)); | ^^^^^^^^^^^^ diff --git a/tests/fail/memleak_rc.stderr b/tests/fail/memleak_rc.stderr index dbf2daf818..9f49c8846b 100644 --- a/tests/fail/memleak_rc.stderr +++ b/tests/fail/memleak_rc.stderr @@ -12,7 +12,7 @@ LL | __rust_alloc(layout.size(), layout.align()) = note: inside `std::boxed::Box::>>>::new` at RUSTLIB/alloc/src/boxed.rs:LL:CC = note: inside `std::rc::Rc::>>::new` at RUSTLIB/alloc/src/rc.rs:LL:CC note: inside `main` - --> $DIR/memleak_rc.rs:LL:CC + --> tests/fail/memleak_rc.rs:LL:CC | LL | let x = Dummy(Rc::new(RefCell::new(None))); | ^^^^^^^^^^^^^^^^^^^^^^^^^^^ diff --git a/tests/fail/miri_start_wrong_sig.stderr b/tests/fail/miri_start_wrong_sig.stderr index 6217191711..4c60f3be0d 100644 --- a/tests/fail/miri_start_wrong_sig.stderr +++ b/tests/fail/miri_start_wrong_sig.stderr @@ -1,5 +1,5 @@ error[E0308]: mismatched types - --> $DIR/miri_start_wrong_sig.rs:LL:CC + --> tests/fail/miri_start_wrong_sig.rs:LL:CC | LL | fn miri_start() -> isize { | ^^^^^^^^^^^^^^^^^^^^^^^^ incorrect number of function parameters diff --git a/tests/fail/modifying_constants.stderr b/tests/fail/modifying_constants.stderr index c1eca7866a..2d8e4dfd8a 100644 --- a/tests/fail/modifying_constants.stderr +++ b/tests/fail/modifying_constants.stderr @@ -1,5 +1,5 @@ error: Undefined Behavior: writing to ALLOC which is read-only - --> $DIR/modifying_constants.rs:LL:CC + --> tests/fail/modifying_constants.rs:LL:CC | LL | *y = 42; | ^^^^^^^ writing to ALLOC which is read-only @@ -7,7 +7,7 @@ LL | *y = 42; = 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 = note: BACKTRACE: - = note: inside `main` at $DIR/modifying_constants.rs:LL:CC + = note: inside `main` at tests/fail/modifying_constants.rs:LL:CC note: some details are omitted, run with `MIRIFLAGS=-Zmiri-backtrace=full` for a verbose backtrace diff --git a/tests/fail/never_match_never.stderr b/tests/fail/never_match_never.stderr index 751894f198..e59a028b15 100644 --- a/tests/fail/never_match_never.stderr +++ b/tests/fail/never_match_never.stderr @@ -1,5 +1,5 @@ error: Undefined Behavior: entering unreachable code - --> $DIR/never_match_never.rs:LL:CC + --> tests/fail/never_match_never.rs:LL:CC | LL | unsafe { match (*ptr).1 {} } | ^^^^^^^^ entering unreachable code @@ -7,7 +7,7 @@ LL | unsafe { match (*ptr).1 {} } = 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 = note: BACKTRACE: - = note: inside `main` at $DIR/never_match_never.rs:LL:CC + = note: inside `main` at tests/fail/never_match_never.rs:LL:CC note: some details are omitted, run with `MIRIFLAGS=-Zmiri-backtrace=full` for a verbose backtrace diff --git a/tests/fail/never_say_never.stderr b/tests/fail/never_say_never.stderr index 1720cc893a..7d2952003b 100644 --- a/tests/fail/never_say_never.stderr +++ b/tests/fail/never_say_never.stderr @@ -1,5 +1,5 @@ error: Undefined Behavior: entering unreachable code - --> $DIR/never_say_never.rs:LL:CC + --> tests/fail/never_say_never.rs:LL:CC | LL | f(x) | ^^^^ entering unreachable code @@ -7,7 +7,7 @@ LL | f(x) = 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 = note: BACKTRACE: - = note: inside `main` at $DIR/never_say_never.rs:LL:CC + = note: inside `main` at tests/fail/never_say_never.rs:LL:CC note: some details are omitted, run with `MIRIFLAGS=-Zmiri-backtrace=full` for a verbose backtrace diff --git a/tests/fail/never_transmute_humans.stderr b/tests/fail/never_transmute_humans.stderr index 6916c93599..a00c244841 100644 --- a/tests/fail/never_transmute_humans.stderr +++ b/tests/fail/never_transmute_humans.stderr @@ -1,5 +1,5 @@ error: Undefined Behavior: entering unreachable code - --> $DIR/never_transmute_humans.rs:LL:CC + --> tests/fail/never_transmute_humans.rs:LL:CC | LL | std::mem::transmute::(Human) | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ entering unreachable code @@ -7,7 +7,7 @@ LL | std::mem::transmute::(Human) = 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 = note: BACKTRACE: - = note: inside `main` at $DIR/never_transmute_humans.rs:LL:CC + = note: inside `main` at tests/fail/never_transmute_humans.rs:LL:CC note: some details are omitted, run with `MIRIFLAGS=-Zmiri-backtrace=full` for a verbose backtrace diff --git a/tests/fail/never_transmute_void.stderr b/tests/fail/never_transmute_void.stderr index 4ca306373a..1906a68bff 100644 --- a/tests/fail/never_transmute_void.stderr +++ b/tests/fail/never_transmute_void.stderr @@ -1,5 +1,5 @@ error: Undefined Behavior: entering unreachable code - --> $DIR/never_transmute_void.rs:LL:CC + --> tests/fail/never_transmute_void.rs:LL:CC | LL | match v.0 {} | ^^^ entering unreachable code @@ -7,9 +7,9 @@ LL | match v.0 {} = 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 = note: BACKTRACE: - = note: inside `m::f` at $DIR/never_transmute_void.rs:LL:CC + = note: inside `m::f` at tests/fail/never_transmute_void.rs:LL:CC note: inside `main` - --> $DIR/never_transmute_void.rs:LL:CC + --> tests/fail/never_transmute_void.rs:LL:CC | LL | m::f(v); | ^^^^^^^ diff --git a/tests/fail/overlapping_assignment.stderr b/tests/fail/overlapping_assignment.stderr index 54e104e351..0ce2e4a098 100644 --- a/tests/fail/overlapping_assignment.stderr +++ b/tests/fail/overlapping_assignment.stderr @@ -1,5 +1,5 @@ error: Undefined Behavior: `copy_nonoverlapping` called on overlapping ranges - --> $DIR/overlapping_assignment.rs:LL:CC + --> tests/fail/overlapping_assignment.rs:LL:CC | LL | *ptr1 = *ptr2; | ^^^^^^^^^^^^^ `copy_nonoverlapping` called on overlapping ranges @@ -7,9 +7,9 @@ LL | *ptr1 = *ptr2; = 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 = note: BACKTRACE: - = note: inside `self_copy` at $DIR/overlapping_assignment.rs:LL:CC + = note: inside `self_copy` at tests/fail/overlapping_assignment.rs:LL:CC note: inside `main` - --> $DIR/overlapping_assignment.rs:LL:CC + --> tests/fail/overlapping_assignment.rs:LL:CC | LL | self_copy(ptr, ptr); | ^^^^^^^^^^^^^^^^^^^ diff --git a/tests/fail/panic/bad_unwind.stderr b/tests/fail/panic/bad_unwind.stderr index c08fe5153b..c152d1a960 100644 --- a/tests/fail/panic/bad_unwind.stderr +++ b/tests/fail/panic/bad_unwind.stderr @@ -1,9 +1,9 @@ -thread 'main' panicked at $DIR/bad_unwind.rs:LL:CC: +thread 'main' panicked at tests/fail/panic/bad_unwind.rs:LL:CC: explicit panic 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: Undefined Behavior: unwinding past a stack frame that does not allow unwinding - --> $DIR/bad_unwind.rs:LL:CC + --> tests/fail/panic/bad_unwind.rs:LL:CC | LL | std::panic::catch_unwind(|| unwind()).unwrap_err(); | ^^^^^^^^ unwinding past a stack frame that does not allow unwinding @@ -11,12 +11,12 @@ LL | std::panic::catch_unwind(|| unwind()).unwrap_err(); = 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 = note: BACKTRACE: - = note: inside closure at $DIR/bad_unwind.rs:LL:CC - = note: inside `std::panicking::r#try::do_call::<{closure@$DIR/bad_unwind.rs:LL:CC}, ()>` at RUSTLIB/std/src/panicking.rs:LL:CC - = note: inside `std::panicking::r#try::<(), {closure@$DIR/bad_unwind.rs:LL:CC}>` at RUSTLIB/std/src/panicking.rs:LL:CC - = note: inside `std::panic::catch_unwind::<{closure@$DIR/bad_unwind.rs:LL:CC}, ()>` at RUSTLIB/std/src/panic.rs:LL:CC + = note: inside closure at tests/fail/panic/bad_unwind.rs:LL:CC + = note: inside `std::panicking::r#try::do_call::<{closure@tests/fail/panic/bad_unwind.rs:LL:CC}, ()>` at RUSTLIB/std/src/panicking.rs:LL:CC + = note: inside `std::panicking::r#try::<(), {closure@tests/fail/panic/bad_unwind.rs:LL:CC}>` at RUSTLIB/std/src/panicking.rs:LL:CC + = note: inside `std::panic::catch_unwind::<{closure@tests/fail/panic/bad_unwind.rs:LL:CC}, ()>` at RUSTLIB/std/src/panic.rs:LL:CC note: inside `main` - --> $DIR/bad_unwind.rs:LL:CC + --> tests/fail/panic/bad_unwind.rs:LL:CC | LL | std::panic::catch_unwind(|| unwind()).unwrap_err(); | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ diff --git a/tests/fail/panic/double_panic.stderr b/tests/fail/panic/double_panic.stderr index 0395fe418d..3e00821796 100644 --- a/tests/fail/panic/double_panic.stderr +++ b/tests/fail/panic/double_panic.stderr @@ -1,8 +1,8 @@ -thread 'main' panicked at $DIR/double_panic.rs:LL:CC: +thread 'main' panicked at tests/fail/panic/double_panic.rs:LL:CC: first 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 'main' panicked at $DIR/double_panic.rs:LL:CC: +thread 'main' panicked at tests/fail/panic/double_panic.rs:LL:CC: second stack backtrace: thread 'main' panicked at RUSTLIB/core/src/panicking.rs:LL:CC: @@ -23,7 +23,7 @@ LL | ABORT(); = note: inside `core::panicking::panic_nounwind_nobacktrace` at RUSTLIB/core/src/panicking.rs:LL:CC = note: inside `core::panicking::panic_in_cleanup` at RUSTLIB/core/src/panicking.rs:LL:CC note: inside `main` - --> $DIR/double_panic.rs:LL:CC + --> tests/fail/panic/double_panic.rs:LL:CC | LL | / fn main() { LL | | let _foo = Foo; diff --git a/tests/fail/panic/no_std.stderr b/tests/fail/panic/no_std.stderr index 40f6cf1fc0..c1cd53e310 100644 --- a/tests/fail/panic/no_std.stderr +++ b/tests/fail/panic/no_std.stderr @@ -1,15 +1,15 @@ -panicked at $DIR/no_std.rs:LL:CC: +panicked at tests/fail/panic/no_std.rs:LL:CC: blarg I am dead error: abnormal termination: the program aborted execution - --> $DIR/no_std.rs:LL:CC + --> tests/fail/panic/no_std.rs:LL:CC | LL | core::intrinsics::abort(); | ^^^^^^^^^^^^^^^^^^^^^^^^^ the program aborted execution | = note: BACKTRACE: - = note: inside `panic_handler` at $DIR/no_std.rs:LL:CC + = note: inside `panic_handler` at tests/fail/panic/no_std.rs:LL:CC note: inside `start` - --> $DIR/no_std.rs:LL:CC + --> tests/fail/panic/no_std.rs:LL:CC | LL | panic!("blarg I am dead") | ^^^^^^^^^^^^^^^^^^^^^^^^^ diff --git a/tests/fail/panic/panic_abort1.stderr b/tests/fail/panic/panic_abort1.stderr index 6c7cac23be..c5f04d581c 100644 --- a/tests/fail/panic/panic_abort1.stderr +++ b/tests/fail/panic/panic_abort1.stderr @@ -1,4 +1,4 @@ -thread 'main' panicked at $DIR/panic_abort1.rs:LL:CC: +thread 'main' panicked at tests/fail/panic/panic_abort1.rs:LL:CC: 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 @@ -17,7 +17,7 @@ LL | ABORT(); = note: inside `std::sys::backtrace::__rust_end_short_backtrace::<{closure@std::panicking::begin_panic_handler::{closure#0}}, !>` at RUSTLIB/std/src/sys/backtrace.rs:LL:CC = note: inside `std::panicking::begin_panic_handler` at RUSTLIB/std/src/panicking.rs:LL:CC note: inside `main` - --> $DIR/panic_abort1.rs:LL:CC + --> tests/fail/panic/panic_abort1.rs:LL:CC | LL | std::panic!("panicking from libstd"); | ^ diff --git a/tests/fail/panic/panic_abort2.stderr b/tests/fail/panic/panic_abort2.stderr index 1eda5449d1..535cddfd4d 100644 --- a/tests/fail/panic/panic_abort2.stderr +++ b/tests/fail/panic/panic_abort2.stderr @@ -1,4 +1,4 @@ -thread 'main' panicked at $DIR/panic_abort2.rs:LL:CC: +thread 'main' panicked at tests/fail/panic/panic_abort2.rs:LL:CC: 42-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 @@ -17,7 +17,7 @@ LL | ABORT(); = note: inside `std::sys::backtrace::__rust_end_short_backtrace::<{closure@std::panicking::begin_panic_handler::{closure#0}}, !>` at RUSTLIB/std/src/sys/backtrace.rs:LL:CC = note: inside `std::panicking::begin_panic_handler` at RUSTLIB/std/src/panicking.rs:LL:CC note: inside `main` - --> $DIR/panic_abort2.rs:LL:CC + --> tests/fail/panic/panic_abort2.rs:LL:CC | LL | std::panic!("{}-panicking from libstd", 42); | ^ diff --git a/tests/fail/panic/panic_abort3.stderr b/tests/fail/panic/panic_abort3.stderr index 5c7c5e17be..e74cf342e3 100644 --- a/tests/fail/panic/panic_abort3.stderr +++ b/tests/fail/panic/panic_abort3.stderr @@ -1,4 +1,4 @@ -thread 'main' panicked at $DIR/panic_abort3.rs:LL:CC: +thread 'main' panicked at tests/fail/panic/panic_abort3.rs:LL:CC: 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 @@ -17,7 +17,7 @@ LL | ABORT(); = note: inside `std::sys::backtrace::__rust_end_short_backtrace::<{closure@std::panicking::begin_panic_handler::{closure#0}}, !>` at RUSTLIB/std/src/sys/backtrace.rs:LL:CC = note: inside `std::panicking::begin_panic_handler` at RUSTLIB/std/src/panicking.rs:LL:CC note: inside `main` - --> $DIR/panic_abort3.rs:LL:CC + --> tests/fail/panic/panic_abort3.rs:LL:CC | LL | core::panic!("panicking from libcore"); | ^ diff --git a/tests/fail/panic/panic_abort4.stderr b/tests/fail/panic/panic_abort4.stderr index c8104f570f..3983d169bd 100644 --- a/tests/fail/panic/panic_abort4.stderr +++ b/tests/fail/panic/panic_abort4.stderr @@ -1,4 +1,4 @@ -thread 'main' panicked at $DIR/panic_abort4.rs:LL:CC: +thread 'main' panicked at tests/fail/panic/panic_abort4.rs:LL:CC: 42-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 @@ -17,7 +17,7 @@ LL | ABORT(); = note: inside `std::sys::backtrace::__rust_end_short_backtrace::<{closure@std::panicking::begin_panic_handler::{closure#0}}, !>` at RUSTLIB/std/src/sys/backtrace.rs:LL:CC = note: inside `std::panicking::begin_panic_handler` at RUSTLIB/std/src/panicking.rs:LL:CC note: inside `main` - --> $DIR/panic_abort4.rs:LL:CC + --> tests/fail/panic/panic_abort4.rs:LL:CC | LL | core::panic!("{}-panicking from libcore", 42); | ^ diff --git a/tests/fail/panic/tls_macro_const_drop_panic.stderr b/tests/fail/panic/tls_macro_const_drop_panic.stderr index 778061490f..d93062b4bd 100644 --- a/tests/fail/panic/tls_macro_const_drop_panic.stderr +++ b/tests/fail/panic/tls_macro_const_drop_panic.stderr @@ -1,4 +1,4 @@ -thread $NAME panicked at $DIR/tls_macro_const_drop_panic.rs:LL:CC: +thread $NAME panicked at tests/fail/panic/tls_macro_const_drop_panic.rs:LL:CC: ow fatal runtime error: thread local panicked on drop error: abnormal termination: the program aborted execution diff --git a/tests/fail/panic/tls_macro_drop_panic.stderr b/tests/fail/panic/tls_macro_drop_panic.stderr index 367e2ee1f0..c0a2a30dbe 100644 --- a/tests/fail/panic/tls_macro_drop_panic.stderr +++ b/tests/fail/panic/tls_macro_drop_panic.stderr @@ -1,4 +1,4 @@ -thread $NAME panicked at $DIR/tls_macro_drop_panic.rs:LL:CC: +thread $NAME panicked at tests/fail/panic/tls_macro_drop_panic.rs:LL:CC: ow fatal runtime error: thread local panicked on drop error: abnormal termination: the program aborted execution diff --git a/tests/fail/panic/unwind_panic_abort.stderr b/tests/fail/panic/unwind_panic_abort.stderr index 26afe8830c..7291f5bce8 100644 --- a/tests/fail/panic/unwind_panic_abort.stderr +++ b/tests/fail/panic/unwind_panic_abort.stderr @@ -1,5 +1,5 @@ error: Undefined Behavior: unwinding past a stack frame that does not allow unwinding - --> $DIR/unwind_panic_abort.rs:LL:CC + --> tests/fail/panic/unwind_panic_abort.rs:LL:CC | LL | miri_start_unwind(&mut 0); | ^^^^^^^^^^^^^^^^^^^^^^^^^ unwinding past a stack frame that does not allow unwinding @@ -7,7 +7,7 @@ LL | miri_start_unwind(&mut 0); = 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 = note: BACKTRACE: - = note: inside `main` at $DIR/unwind_panic_abort.rs:LL:CC + = note: inside `main` at tests/fail/panic/unwind_panic_abort.rs:LL:CC note: some details are omitted, run with `MIRIFLAGS=-Zmiri-backtrace=full` for a verbose backtrace diff --git a/tests/fail/provenance/pointer_partial_overwrite.stderr b/tests/fail/provenance/pointer_partial_overwrite.stderr index 1ca35be8cb..6bc92fffd5 100644 --- a/tests/fail/provenance/pointer_partial_overwrite.stderr +++ b/tests/fail/provenance/pointer_partial_overwrite.stderr @@ -1,5 +1,5 @@ error: Undefined Behavior: memory access failed: expected a pointer to 4 bytes of memory, but got $HEX[noalloc] which is a dangling pointer (it has no provenance) - --> $DIR/pointer_partial_overwrite.rs:LL:CC + --> tests/fail/provenance/pointer_partial_overwrite.rs:LL:CC | LL | let x = *p; | ^^ memory access failed: expected a pointer to 4 bytes of memory, but got $HEX[noalloc] which is a dangling pointer (it has no provenance) @@ -7,7 +7,7 @@ LL | let x = *p; = 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 = note: BACKTRACE: - = note: inside `main` at $DIR/pointer_partial_overwrite.rs:LL:CC + = note: inside `main` at tests/fail/provenance/pointer_partial_overwrite.rs:LL:CC note: some details are omitted, run with `MIRIFLAGS=-Zmiri-backtrace=full` for a verbose backtrace diff --git a/tests/fail/provenance/provenance_transmute.stderr b/tests/fail/provenance/provenance_transmute.stderr index 8a1d39effb..7403f4382d 100644 --- a/tests/fail/provenance/provenance_transmute.stderr +++ b/tests/fail/provenance/provenance_transmute.stderr @@ -1,5 +1,5 @@ error: Undefined Behavior: memory access failed: expected a pointer to 1 byte of memory, but got $HEX[noalloc] which is a dangling pointer (it has no provenance) - --> $DIR/provenance_transmute.rs:LL:CC + --> tests/fail/provenance/provenance_transmute.rs:LL:CC | LL | let _val = *left_ptr; | ^^^^^^^^^ memory access failed: expected a pointer to 1 byte of memory, but got $HEX[noalloc] which is a dangling pointer (it has no provenance) @@ -7,9 +7,9 @@ LL | let _val = *left_ptr; = 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 = note: BACKTRACE: - = note: inside `deref` at $DIR/provenance_transmute.rs:LL:CC + = note: inside `deref` at tests/fail/provenance/provenance_transmute.rs:LL:CC note: inside `main` - --> $DIR/provenance_transmute.rs:LL:CC + --> tests/fail/provenance/provenance_transmute.rs:LL:CC | LL | deref(ptr1, ptr2.with_addr(ptr1.addr())); | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ diff --git a/tests/fail/provenance/ptr_int_unexposed.stderr b/tests/fail/provenance/ptr_int_unexposed.stderr index e21872244f..1b6518612e 100644 --- a/tests/fail/provenance/ptr_int_unexposed.stderr +++ b/tests/fail/provenance/ptr_int_unexposed.stderr @@ -1,5 +1,5 @@ error: Undefined Behavior: memory access failed: expected a pointer to 4 bytes of memory, but got $HEX[noalloc] which is a dangling pointer (it has no provenance) - --> $DIR/ptr_int_unexposed.rs:LL:CC + --> tests/fail/provenance/ptr_int_unexposed.rs:LL:CC | LL | assert_eq!(unsafe { *ptr }, 3); | ^^^^ memory access failed: expected a pointer to 4 bytes of memory, but got $HEX[noalloc] which is a dangling pointer (it has no provenance) @@ -7,7 +7,7 @@ LL | assert_eq!(unsafe { *ptr }, 3); = 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 = note: BACKTRACE: - = note: inside `main` at $DIR/ptr_int_unexposed.rs:LL:CC + = note: inside `main` at tests/fail/provenance/ptr_int_unexposed.rs:LL:CC note: some details are omitted, run with `MIRIFLAGS=-Zmiri-backtrace=full` for a verbose backtrace diff --git a/tests/fail/provenance/ptr_invalid.stderr b/tests/fail/provenance/ptr_invalid.stderr index bd0a9eb0d2..84347ec7a1 100644 --- a/tests/fail/provenance/ptr_invalid.stderr +++ b/tests/fail/provenance/ptr_invalid.stderr @@ -1,5 +1,5 @@ error: Undefined Behavior: memory access failed: expected a pointer to 4 bytes of memory, but got $HEX[noalloc] which is a dangling pointer (it has no provenance) - --> $DIR/ptr_invalid.rs:LL:CC + --> tests/fail/provenance/ptr_invalid.rs:LL:CC | LL | let _val = unsafe { *xptr_invalid }; | ^^^^^^^^^^^^^ memory access failed: expected a pointer to 4 bytes of memory, but got $HEX[noalloc] which is a dangling pointer (it has no provenance) @@ -7,7 +7,7 @@ LL | let _val = unsafe { *xptr_invalid }; = 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 = note: BACKTRACE: - = note: inside `main` at $DIR/ptr_invalid.rs:LL:CC + = note: inside `main` at tests/fail/provenance/ptr_invalid.rs:LL:CC note: some details are omitted, run with `MIRIFLAGS=-Zmiri-backtrace=full` for a verbose backtrace diff --git a/tests/fail/provenance/ptr_invalid_offset.stderr b/tests/fail/provenance/ptr_invalid_offset.stderr index 35e5c08300..3910bc4df4 100644 --- a/tests/fail/provenance/ptr_invalid_offset.stderr +++ b/tests/fail/provenance/ptr_invalid_offset.stderr @@ -1,5 +1,5 @@ error: Undefined Behavior: out-of-bounds pointer arithmetic: expected a pointer to 1 byte of memory, but got $HEX[noalloc] which is a dangling pointer (it has no provenance) - --> $DIR/ptr_invalid_offset.rs:LL:CC + --> tests/fail/provenance/ptr_invalid_offset.rs:LL:CC | LL | let _ = unsafe { roundtrip.offset(1) }; | ^^^^^^^^^^^^^^^^^^^ out-of-bounds pointer arithmetic: expected a pointer to 1 byte of memory, but got $HEX[noalloc] which is a dangling pointer (it has no provenance) @@ -7,7 +7,7 @@ LL | let _ = unsafe { roundtrip.offset(1) }; = 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 = note: BACKTRACE: - = note: inside `main` at $DIR/ptr_invalid_offset.rs:LL:CC + = note: inside `main` at tests/fail/provenance/ptr_invalid_offset.rs:LL:CC note: some details are omitted, run with `MIRIFLAGS=-Zmiri-backtrace=full` for a verbose backtrace diff --git a/tests/fail/provenance/strict_provenance_cast.stderr b/tests/fail/provenance/strict_provenance_cast.stderr index 8c61b66ac4..ab7d8db1a3 100644 --- a/tests/fail/provenance/strict_provenance_cast.stderr +++ b/tests/fail/provenance/strict_provenance_cast.stderr @@ -1,12 +1,12 @@ error: unsupported operation: integer-to-pointer casts and `ptr::with_exposed_provenance` are not supported with `-Zmiri-strict-provenance` - --> $DIR/strict_provenance_cast.rs:LL:CC + --> tests/fail/provenance/strict_provenance_cast.rs:LL:CC | LL | let _ptr = std::ptr::with_exposed_provenance::(addr); | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ integer-to-pointer casts and `ptr::with_exposed_provenance` are not supported with `-Zmiri-strict-provenance` | = help: use Strict Provenance APIs (https://doc.rust-lang.org/nightly/std/ptr/index.html#strict-provenance, https://crates.io/crates/sptr) instead = note: BACKTRACE: - = note: inside `main` at $DIR/strict_provenance_cast.rs:LL:CC + = note: inside `main` at tests/fail/provenance/strict_provenance_cast.rs:LL:CC note: some details are omitted, run with `MIRIFLAGS=-Zmiri-backtrace=full` for a verbose backtrace diff --git a/tests/fail/rc_as_ptr.stderr b/tests/fail/rc_as_ptr.stderr index 83d85f8adf..0fcb0faf49 100644 --- a/tests/fail/rc_as_ptr.stderr +++ b/tests/fail/rc_as_ptr.stderr @@ -1,5 +1,5 @@ error: Undefined Behavior: out-of-bounds pointer use: ALLOC has been freed, so this pointer is dangling - --> $DIR/rc_as_ptr.rs:LL:CC + --> tests/fail/rc_as_ptr.rs:LL:CC | LL | assert_eq!(42, **unsafe { &*Weak::as_ptr(&weak) }); | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ out-of-bounds pointer use: ALLOC has been freed, so this pointer is dangling @@ -7,12 +7,12 @@ LL | assert_eq!(42, **unsafe { &*Weak::as_ptr(&weak) }); = 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 help: ALLOC was allocated here: - --> $DIR/rc_as_ptr.rs:LL:CC + --> tests/fail/rc_as_ptr.rs:LL:CC | LL | let strong = Rc::new(Box::new(42)); | ^^^^^^^^^^^^ help: ALLOC was deallocated here: - --> $DIR/rc_as_ptr.rs:LL:CC + --> tests/fail/rc_as_ptr.rs:LL:CC | LL | drop(strong); | ^^^^^^^^^^^^ diff --git a/tests/fail/reading_half_a_pointer.stderr b/tests/fail/reading_half_a_pointer.stderr index cba8a9f843..9217964416 100644 --- a/tests/fail/reading_half_a_pointer.stderr +++ b/tests/fail/reading_half_a_pointer.stderr @@ -1,5 +1,5 @@ error: Undefined Behavior: memory access failed: expected a pointer to 1 byte of memory, but got $HEX[noalloc] which is a dangling pointer (it has no provenance) - --> $DIR/reading_half_a_pointer.rs:LL:CC + --> tests/fail/reading_half_a_pointer.rs:LL:CC | LL | let _val = *x; | ^^ memory access failed: expected a pointer to 1 byte of memory, but got $HEX[noalloc] which is a dangling pointer (it has no provenance) @@ -7,7 +7,7 @@ LL | let _val = *x; = 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 = note: BACKTRACE: - = note: inside `main` at $DIR/reading_half_a_pointer.rs:LL:CC + = note: inside `main` at tests/fail/reading_half_a_pointer.rs:LL:CC note: some details are omitted, run with `MIRIFLAGS=-Zmiri-backtrace=full` for a verbose backtrace diff --git a/tests/fail/rustc-error.stderr b/tests/fail/rustc-error.stderr index 3f911c172d..31d9946c41 100644 --- a/tests/fail/rustc-error.stderr +++ b/tests/fail/rustc-error.stderr @@ -1,5 +1,5 @@ error[E0423]: expected function, found macro `println` - --> $DIR/rustc-error.rs:LL:CC + --> tests/fail/rustc-error.rs:LL:CC | LL | println("Hello, world!"); | ^^^^^^^ not a function diff --git a/tests/fail/rustc-error2.stderr b/tests/fail/rustc-error2.stderr index de2861a019..cfbf305d3b 100644 --- a/tests/fail/rustc-error2.stderr +++ b/tests/fail/rustc-error2.stderr @@ -1,5 +1,5 @@ error[E0433]: failed to resolve: use of undeclared crate or module `assert_mem_uninitialized_valid` - --> $DIR/rustc-error2.rs:LL:CC + --> tests/fail/rustc-error2.rs:LL:CC | LL | fn deref(&self) -> &assert_mem_uninitialized_valid::Target { | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ use of undeclared crate or module `assert_mem_uninitialized_valid` diff --git a/tests/fail/shims/backtrace/bad-backtrace-decl.stderr b/tests/fail/shims/backtrace/bad-backtrace-decl.stderr index 159a02f2c0..346cc77df1 100644 --- a/tests/fail/shims/backtrace/bad-backtrace-decl.stderr +++ b/tests/fail/shims/backtrace/bad-backtrace-decl.stderr @@ -1,5 +1,5 @@ error: Undefined Behavior: bad declaration of miri_resolve_frame - should return a struct with 5 fields - --> $DIR/bad-backtrace-decl.rs:LL:CC + --> tests/fail/shims/backtrace/bad-backtrace-decl.rs:LL:CC | LL | ... miri_resolve_frame(*frame, 0); | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ bad declaration of miri_resolve_frame - should return a struct with 5 fields @@ -7,7 +7,7 @@ LL | ... miri_resolve_frame(*frame, 0); = 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 = note: BACKTRACE: - = note: inside `main` at $DIR/bad-backtrace-decl.rs:LL:CC + = note: inside `main` at tests/fail/shims/backtrace/bad-backtrace-decl.rs:LL:CC note: some details are omitted, run with `MIRIFLAGS=-Zmiri-backtrace=full` for a verbose backtrace diff --git a/tests/fail/shims/backtrace/bad-backtrace-flags.stderr b/tests/fail/shims/backtrace/bad-backtrace-flags.stderr index 504485e3b3..a8d531c512 100644 --- a/tests/fail/shims/backtrace/bad-backtrace-flags.stderr +++ b/tests/fail/shims/backtrace/bad-backtrace-flags.stderr @@ -1,12 +1,12 @@ error: unsupported operation: unknown `miri_get_backtrace` flags 2 - --> $DIR/bad-backtrace-flags.rs:LL:CC + --> tests/fail/shims/backtrace/bad-backtrace-flags.rs:LL:CC | LL | miri_get_backtrace(2, std::ptr::null_mut()); | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ unknown `miri_get_backtrace` flags 2 | = help: this is likely not a bug in the program; it indicates that the program performed an operation that Miri does not support = note: BACKTRACE: - = note: inside `main` at $DIR/bad-backtrace-flags.rs:LL:CC + = note: inside `main` at tests/fail/shims/backtrace/bad-backtrace-flags.rs:LL:CC note: some details are omitted, run with `MIRIFLAGS=-Zmiri-backtrace=full` for a verbose backtrace diff --git a/tests/fail/shims/backtrace/bad-backtrace-ptr.stderr b/tests/fail/shims/backtrace/bad-backtrace-ptr.stderr index 523c935762..7ae9558fad 100644 --- a/tests/fail/shims/backtrace/bad-backtrace-ptr.stderr +++ b/tests/fail/shims/backtrace/bad-backtrace-ptr.stderr @@ -1,5 +1,5 @@ error: Undefined Behavior: out-of-bounds pointer use: expected a pointer to some allocation, but got a null pointer - --> $DIR/bad-backtrace-ptr.rs:LL:CC + --> tests/fail/shims/backtrace/bad-backtrace-ptr.rs:LL:CC | LL | miri_resolve_frame(std::ptr::null_mut(), 0); | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ out-of-bounds pointer use: expected a pointer to some allocation, but got a null pointer @@ -7,7 +7,7 @@ LL | miri_resolve_frame(std::ptr::null_mut(), 0); = 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 = note: BACKTRACE: - = note: inside `main` at $DIR/bad-backtrace-ptr.rs:LL:CC + = note: inside `main` at tests/fail/shims/backtrace/bad-backtrace-ptr.rs:LL:CC note: some details are omitted, run with `MIRIFLAGS=-Zmiri-backtrace=full` for a verbose backtrace diff --git a/tests/fail/shims/backtrace/bad-backtrace-resolve-flags.stderr b/tests/fail/shims/backtrace/bad-backtrace-resolve-flags.stderr index c1f0ce3d1a..d79ae1ec41 100644 --- a/tests/fail/shims/backtrace/bad-backtrace-resolve-flags.stderr +++ b/tests/fail/shims/backtrace/bad-backtrace-resolve-flags.stderr @@ -1,12 +1,12 @@ error: unsupported operation: unknown `miri_resolve_frame` flags 2 - --> $DIR/bad-backtrace-resolve-flags.rs:LL:CC + --> tests/fail/shims/backtrace/bad-backtrace-resolve-flags.rs:LL:CC | LL | miri_resolve_frame(buf[0], 2); | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ unknown `miri_resolve_frame` flags 2 | = help: this is likely not a bug in the program; it indicates that the program performed an operation that Miri does not support = note: BACKTRACE: - = note: inside `main` at $DIR/bad-backtrace-resolve-flags.rs:LL:CC + = note: inside `main` at tests/fail/shims/backtrace/bad-backtrace-resolve-flags.rs:LL:CC note: some details are omitted, run with `MIRIFLAGS=-Zmiri-backtrace=full` for a verbose backtrace diff --git a/tests/fail/shims/backtrace/bad-backtrace-resolve-names-flags.stderr b/tests/fail/shims/backtrace/bad-backtrace-resolve-names-flags.stderr index fc270593e6..ff3176a789 100644 --- a/tests/fail/shims/backtrace/bad-backtrace-resolve-names-flags.stderr +++ b/tests/fail/shims/backtrace/bad-backtrace-resolve-names-flags.stderr @@ -1,12 +1,12 @@ error: unsupported operation: unknown `miri_resolve_frame_names` flags 2 - --> $DIR/bad-backtrace-resolve-names-flags.rs:LL:CC + --> tests/fail/shims/backtrace/bad-backtrace-resolve-names-flags.rs:LL:CC | LL | ... miri_resolve_frame_names(buf[0], 2, std::ptr::null_mut(), std::ptr::null_mut()); | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ unknown `miri_resolve_frame_names` flags 2 | = help: this is likely not a bug in the program; it indicates that the program performed an operation that Miri does not support = note: BACKTRACE: - = note: inside `main` at $DIR/bad-backtrace-resolve-names-flags.rs:LL:CC + = note: inside `main` at tests/fail/shims/backtrace/bad-backtrace-resolve-names-flags.rs:LL:CC note: some details are omitted, run with `MIRIFLAGS=-Zmiri-backtrace=full` for a verbose backtrace diff --git a/tests/fail/shims/backtrace/bad-backtrace-size-flags.stderr b/tests/fail/shims/backtrace/bad-backtrace-size-flags.stderr index 2d70733334..da287e564e 100644 --- a/tests/fail/shims/backtrace/bad-backtrace-size-flags.stderr +++ b/tests/fail/shims/backtrace/bad-backtrace-size-flags.stderr @@ -1,12 +1,12 @@ error: unsupported operation: unknown `miri_backtrace_size` flags 2 - --> $DIR/bad-backtrace-size-flags.rs:LL:CC + --> tests/fail/shims/backtrace/bad-backtrace-size-flags.rs:LL:CC | LL | miri_backtrace_size(2); | ^^^^^^^^^^^^^^^^^^^^^^ unknown `miri_backtrace_size` flags 2 | = help: this is likely not a bug in the program; it indicates that the program performed an operation that Miri does not support = note: BACKTRACE: - = note: inside `main` at $DIR/bad-backtrace-size-flags.rs:LL:CC + = note: inside `main` at tests/fail/shims/backtrace/bad-backtrace-size-flags.rs:LL:CC note: some details are omitted, run with `MIRIFLAGS=-Zmiri-backtrace=full` for a verbose backtrace diff --git a/tests/fail/shims/fs/isolated_file.rs b/tests/fail/shims/fs/isolated_file.rs index 2f27e95297..0cb2fe32fd 100644 --- a/tests/fail/shims/fs/isolated_file.rs +++ b/tests/fail/shims/fs/isolated_file.rs @@ -1,4 +1,5 @@ -//@ignore-target-windows: File handling is not implemented yet +// File handling is not implemented yet +//@ignore-target: windows //@error-in-other-file: `open` not available when isolation is enabled fn main() { diff --git a/tests/fail/shims/fs/isolated_file.stderr b/tests/fail/shims/fs/isolated_file.stderr index ec956f8334..e611d6e28f 100644 --- a/tests/fail/shims/fs/isolated_file.stderr +++ b/tests/fail/shims/fs/isolated_file.stderr @@ -19,7 +19,7 @@ LL | let fd = cvt_r(|| unsafe { open64(path.as_ptr(), flags, opts.mode a = note: inside `std::fs::OpenOptions::open::<&std::path::Path>` at RUSTLIB/std/src/fs.rs:LL:CC = note: inside `std::fs::File::open::<&str>` at RUSTLIB/std/src/fs.rs:LL:CC note: inside `main` - --> $DIR/isolated_file.rs:LL:CC + --> tests/fail/shims/fs/isolated_file.rs:LL:CC | LL | let _file = std::fs::File::open("file.txt").unwrap(); | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ diff --git a/tests/fail/shims/shim_arg_size.stderr b/tests/fail/shims/shim_arg_size.stderr index b40d02ac34..e17fe9019f 100644 --- a/tests/fail/shims/shim_arg_size.stderr +++ b/tests/fail/shims/shim_arg_size.stderr @@ -1,5 +1,5 @@ error: Undefined Behavior: scalar size mismatch: expected 4 bytes but got 1 bytes instead - --> $DIR/shim_arg_size.rs:LL:CC + --> tests/fail/shims/shim_arg_size.rs:LL:CC | LL | memchr(std::ptr::null(), 0, 0); | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ scalar size mismatch: expected 4 bytes but got 1 bytes instead @@ -7,7 +7,7 @@ LL | memchr(std::ptr::null(), 0, 0); = 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 = note: BACKTRACE: - = note: inside `main` at $DIR/shim_arg_size.rs:LL:CC + = note: inside `main` at tests/fail/shims/shim_arg_size.rs:LL:CC note: some details are omitted, run with `MIRIFLAGS=-Zmiri-backtrace=full` for a verbose backtrace diff --git a/tests/fail/should-pass/cpp20_rwc_syncs.stderr b/tests/fail/should-pass/cpp20_rwc_syncs.stderr index 966279723c..5185845568 100644 --- a/tests/fail/should-pass/cpp20_rwc_syncs.stderr +++ b/tests/fail/should-pass/cpp20_rwc_syncs.stderr @@ -1,5 +1,5 @@ error: Undefined Behavior: entering unreachable code - --> $DIR/cpp20_rwc_syncs.rs:LL:CC + --> tests/fail/should-pass/cpp20_rwc_syncs.rs:LL:CC | LL | std::hint::unreachable_unchecked(); | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ entering unreachable code @@ -7,9 +7,9 @@ LL | std::hint::unreachable_unchecked(); = 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 = note: BACKTRACE: - = note: inside `test_cpp20_rwc_syncs` at $DIR/cpp20_rwc_syncs.rs:LL:CC + = note: inside `test_cpp20_rwc_syncs` at tests/fail/should-pass/cpp20_rwc_syncs.rs:LL:CC note: inside `main` - --> $DIR/cpp20_rwc_syncs.rs:LL:CC + --> tests/fail/should-pass/cpp20_rwc_syncs.rs:LL:CC | LL | test_cpp20_rwc_syncs(); | ^^^^^^^^^^^^^^^^^^^^^^ diff --git a/tests/fail/stacked_borrows/deallocate_against_protector1.stderr b/tests/fail/stacked_borrows/deallocate_against_protector1.stderr index 2a8d4f3aea..411add12fe 100644 --- a/tests/fail/stacked_borrows/deallocate_against_protector1.stderr +++ b/tests/fail/stacked_borrows/deallocate_against_protector1.stderr @@ -13,18 +13,18 @@ LL | unsafe { __rust_dealloc(ptr, layout.size(), layout.align()) } = note: inside `std::ptr::drop_in_place::> - shim(Some(std::boxed::Box))` at RUSTLIB/core/src/ptr/mod.rs:LL:CC = note: inside `std::mem::drop::>` at RUSTLIB/core/src/mem/mod.rs:LL:CC note: inside closure - --> $DIR/deallocate_against_protector1.rs:LL:CC + --> tests/fail/stacked_borrows/deallocate_against_protector1.rs:LL:CC | LL | drop(unsafe { Box::from_raw(raw) }); | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ - = note: inside `<{closure@$DIR/deallocate_against_protector1.rs:LL:CC} as std::ops::FnOnce<(&mut i32,)>>::call_once - shim` at RUSTLIB/core/src/ops/function.rs:LL:CC + = note: inside `<{closure@tests/fail/stacked_borrows/deallocate_against_protector1.rs:LL:CC} as std::ops::FnOnce<(&mut i32,)>>::call_once - shim` at RUSTLIB/core/src/ops/function.rs:LL:CC note: inside `inner` - --> $DIR/deallocate_against_protector1.rs:LL:CC + --> tests/fail/stacked_borrows/deallocate_against_protector1.rs:LL:CC | LL | f(x) | ^^^^ note: inside `main` - --> $DIR/deallocate_against_protector1.rs:LL:CC + --> tests/fail/stacked_borrows/deallocate_against_protector1.rs:LL:CC | LL | / inner(Box::leak(Box::new(0)), |x| { LL | | let raw = x as *mut _; diff --git a/tests/fail/stacked_borrows/disable_mut_does_not_merge_srw.stderr b/tests/fail/stacked_borrows/disable_mut_does_not_merge_srw.stderr index aa26a003f2..2d0209d1a2 100644 --- a/tests/fail/stacked_borrows/disable_mut_does_not_merge_srw.stderr +++ b/tests/fail/stacked_borrows/disable_mut_does_not_merge_srw.stderr @@ -1,5 +1,5 @@ error: Undefined Behavior: attempting a read access using at ALLOC[0x0], but that tag does not exist in the borrow stack for this location - --> $DIR/disable_mut_does_not_merge_srw.rs:LL:CC + --> tests/fail/stacked_borrows/disable_mut_does_not_merge_srw.rs:LL:CC | LL | let _val = *raw; | ^^^^ @@ -10,17 +10,17 @@ LL | let _val = *raw; = help: this indicates a potential bug in the program: it performed an invalid operation, but the Stacked Borrows rules it violated are still experimental = help: see https://github.com/rust-lang/unsafe-code-guidelines/blob/master/wip/stacked-borrows.md for further information help: was created by a SharedReadWrite retag at offsets [0x0..0x4] - --> $DIR/disable_mut_does_not_merge_srw.rs:LL:CC + --> tests/fail/stacked_borrows/disable_mut_does_not_merge_srw.rs:LL:CC | LL | mutref as *mut i32 | ^^^^^^ help: was later invalidated at offsets [0x0..0x4] by a write access - --> $DIR/disable_mut_does_not_merge_srw.rs:LL:CC + --> tests/fail/stacked_borrows/disable_mut_does_not_merge_srw.rs:LL:CC | LL | *base = 1; | ^^^^^^^^^ = note: BACKTRACE (of the first span): - = note: inside `main` at $DIR/disable_mut_does_not_merge_srw.rs:LL:CC + = note: inside `main` at tests/fail/stacked_borrows/disable_mut_does_not_merge_srw.rs:LL:CC note: some details are omitted, run with `MIRIFLAGS=-Zmiri-backtrace=full` for a verbose backtrace diff --git a/tests/fail/stacked_borrows/drop_in_place_protector.stderr b/tests/fail/stacked_borrows/drop_in_place_protector.stderr index 5147bcd458..f107ea2023 100644 --- a/tests/fail/stacked_borrows/drop_in_place_protector.stderr +++ b/tests/fail/stacked_borrows/drop_in_place_protector.stderr @@ -1,5 +1,5 @@ error: Undefined Behavior: not granting access to tag because that would remove [Unique for ] which is strongly protected - --> $DIR/drop_in_place_protector.rs:LL:CC + --> tests/fail/stacked_borrows/drop_in_place_protector.rs:LL:CC | LL | let _val = *P; | ^^ not granting access to tag because that would remove [Unique for ] which is strongly protected @@ -7,21 +7,21 @@ LL | let _val = *P; = help: this indicates a potential bug in the program: it performed an invalid operation, but the Stacked Borrows rules it violated are still experimental = help: see https://github.com/rust-lang/unsafe-code-guidelines/blob/master/wip/stacked-borrows.md for further information help: was created by a SharedReadWrite retag at offsets [0x0..0x1] - --> $DIR/drop_in_place_protector.rs:LL:CC + --> tests/fail/stacked_borrows/drop_in_place_protector.rs:LL:CC | LL | let x = core::ptr::addr_of_mut!(x); | ^^^^^^^^^^^^^^^^^^^^^^^^^^ help: is this argument - --> $DIR/drop_in_place_protector.rs:LL:CC + --> tests/fail/stacked_borrows/drop_in_place_protector.rs:LL:CC | LL | core::ptr::drop_in_place(x); | ^^^^^^^^^^^^^^^^^^^^^^^^^^^ = note: BACKTRACE (of the first span): - = note: inside `::drop` at $DIR/drop_in_place_protector.rs:LL:CC + = note: inside `::drop` at tests/fail/stacked_borrows/drop_in_place_protector.rs:LL:CC = note: inside `std::ptr::drop_in_place:: - shim(Some(HasDrop))` at RUSTLIB/core/src/ptr/mod.rs:LL:CC = note: inside `std::ptr::drop_in_place::<(HasDrop, u8)> - shim(Some((HasDrop, u8)))` at RUSTLIB/core/src/ptr/mod.rs:LL:CC note: inside `main` - --> $DIR/drop_in_place_protector.rs:LL:CC + --> tests/fail/stacked_borrows/drop_in_place_protector.rs:LL:CC | LL | core::ptr::drop_in_place(x); | ^^^^^^^^^^^^^^^^^^^^^^^^^^^ diff --git a/tests/fail/stacked_borrows/drop_in_place_retag.stderr b/tests/fail/stacked_borrows/drop_in_place_retag.stderr index 6b8465804a..eebedf842e 100644 --- a/tests/fail/stacked_borrows/drop_in_place_retag.stderr +++ b/tests/fail/stacked_borrows/drop_in_place_retag.stderr @@ -10,14 +10,14 @@ LL | pub unsafe fn drop_in_place(to_drop: *mut T) { = help: this indicates a potential bug in the program: it performed an invalid operation, but the Stacked Borrows rules it violated are still experimental = help: see https://github.com/rust-lang/unsafe-code-guidelines/blob/master/wip/stacked-borrows.md for further information help: was created by a SharedReadOnly retag at offsets [0x0..0x1] - --> $DIR/drop_in_place_retag.rs:LL:CC + --> tests/fail/stacked_borrows/drop_in_place_retag.rs:LL:CC | LL | let x = core::ptr::addr_of!(x); | ^^^^^^^^^^^^^^^^^^^^^^ = note: BACKTRACE (of the first span): = note: inside `std::ptr::drop_in_place:: - shim(None)` at RUSTLIB/core/src/ptr/mod.rs:LL:CC note: inside `main` - --> $DIR/drop_in_place_retag.rs:LL:CC + --> tests/fail/stacked_borrows/drop_in_place_retag.rs:LL:CC | LL | core::ptr::drop_in_place(x.cast_mut()); | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ diff --git a/tests/fail/stacked_borrows/exposed_only_ro.stderr b/tests/fail/stacked_borrows/exposed_only_ro.stderr index 201bdcdeb9..861dd75bb2 100644 --- a/tests/fail/stacked_borrows/exposed_only_ro.stderr +++ b/tests/fail/stacked_borrows/exposed_only_ro.stderr @@ -1,5 +1,5 @@ error: Undefined Behavior: attempting a write access using at ALLOC[0x0], but no exposed tags have suitable permission in the borrow stack for this location - --> $DIR/exposed_only_ro.rs:LL:CC + --> tests/fail/stacked_borrows/exposed_only_ro.rs:LL:CC | LL | unsafe { *ptr = 0 }; | ^^^^^^^^ @@ -10,7 +10,7 @@ LL | unsafe { *ptr = 0 }; = help: this indicates a potential bug in the program: it performed an invalid operation, but the Stacked Borrows rules it violated are still experimental = help: see https://github.com/rust-lang/unsafe-code-guidelines/blob/master/wip/stacked-borrows.md for further information = note: BACKTRACE: - = note: inside `main` at $DIR/exposed_only_ro.rs:LL:CC + = note: inside `main` at tests/fail/stacked_borrows/exposed_only_ro.rs:LL:CC note: some details are omitted, run with `MIRIFLAGS=-Zmiri-backtrace=full` for a verbose backtrace diff --git a/tests/fail/stacked_borrows/fnentry_invalidation.stderr b/tests/fail/stacked_borrows/fnentry_invalidation.stderr index 2a841aa0a8..1a71feee7a 100644 --- a/tests/fail/stacked_borrows/fnentry_invalidation.stderr +++ b/tests/fail/stacked_borrows/fnentry_invalidation.stderr @@ -1,5 +1,5 @@ error: Undefined Behavior: attempting a read access using at ALLOC[0x0], but that tag does not exist in the borrow stack for this location - --> $DIR/fnentry_invalidation.rs:LL:CC + --> tests/fail/stacked_borrows/fnentry_invalidation.rs:LL:CC | LL | let _oof = *z; | ^^ @@ -10,17 +10,17 @@ LL | let _oof = *z; = help: this indicates a potential bug in the program: it performed an invalid operation, but the Stacked Borrows rules it violated are still experimental = help: see https://github.com/rust-lang/unsafe-code-guidelines/blob/master/wip/stacked-borrows.md for further information help: was created by a SharedReadWrite retag at offsets [0x0..0x4] - --> $DIR/fnentry_invalidation.rs:LL:CC + --> tests/fail/stacked_borrows/fnentry_invalidation.rs:LL:CC | LL | let z = &mut x as *mut i32; | ^^^^^^ help: was later invalidated at offsets [0x0..0x4] by a Unique function-entry retag inside this call - --> $DIR/fnentry_invalidation.rs:LL:CC + --> tests/fail/stacked_borrows/fnentry_invalidation.rs:LL:CC | LL | x.do_bad(); | ^^^^^^^^^^ = note: BACKTRACE (of the first span): - = note: inside `main` at $DIR/fnentry_invalidation.rs:LL:CC + = note: inside `main` at tests/fail/stacked_borrows/fnentry_invalidation.rs:LL:CC note: some details are omitted, run with `MIRIFLAGS=-Zmiri-backtrace=full` for a verbose backtrace diff --git a/tests/fail/stacked_borrows/fnentry_invalidation2.stderr b/tests/fail/stacked_borrows/fnentry_invalidation2.stderr index 42f042bfad..0b5b005881 100644 --- a/tests/fail/stacked_borrows/fnentry_invalidation2.stderr +++ b/tests/fail/stacked_borrows/fnentry_invalidation2.stderr @@ -1,5 +1,5 @@ error: Undefined Behavior: attempting a read access using at ALLOC[0x0], but that tag does not exist in the borrow stack for this location - --> $DIR/fnentry_invalidation2.rs:LL:CC + --> tests/fail/stacked_borrows/fnentry_invalidation2.rs:LL:CC | LL | let _oof = *ptr; | ^^^^ @@ -10,17 +10,17 @@ LL | let _oof = *ptr; = help: this indicates a potential bug in the program: it performed an invalid operation, but the Stacked Borrows rules it violated are still experimental = help: see https://github.com/rust-lang/unsafe-code-guidelines/blob/master/wip/stacked-borrows.md for further information help: was created by a SharedReadOnly retag at offsets [0x0..0xc] - --> $DIR/fnentry_invalidation2.rs:LL:CC + --> tests/fail/stacked_borrows/fnentry_invalidation2.rs:LL:CC | LL | let ptr = t.sli.as_ptr(); | ^^^^^^^^^^^^^^ help: was later invalidated at offsets [0x0..0xc] by a Unique function-entry retag inside this call - --> $DIR/fnentry_invalidation2.rs:LL:CC + --> tests/fail/stacked_borrows/fnentry_invalidation2.rs:LL:CC | LL | let _ = t.sli.as_mut_ptr(); | ^^^^^^^^^^^^^^^^^^ = note: BACKTRACE (of the first span): - = note: inside `main` at $DIR/fnentry_invalidation2.rs:LL:CC + = note: inside `main` at tests/fail/stacked_borrows/fnentry_invalidation2.rs:LL:CC note: some details are omitted, run with `MIRIFLAGS=-Zmiri-backtrace=full` for a verbose backtrace diff --git a/tests/fail/stacked_borrows/illegal_dealloc1.stderr b/tests/fail/stacked_borrows/illegal_dealloc1.stderr index 7a44c8384a..52c3a0230d 100644 --- a/tests/fail/stacked_borrows/illegal_dealloc1.stderr +++ b/tests/fail/stacked_borrows/illegal_dealloc1.stderr @@ -7,19 +7,19 @@ LL | unsafe { __rust_dealloc(ptr, layout.size(), layout.align()) } = help: this indicates a potential bug in the program: it performed an invalid operation, but the Stacked Borrows rules it violated are still experimental = help: see https://github.com/rust-lang/unsafe-code-guidelines/blob/master/wip/stacked-borrows.md for further information help: was created by a SharedReadWrite retag at offsets [0x0..0x1] - --> $DIR/illegal_deALLOC.rs:LL:CC + --> tests/fail/stacked_borrows/illegal_deALLOC.rs:LL:CC | LL | let ptr2 = (&mut *ptr1) as *mut u8; | ^^^^^^^^^^^^ help: was later invalidated at offsets [0x0..0x1] by a write access - --> $DIR/illegal_deALLOC.rs:LL:CC + --> tests/fail/stacked_borrows/illegal_deALLOC.rs:LL:CC | LL | ptr1.write(0); | ^^^^^^^^^^^^^ = note: BACKTRACE (of the first span): = note: inside `std::alloc::dealloc` at RUSTLIB/alloc/src/alloc.rs:LL:CC note: inside `main` - --> $DIR/illegal_deALLOC.rs:LL:CC + --> tests/fail/stacked_borrows/illegal_deALLOC.rs:LL:CC | LL | dealloc(ptr2, Layout::from_size_align_unchecked(1, 1)); | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ diff --git a/tests/fail/stacked_borrows/illegal_read1.stderr b/tests/fail/stacked_borrows/illegal_read1.stderr index 2dfb660c53..bc719f9f20 100644 --- a/tests/fail/stacked_borrows/illegal_read1.stderr +++ b/tests/fail/stacked_borrows/illegal_read1.stderr @@ -1,5 +1,5 @@ error: Undefined Behavior: attempting a read access using at ALLOC[0x0], but that tag does not exist in the borrow stack for this location - --> $DIR/illegal_read1.rs:LL:CC + --> tests/fail/stacked_borrows/illegal_read1.rs:LL:CC | LL | let _val = *xref; // ...but any use of raw will invalidate our ref. | ^^^^^ @@ -10,17 +10,17 @@ LL | let _val = *xref; // ...but any use of raw will invalidate our ref. = help: this indicates a potential bug in the program: it performed an invalid operation, but the Stacked Borrows rules it violated are still experimental = help: see https://github.com/rust-lang/unsafe-code-guidelines/blob/master/wip/stacked-borrows.md for further information help: was created by a Unique retag at offsets [0x0..0x4] - --> $DIR/illegal_read1.rs:LL:CC + --> tests/fail/stacked_borrows/illegal_read1.rs:LL:CC | LL | let xref = unsafe { &mut *xraw }; // derived from raw, so using raw is still ok... | ^^^^^^^^^^ help: was later invalidated at offsets [0x0..0x4] by a read access - --> $DIR/illegal_read1.rs:LL:CC + --> tests/fail/stacked_borrows/illegal_read1.rs:LL:CC | LL | let _val = unsafe { *xraw }; | ^^^^^ = note: BACKTRACE (of the first span): - = note: inside `main` at $DIR/illegal_read1.rs:LL:CC + = note: inside `main` at tests/fail/stacked_borrows/illegal_read1.rs:LL:CC note: some details are omitted, run with `MIRIFLAGS=-Zmiri-backtrace=full` for a verbose backtrace diff --git a/tests/fail/stacked_borrows/illegal_read2.stderr b/tests/fail/stacked_borrows/illegal_read2.stderr index ce3b920c1d..d1bca88d05 100644 --- a/tests/fail/stacked_borrows/illegal_read2.stderr +++ b/tests/fail/stacked_borrows/illegal_read2.stderr @@ -1,5 +1,5 @@ error: Undefined Behavior: attempting a read access using at ALLOC[0x0], but that tag does not exist in the borrow stack for this location - --> $DIR/illegal_read2.rs:LL:CC + --> tests/fail/stacked_borrows/illegal_read2.rs:LL:CC | LL | let _val = *xref; // ...but any use of raw will invalidate our ref. | ^^^^^ @@ -10,17 +10,17 @@ LL | let _val = *xref; // ...but any use of raw will invalidate our ref. = help: this indicates a potential bug in the program: it performed an invalid operation, but the Stacked Borrows rules it violated are still experimental = help: see https://github.com/rust-lang/unsafe-code-guidelines/blob/master/wip/stacked-borrows.md for further information help: was created by a Unique retag at offsets [0x0..0x4] - --> $DIR/illegal_read2.rs:LL:CC + --> tests/fail/stacked_borrows/illegal_read2.rs:LL:CC | LL | let xref = unsafe { &mut *xraw }; // derived from raw, so using raw is still ok... | ^^^^^^^^^^ help: was later invalidated at offsets [0x0..0x4] by a SharedReadOnly retag - --> $DIR/illegal_read2.rs:LL:CC + --> tests/fail/stacked_borrows/illegal_read2.rs:LL:CC | LL | let shr = unsafe { &*xraw }; | ^^^^^^ = note: BACKTRACE (of the first span): - = note: inside `main` at $DIR/illegal_read2.rs:LL:CC + = note: inside `main` at tests/fail/stacked_borrows/illegal_read2.rs:LL:CC note: some details are omitted, run with `MIRIFLAGS=-Zmiri-backtrace=full` for a verbose backtrace diff --git a/tests/fail/stacked_borrows/illegal_read3.stderr b/tests/fail/stacked_borrows/illegal_read3.stderr index 2c81fda141..6a6701aae1 100644 --- a/tests/fail/stacked_borrows/illegal_read3.stderr +++ b/tests/fail/stacked_borrows/illegal_read3.stderr @@ -1,5 +1,5 @@ error: Undefined Behavior: attempting a read access using at ALLOC[0x0], but that tag does not exist in the borrow stack for this location - --> $DIR/illegal_read3.rs:LL:CC + --> tests/fail/stacked_borrows/illegal_read3.rs:LL:CC | LL | let _val = *xref2; | ^^^^^^ @@ -10,17 +10,17 @@ LL | let _val = *xref2; = help: this indicates a potential bug in the program: it performed an invalid operation, but the Stacked Borrows rules it violated are still experimental = help: see https://github.com/rust-lang/unsafe-code-guidelines/blob/master/wip/stacked-borrows.md for further information help: was created by a Unique retag at offsets [0x0..0x4] - --> $DIR/illegal_read3.rs:LL:CC + --> tests/fail/stacked_borrows/illegal_read3.rs:LL:CC | LL | let xref2 = &mut *xref1; | ^^^^^^^^^^^ help: was later invalidated at offsets [0x0..0x4] by a read access - --> $DIR/illegal_read3.rs:LL:CC + --> tests/fail/stacked_borrows/illegal_read3.rs:LL:CC | LL | let _val = unsafe { *xref1.r }; | ^^^^^^^^ = note: BACKTRACE (of the first span): - = note: inside `main` at $DIR/illegal_read3.rs:LL:CC + = note: inside `main` at tests/fail/stacked_borrows/illegal_read3.rs:LL:CC note: some details are omitted, run with `MIRIFLAGS=-Zmiri-backtrace=full` for a verbose backtrace diff --git a/tests/fail/stacked_borrows/illegal_read4.stderr b/tests/fail/stacked_borrows/illegal_read4.stderr index 98bfd56cd3..0d460df392 100644 --- a/tests/fail/stacked_borrows/illegal_read4.stderr +++ b/tests/fail/stacked_borrows/illegal_read4.stderr @@ -1,5 +1,5 @@ error: Undefined Behavior: attempting a read access using at ALLOC[0x0], but that tag does not exist in the borrow stack for this location - --> $DIR/illegal_read4.rs:LL:CC + --> tests/fail/stacked_borrows/illegal_read4.rs:LL:CC | LL | let _illegal = *xref2; | ^^^^^^ @@ -10,17 +10,17 @@ LL | let _illegal = *xref2; = help: this indicates a potential bug in the program: it performed an invalid operation, but the Stacked Borrows rules it violated are still experimental = help: see https://github.com/rust-lang/unsafe-code-guidelines/blob/master/wip/stacked-borrows.md for further information help: was created by a Unique retag at offsets [0x0..0x4] - --> $DIR/illegal_read4.rs:LL:CC + --> tests/fail/stacked_borrows/illegal_read4.rs:LL:CC | LL | let xref2 = unsafe { &mut *xraw }; | ^^^^^^^^^^ help: was later invalidated at offsets [0x0..0x4] by a read access - --> $DIR/illegal_read4.rs:LL:CC + --> tests/fail/stacked_borrows/illegal_read4.rs:LL:CC | LL | let _val = unsafe { *xraw }; // use the raw again, this invalidates xref2 *even* with the special read except for uniq refs | ^^^^^ = note: BACKTRACE (of the first span): - = note: inside `main` at $DIR/illegal_read4.rs:LL:CC + = note: inside `main` at tests/fail/stacked_borrows/illegal_read4.rs:LL:CC note: some details are omitted, run with `MIRIFLAGS=-Zmiri-backtrace=full` for a verbose backtrace diff --git a/tests/fail/stacked_borrows/illegal_read5.stderr b/tests/fail/stacked_borrows/illegal_read5.stderr index e3b18e7d4f..9862d8a1a3 100644 --- a/tests/fail/stacked_borrows/illegal_read5.stderr +++ b/tests/fail/stacked_borrows/illegal_read5.stderr @@ -1,5 +1,5 @@ error: Undefined Behavior: attempting a read access using at ALLOC[$HEX], but that tag does not exist in the borrow stack for this location - --> $DIR/illegal_read5.rs:LL:CC + --> tests/fail/stacked_borrows/illegal_read5.rs:LL:CC | LL | let _val = *xref; // the mutable one is dead and gone | ^^^^^ @@ -10,17 +10,17 @@ LL | let _val = *xref; // the mutable one is dead and gone = help: this indicates a potential bug in the program: it performed an invalid operation, but the Stacked Borrows rules it violated are still experimental = help: see https://github.com/rust-lang/unsafe-code-guidelines/blob/master/wip/stacked-borrows.md for further information help: was created by a Unique retag at offsets [$HEX..$HEX] - --> $DIR/illegal_read5.rs:LL:CC + --> tests/fail/stacked_borrows/illegal_read5.rs:LL:CC | LL | let xref: &mut i32 = &mut *refmut; | ^^^^^^^^^^^^ help: was later invalidated at offsets [$HEX..$HEX] by a read access - --> $DIR/illegal_read5.rs:LL:CC + --> tests/fail/stacked_borrows/illegal_read5.rs:LL:CC | LL | mem::forget(unsafe { ptr::read(xshr) }); // but after reading through the shared ref | ^^^^^^^^^^^^^^^ = note: BACKTRACE (of the first span): - = note: inside `main` at $DIR/illegal_read5.rs:LL:CC + = note: inside `main` at tests/fail/stacked_borrows/illegal_read5.rs:LL:CC note: some details are omitted, run with `MIRIFLAGS=-Zmiri-backtrace=full` for a verbose backtrace diff --git a/tests/fail/stacked_borrows/illegal_read6.stderr b/tests/fail/stacked_borrows/illegal_read6.stderr index 415a85bd68..31c5ad160a 100644 --- a/tests/fail/stacked_borrows/illegal_read6.stderr +++ b/tests/fail/stacked_borrows/illegal_read6.stderr @@ -1,5 +1,5 @@ error: Undefined Behavior: attempting a read access using at ALLOC[0x0], but that tag does not exist in the borrow stack for this location - --> $DIR/illegal_read6.rs:LL:CC + --> tests/fail/stacked_borrows/illegal_read6.rs:LL:CC | LL | let _val = *raw; | ^^^^ @@ -10,17 +10,17 @@ LL | let _val = *raw; = help: this indicates a potential bug in the program: it performed an invalid operation, but the Stacked Borrows rules it violated are still experimental = help: see https://github.com/rust-lang/unsafe-code-guidelines/blob/master/wip/stacked-borrows.md for further information help: was created by a SharedReadWrite retag at offsets [0x0..0x4] - --> $DIR/illegal_read6.rs:LL:CC + --> tests/fail/stacked_borrows/illegal_read6.rs:LL:CC | LL | let raw = x as *mut _; | ^ help: was later invalidated at offsets [0x0..0x4] by a Unique retag - --> $DIR/illegal_read6.rs:LL:CC + --> tests/fail/stacked_borrows/illegal_read6.rs:LL:CC | LL | let x = &mut *x; // kill `raw` | ^^^^^^^ = note: BACKTRACE (of the first span): - = note: inside `main` at $DIR/illegal_read6.rs:LL:CC + = note: inside `main` at tests/fail/stacked_borrows/illegal_read6.rs:LL:CC note: some details are omitted, run with `MIRIFLAGS=-Zmiri-backtrace=full` for a verbose backtrace diff --git a/tests/fail/stacked_borrows/illegal_read7.stderr b/tests/fail/stacked_borrows/illegal_read7.stderr index 248ae62d5e..4ae41dd8ee 100644 --- a/tests/fail/stacked_borrows/illegal_read7.stderr +++ b/tests/fail/stacked_borrows/illegal_read7.stderr @@ -1,5 +1,5 @@ error: Undefined Behavior: trying to retag from for SharedReadWrite permission at ALLOC[0x0], but that tag does not exist in the borrow stack for this location - --> $DIR/illegal_read7.rs:LL:CC + --> tests/fail/stacked_borrows/illegal_read7.rs:LL:CC | LL | let _val = *x.get_mut(); | ^ @@ -10,17 +10,17 @@ LL | let _val = *x.get_mut(); = help: this indicates a potential bug in the program: it performed an invalid operation, but the Stacked Borrows rules it violated are still experimental = help: see https://github.com/rust-lang/unsafe-code-guidelines/blob/master/wip/stacked-borrows.md for further information help: was created by a Unique retag at offsets [0x0..0x4] - --> $DIR/illegal_read7.rs:LL:CC + --> tests/fail/stacked_borrows/illegal_read7.rs:LL:CC | LL | let x = &mut *raw; | ^^^^^^^^^ help: was later invalidated at offsets [0x0..0x4] by a read access - --> $DIR/illegal_read7.rs:LL:CC + --> tests/fail/stacked_borrows/illegal_read7.rs:LL:CC | LL | let _val = ptr::read(raw); | ^^^^^^^^^^^^^^ = note: BACKTRACE (of the first span): - = note: inside `main` at $DIR/illegal_read7.rs:LL:CC + = note: inside `main` at tests/fail/stacked_borrows/illegal_read7.rs:LL:CC note: some details are omitted, run with `MIRIFLAGS=-Zmiri-backtrace=full` for a verbose backtrace diff --git a/tests/fail/stacked_borrows/illegal_read8.stderr b/tests/fail/stacked_borrows/illegal_read8.stderr index fd5ed383f1..fc07c3174b 100644 --- a/tests/fail/stacked_borrows/illegal_read8.stderr +++ b/tests/fail/stacked_borrows/illegal_read8.stderr @@ -1,5 +1,5 @@ error: Undefined Behavior: attempting a read access using at ALLOC[0x0], but that tag does not exist in the borrow stack for this location - --> $DIR/illegal_read8.rs:LL:CC + --> tests/fail/stacked_borrows/illegal_read8.rs:LL:CC | LL | let _fail = *y1; | ^^^ @@ -10,17 +10,17 @@ LL | let _fail = *y1; = help: this indicates a potential bug in the program: it performed an invalid operation, but the Stacked Borrows rules it violated are still experimental = help: see https://github.com/rust-lang/unsafe-code-guidelines/blob/master/wip/stacked-borrows.md for further information help: was created by a SharedReadOnly retag at offsets [0x0..0x4] - --> $DIR/illegal_read8.rs:LL:CC + --> tests/fail/stacked_borrows/illegal_read8.rs:LL:CC | LL | let y1: &i32 = mem::transmute(&*x); // launder lifetimes | ^^^^^^^^^^^^^^^^^^^ help: was later invalidated at offsets [0x0..0x4] by a write access - --> $DIR/illegal_read8.rs:LL:CC + --> tests/fail/stacked_borrows/illegal_read8.rs:LL:CC | LL | *y2 += 1; | ^^^^^^^^ = note: BACKTRACE (of the first span): - = note: inside `main` at $DIR/illegal_read8.rs:LL:CC + = note: inside `main` at tests/fail/stacked_borrows/illegal_read8.rs:LL:CC note: some details are omitted, run with `MIRIFLAGS=-Zmiri-backtrace=full` for a verbose backtrace diff --git a/tests/fail/stacked_borrows/illegal_read_despite_exposed1.stderr b/tests/fail/stacked_borrows/illegal_read_despite_exposed1.stderr index 33fcd11ff7..18a47bb346 100644 --- a/tests/fail/stacked_borrows/illegal_read_despite_exposed1.stderr +++ b/tests/fail/stacked_borrows/illegal_read_despite_exposed1.stderr @@ -1,5 +1,5 @@ error: Undefined Behavior: attempting a read access using at ALLOC[0x0], but that tag does not exist in the borrow stack for this location - --> $DIR/illegal_read_despite_exposed1.rs:LL:CC + --> tests/fail/stacked_borrows/illegal_read_despite_exposed1.rs:LL:CC | LL | let _val = *root2; | ^^^^^^ @@ -10,17 +10,17 @@ LL | let _val = *root2; = help: this indicates a potential bug in the program: it performed an invalid operation, but the Stacked Borrows rules it violated are still experimental = help: see https://github.com/rust-lang/unsafe-code-guidelines/blob/master/wip/stacked-borrows.md for further information help: was created by a Unique retag at offsets [0x0..0x4] - --> $DIR/illegal_read_despite_exposed1.rs:LL:CC + --> tests/fail/stacked_borrows/illegal_read_despite_exposed1.rs:LL:CC | LL | let root2 = &mut *exposed_ptr; | ^^^^^^^^^^^^^^^^^ help: was later invalidated at offsets [0x0..0x4] by a write access - --> $DIR/illegal_read_despite_exposed1.rs:LL:CC + --> tests/fail/stacked_borrows/illegal_read_despite_exposed1.rs:LL:CC | LL | *exposed_ptr = 0; | ^^^^^^^^^^^^^^^^ = note: BACKTRACE (of the first span): - = note: inside `main` at $DIR/illegal_read_despite_exposed1.rs:LL:CC + = note: inside `main` at tests/fail/stacked_borrows/illegal_read_despite_exposed1.rs:LL:CC note: some details are omitted, run with `MIRIFLAGS=-Zmiri-backtrace=full` for a verbose backtrace diff --git a/tests/fail/stacked_borrows/illegal_read_despite_exposed2.stderr b/tests/fail/stacked_borrows/illegal_read_despite_exposed2.stderr index a948c5df16..245bce1993 100644 --- a/tests/fail/stacked_borrows/illegal_read_despite_exposed2.stderr +++ b/tests/fail/stacked_borrows/illegal_read_despite_exposed2.stderr @@ -1,5 +1,5 @@ error: Undefined Behavior: attempting a read access using at ALLOC[0x0], but that tag does not exist in the borrow stack for this location - --> $DIR/illegal_read_despite_exposed2.rs:LL:CC + --> tests/fail/stacked_borrows/illegal_read_despite_exposed2.rs:LL:CC | LL | let _val = *root2; | ^^^^^^ @@ -10,17 +10,17 @@ LL | let _val = *root2; = help: this indicates a potential bug in the program: it performed an invalid operation, but the Stacked Borrows rules it violated are still experimental = help: see https://github.com/rust-lang/unsafe-code-guidelines/blob/master/wip/stacked-borrows.md for further information help: was created by a Unique retag at offsets [0x0..0x4] - --> $DIR/illegal_read_despite_exposed2.rs:LL:CC + --> tests/fail/stacked_borrows/illegal_read_despite_exposed2.rs:LL:CC | LL | let root2 = &mut *exposed_ptr; | ^^^^^^^^^^^^^^^^^ help: was later invalidated at offsets [0x0..0x4] by a read access - --> $DIR/illegal_read_despite_exposed2.rs:LL:CC + --> tests/fail/stacked_borrows/illegal_read_despite_exposed2.rs:LL:CC | LL | let _val = *exposed_ptr; | ^^^^^^^^^^^^ = note: BACKTRACE (of the first span): - = note: inside `main` at $DIR/illegal_read_despite_exposed2.rs:LL:CC + = note: inside `main` at tests/fail/stacked_borrows/illegal_read_despite_exposed2.rs:LL:CC note: some details are omitted, run with `MIRIFLAGS=-Zmiri-backtrace=full` for a verbose backtrace diff --git a/tests/fail/stacked_borrows/illegal_write2.stderr b/tests/fail/stacked_borrows/illegal_write2.stderr index 65b4fc5f3f..595d0ca758 100644 --- a/tests/fail/stacked_borrows/illegal_write2.stderr +++ b/tests/fail/stacked_borrows/illegal_write2.stderr @@ -1,5 +1,5 @@ error: Undefined Behavior: attempting a write access using at ALLOC[0x0], but that tag does not exist in the borrow stack for this location - --> $DIR/illegal_write2.rs:LL:CC + --> tests/fail/stacked_borrows/illegal_write2.rs:LL:CC | LL | unsafe { *target2 = 13 }; | ^^^^^^^^^^^^^ @@ -10,17 +10,17 @@ LL | unsafe { *target2 = 13 }; = help: this indicates a potential bug in the program: it performed an invalid operation, but the Stacked Borrows rules it violated are still experimental = help: see https://github.com/rust-lang/unsafe-code-guidelines/blob/master/wip/stacked-borrows.md for further information help: was created by a SharedReadWrite retag at offsets [0x0..0x4] - --> $DIR/illegal_write2.rs:LL:CC + --> tests/fail/stacked_borrows/illegal_write2.rs:LL:CC | LL | let target2 = target as *mut _; | ^^^^^^ help: was later invalidated at offsets [0x0..0x4] by a Unique retag - --> $DIR/illegal_write2.rs:LL:CC + --> tests/fail/stacked_borrows/illegal_write2.rs:LL:CC | LL | drop(&mut *target); // reborrow | ^^^^^^^^^^^^ = note: BACKTRACE (of the first span): - = note: inside `main` at $DIR/illegal_write2.rs:LL:CC + = note: inside `main` at tests/fail/stacked_borrows/illegal_write2.rs:LL:CC note: some details are omitted, run with `MIRIFLAGS=-Zmiri-backtrace=full` for a verbose backtrace diff --git a/tests/fail/stacked_borrows/illegal_write3.stderr b/tests/fail/stacked_borrows/illegal_write3.stderr index 08d9f33a16..6805b35936 100644 --- a/tests/fail/stacked_borrows/illegal_write3.stderr +++ b/tests/fail/stacked_borrows/illegal_write3.stderr @@ -1,5 +1,5 @@ error: Undefined Behavior: attempting a write access using at ALLOC[0x0], but that tag only grants SharedReadOnly permission for this location - --> $DIR/illegal_write3.rs:LL:CC + --> tests/fail/stacked_borrows/illegal_write3.rs:LL:CC | LL | unsafe { *ptr = 42 }; | ^^^^^^^^^ @@ -10,12 +10,12 @@ LL | unsafe { *ptr = 42 }; = help: this indicates a potential bug in the program: it performed an invalid operation, but the Stacked Borrows rules it violated are still experimental = help: see https://github.com/rust-lang/unsafe-code-guidelines/blob/master/wip/stacked-borrows.md for further information help: was created by a SharedReadOnly retag at offsets [0x0..0x4] - --> $DIR/illegal_write3.rs:LL:CC + --> tests/fail/stacked_borrows/illegal_write3.rs:LL:CC | LL | let ptr = r#ref as *const _ as *mut _; // raw ptr, with raw tag | ^^^^^ = note: BACKTRACE (of the first span): - = note: inside `main` at $DIR/illegal_write3.rs:LL:CC + = note: inside `main` at tests/fail/stacked_borrows/illegal_write3.rs:LL:CC note: some details are omitted, run with `MIRIFLAGS=-Zmiri-backtrace=full` for a verbose backtrace diff --git a/tests/fail/stacked_borrows/illegal_write4.stderr b/tests/fail/stacked_borrows/illegal_write4.stderr index 4ee5ec3853..0134987caf 100644 --- a/tests/fail/stacked_borrows/illegal_write4.stderr +++ b/tests/fail/stacked_borrows/illegal_write4.stderr @@ -1,5 +1,5 @@ error: Undefined Behavior: attempting a read access using at ALLOC[0x0], but that tag does not exist in the borrow stack for this location - --> $DIR/illegal_write4.rs:LL:CC + --> tests/fail/stacked_borrows/illegal_write4.rs:LL:CC | LL | let _val = *reference; | ^^^^^^^^^^ @@ -10,17 +10,17 @@ LL | let _val = *reference; = help: this indicates a potential bug in the program: it performed an invalid operation, but the Stacked Borrows rules it violated are still experimental = help: see https://github.com/rust-lang/unsafe-code-guidelines/blob/master/wip/stacked-borrows.md for further information help: was created by a SharedReadOnly retag at offsets [0x0..0x4] - --> $DIR/illegal_write4.rs:LL:CC + --> tests/fail/stacked_borrows/illegal_write4.rs:LL:CC | LL | let reference = unsafe { &*raw }; // freeze | ^^^^^ help: was later invalidated at offsets [0x0..0x4] by a Unique retag - --> $DIR/illegal_write4.rs:LL:CC + --> tests/fail/stacked_borrows/illegal_write4.rs:LL:CC | LL | let _mut_ref: &mut i32 = unsafe { mem::transmute(raw) }; // &mut, with raw tag | ^^^^^^^^^^^^^^^^^^^ = note: BACKTRACE (of the first span): - = note: inside `main` at $DIR/illegal_write4.rs:LL:CC + = note: inside `main` at tests/fail/stacked_borrows/illegal_write4.rs:LL:CC note: some details are omitted, run with `MIRIFLAGS=-Zmiri-backtrace=full` for a verbose backtrace diff --git a/tests/fail/stacked_borrows/illegal_write_despite_exposed1.stderr b/tests/fail/stacked_borrows/illegal_write_despite_exposed1.stderr index 70e9038bab..42e088dc07 100644 --- a/tests/fail/stacked_borrows/illegal_write_despite_exposed1.stderr +++ b/tests/fail/stacked_borrows/illegal_write_despite_exposed1.stderr @@ -1,5 +1,5 @@ error: Undefined Behavior: attempting a read access using at ALLOC[0x0], but that tag does not exist in the borrow stack for this location - --> $DIR/illegal_write_despite_exposed1.rs:LL:CC + --> tests/fail/stacked_borrows/illegal_write_despite_exposed1.rs:LL:CC | LL | let _val = *root2; | ^^^^^^ @@ -10,17 +10,17 @@ LL | let _val = *root2; = help: this indicates a potential bug in the program: it performed an invalid operation, but the Stacked Borrows rules it violated are still experimental = help: see https://github.com/rust-lang/unsafe-code-guidelines/blob/master/wip/stacked-borrows.md for further information help: was created by a SharedReadOnly retag at offsets [0x0..0x4] - --> $DIR/illegal_write_despite_exposed1.rs:LL:CC + --> tests/fail/stacked_borrows/illegal_write_despite_exposed1.rs:LL:CC | LL | let root2 = &*exposed_ptr; | ^^^^^^^^^^^^^ help: was later invalidated at offsets [0x0..0x4] by a write access - --> $DIR/illegal_write_despite_exposed1.rs:LL:CC + --> tests/fail/stacked_borrows/illegal_write_despite_exposed1.rs:LL:CC | LL | *exposed_ptr = 0; | ^^^^^^^^^^^^^^^^ = note: BACKTRACE (of the first span): - = note: inside `main` at $DIR/illegal_write_despite_exposed1.rs:LL:CC + = note: inside `main` at tests/fail/stacked_borrows/illegal_write_despite_exposed1.rs:LL:CC note: some details are omitted, run with `MIRIFLAGS=-Zmiri-backtrace=full` for a verbose backtrace diff --git a/tests/fail/stacked_borrows/interior_mut1.stderr b/tests/fail/stacked_borrows/interior_mut1.stderr index f8bc1667dd..3d43bf7e6b 100644 --- a/tests/fail/stacked_borrows/interior_mut1.stderr +++ b/tests/fail/stacked_borrows/interior_mut1.stderr @@ -1,5 +1,5 @@ error: Undefined Behavior: trying to retag from for SharedReadWrite permission at ALLOC[0x0], but that tag does not exist in the borrow stack for this location - --> $DIR/interior_mut1.rs:LL:CC + --> tests/fail/stacked_borrows/interior_mut1.rs:LL:CC | LL | let _val = *inner_shr.get(); | ^^^^^^^^^ @@ -10,17 +10,17 @@ LL | let _val = *inner_shr.get(); = help: this indicates a potential bug in the program: it performed an invalid operation, but the Stacked Borrows rules it violated are still experimental = help: see https://github.com/rust-lang/unsafe-code-guidelines/blob/master/wip/stacked-borrows.md for further information help: was created by a SharedReadWrite retag at offsets [0x0..0x4] - --> $DIR/interior_mut1.rs:LL:CC + --> tests/fail/stacked_borrows/interior_mut1.rs:LL:CC | LL | let inner_shr = &*inner_uniq; // adds a SharedReadWrite | ^^^^^^^^^^^^ help: was later invalidated at offsets [0x0..0x4] by a write access - --> $DIR/interior_mut1.rs:LL:CC + --> tests/fail/stacked_borrows/interior_mut1.rs:LL:CC | LL | *c.get() = UnsafeCell::new(1); // invalidates inner_shr | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ = note: BACKTRACE (of the first span): - = note: inside `main` at $DIR/interior_mut1.rs:LL:CC + = note: inside `main` at tests/fail/stacked_borrows/interior_mut1.rs:LL:CC note: some details are omitted, run with `MIRIFLAGS=-Zmiri-backtrace=full` for a verbose backtrace diff --git a/tests/fail/stacked_borrows/interior_mut2.stderr b/tests/fail/stacked_borrows/interior_mut2.stderr index a69fc6ff8b..a7a1521bd6 100644 --- a/tests/fail/stacked_borrows/interior_mut2.stderr +++ b/tests/fail/stacked_borrows/interior_mut2.stderr @@ -1,5 +1,5 @@ error: Undefined Behavior: trying to retag from for SharedReadWrite permission at ALLOC[0x0], but that tag does not exist in the borrow stack for this location - --> $DIR/interior_mut2.rs:LL:CC + --> tests/fail/stacked_borrows/interior_mut2.rs:LL:CC | LL | let _val = *inner_shr.get(); | ^^^^^^^^^ @@ -10,17 +10,17 @@ LL | let _val = *inner_shr.get(); = help: this indicates a potential bug in the program: it performed an invalid operation, but the Stacked Borrows rules it violated are still experimental = help: see https://github.com/rust-lang/unsafe-code-guidelines/blob/master/wip/stacked-borrows.md for further information help: was created by a SharedReadWrite retag at offsets [0x0..0x4] - --> $DIR/interior_mut2.rs:LL:CC + --> tests/fail/stacked_borrows/interior_mut2.rs:LL:CC | LL | let inner_shr = &*inner_uniq; | ^^^^^^^^^^^^ help: was later invalidated at offsets [0x0..0x4] by a write access - --> $DIR/interior_mut2.rs:LL:CC + --> tests/fail/stacked_borrows/interior_mut2.rs:LL:CC | LL | *c.get() = UnsafeCell::new(0); // now inner_shr gets invalidated | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ = note: BACKTRACE (of the first span): - = note: inside `main` at $DIR/interior_mut2.rs:LL:CC + = note: inside `main` at tests/fail/stacked_borrows/interior_mut2.rs:LL:CC note: some details are omitted, run with `MIRIFLAGS=-Zmiri-backtrace=full` for a verbose backtrace diff --git a/tests/fail/stacked_borrows/invalidate_against_protector1.stderr b/tests/fail/stacked_borrows/invalidate_against_protector1.stderr index 96cdce5a77..5956a3f675 100644 --- a/tests/fail/stacked_borrows/invalidate_against_protector1.stderr +++ b/tests/fail/stacked_borrows/invalidate_against_protector1.stderr @@ -1,5 +1,5 @@ error: Undefined Behavior: not granting access to tag because that would remove [Unique for ] which is strongly protected - --> $DIR/invalidate_against_protector1.rs:LL:CC + --> tests/fail/stacked_borrows/invalidate_against_protector1.rs:LL:CC | LL | let _val = unsafe { *x }; | ^^ not granting access to tag because that would remove [Unique for ] which is strongly protected @@ -7,19 +7,19 @@ LL | let _val = unsafe { *x }; = help: this indicates a potential bug in the program: it performed an invalid operation, but the Stacked Borrows rules it violated are still experimental = help: see https://github.com/rust-lang/unsafe-code-guidelines/blob/master/wip/stacked-borrows.md for further information help: was created by a SharedReadWrite retag at offsets [0x0..0x4] - --> $DIR/invalidate_against_protector1.rs:LL:CC + --> tests/fail/stacked_borrows/invalidate_against_protector1.rs:LL:CC | LL | let xraw = &mut x as *mut _; | ^^^^^^ help: is this argument - --> $DIR/invalidate_against_protector1.rs:LL:CC + --> tests/fail/stacked_borrows/invalidate_against_protector1.rs:LL:CC | LL | fn inner(x: *mut i32, _y: &mut i32) { | ^^ = note: BACKTRACE (of the first span): - = note: inside `inner` at $DIR/invalidate_against_protector1.rs:LL:CC + = note: inside `inner` at tests/fail/stacked_borrows/invalidate_against_protector1.rs:LL:CC note: inside `main` - --> $DIR/invalidate_against_protector1.rs:LL:CC + --> tests/fail/stacked_borrows/invalidate_against_protector1.rs:LL:CC | LL | inner(xraw, xref); | ^^^^^^^^^^^^^^^^^ diff --git a/tests/fail/stacked_borrows/load_invalid_mut.stderr b/tests/fail/stacked_borrows/load_invalid_mut.stderr index 9d707c3f85..733162acff 100644 --- a/tests/fail/stacked_borrows/load_invalid_mut.stderr +++ b/tests/fail/stacked_borrows/load_invalid_mut.stderr @@ -1,5 +1,5 @@ error: Undefined Behavior: trying to retag from for Unique permission at ALLOC[0x0], but that tag does not exist in the borrow stack for this location - --> $DIR/load_invalid_mut.rs:LL:CC + --> tests/fail/stacked_borrows/load_invalid_mut.rs:LL:CC | LL | let _val = *xref_in_mem; | ^^^^^^^^^^^^ @@ -10,17 +10,17 @@ LL | let _val = *xref_in_mem; = help: this indicates a potential bug in the program: it performed an invalid operation, but the Stacked Borrows rules it violated are still experimental = help: see https://github.com/rust-lang/unsafe-code-guidelines/blob/master/wip/stacked-borrows.md for further information help: was created by a Unique retag at offsets [0x0..0x4] - --> $DIR/load_invalid_mut.rs:LL:CC + --> tests/fail/stacked_borrows/load_invalid_mut.rs:LL:CC | LL | let xref_in_mem = Box::new(xref); | ^^^^^^^^^^^^^^ help: was later invalidated at offsets [0x0..0x4] by a read access - --> $DIR/load_invalid_mut.rs:LL:CC + --> tests/fail/stacked_borrows/load_invalid_mut.rs:LL:CC | LL | let _val = unsafe { *xraw }; // invalidate xref | ^^^^^ = note: BACKTRACE (of the first span): - = note: inside `main` at $DIR/load_invalid_mut.rs:LL:CC + = note: inside `main` at tests/fail/stacked_borrows/load_invalid_mut.rs:LL:CC note: some details are omitted, run with `MIRIFLAGS=-Zmiri-backtrace=full` for a verbose backtrace diff --git a/tests/fail/stacked_borrows/pass_invalid_mut.stderr b/tests/fail/stacked_borrows/pass_invalid_mut.stderr index 0a017e1826..c910a05de1 100644 --- a/tests/fail/stacked_borrows/pass_invalid_mut.stderr +++ b/tests/fail/stacked_borrows/pass_invalid_mut.stderr @@ -1,5 +1,5 @@ error: Undefined Behavior: trying to retag from for SharedReadWrite permission at ALLOC[0x0], but that tag does not exist in the borrow stack for this location - --> $DIR/pass_invalid_mut.rs:LL:CC + --> tests/fail/stacked_borrows/pass_invalid_mut.rs:LL:CC | LL | foo(xref); | ^^^^ @@ -10,17 +10,17 @@ LL | foo(xref); = help: this indicates a potential bug in the program: it performed an invalid operation, but the Stacked Borrows rules it violated are still experimental = help: see https://github.com/rust-lang/unsafe-code-guidelines/blob/master/wip/stacked-borrows.md for further information help: was created by a Unique retag at offsets [0x0..0x4] - --> $DIR/pass_invalid_mut.rs:LL:CC + --> tests/fail/stacked_borrows/pass_invalid_mut.rs:LL:CC | LL | let xref = unsafe { &mut *xraw }; | ^^^^^^^^^^ help: was later invalidated at offsets [0x0..0x4] by a read access - --> $DIR/pass_invalid_mut.rs:LL:CC + --> tests/fail/stacked_borrows/pass_invalid_mut.rs:LL:CC | LL | let _val = unsafe { *xraw }; // invalidate xref | ^^^^^ = note: BACKTRACE (of the first span): - = note: inside `main` at $DIR/pass_invalid_mut.rs:LL:CC + = note: inside `main` at tests/fail/stacked_borrows/pass_invalid_mut.rs:LL:CC note: some details are omitted, run with `MIRIFLAGS=-Zmiri-backtrace=full` for a verbose backtrace diff --git a/tests/fail/stacked_borrows/pointer_smuggling.stderr b/tests/fail/stacked_borrows/pointer_smuggling.stderr index 1fddcaf3da..58c6cd4c31 100644 --- a/tests/fail/stacked_borrows/pointer_smuggling.stderr +++ b/tests/fail/stacked_borrows/pointer_smuggling.stderr @@ -1,5 +1,5 @@ error: Undefined Behavior: attempting a read access using at ALLOC[0x0], but that tag does not exist in the borrow stack for this location - --> $DIR/pointer_smuggling.rs:LL:CC + --> tests/fail/stacked_borrows/pointer_smuggling.rs:LL:CC | LL | let _x = unsafe { *PTR }; | ^^^^ @@ -10,19 +10,19 @@ LL | let _x = unsafe { *PTR }; = help: this indicates a potential bug in the program: it performed an invalid operation, but the Stacked Borrows rules it violated are still experimental = help: see https://github.com/rust-lang/unsafe-code-guidelines/blob/master/wip/stacked-borrows.md for further information help: was created by a SharedReadWrite retag at offsets [0x0..0x1] - --> $DIR/pointer_smuggling.rs:LL:CC + --> tests/fail/stacked_borrows/pointer_smuggling.rs:LL:CC | LL | PTR = x; | ^ help: was later invalidated at offsets [0x0..0x1] by a write access - --> $DIR/pointer_smuggling.rs:LL:CC + --> tests/fail/stacked_borrows/pointer_smuggling.rs:LL:CC | LL | *val = 2; // this invalidates any raw ptrs `fun1` might have created. | ^^^^^^^^ = note: BACKTRACE (of the first span): - = note: inside `fun2` at $DIR/pointer_smuggling.rs:LL:CC + = note: inside `fun2` at tests/fail/stacked_borrows/pointer_smuggling.rs:LL:CC note: inside `main` - --> $DIR/pointer_smuggling.rs:LL:CC + --> tests/fail/stacked_borrows/pointer_smuggling.rs:LL:CC | LL | fun2(); // if they now use a raw ptr they break our reference | ^^^^^^ diff --git a/tests/fail/stacked_borrows/raw_tracking.stderr b/tests/fail/stacked_borrows/raw_tracking.stderr index 0d07d154ba..aa320ea908 100644 --- a/tests/fail/stacked_borrows/raw_tracking.stderr +++ b/tests/fail/stacked_borrows/raw_tracking.stderr @@ -1,5 +1,5 @@ error: Undefined Behavior: attempting a write access using at ALLOC[0x0], but that tag does not exist in the borrow stack for this location - --> $DIR/raw_tracking.rs:LL:CC + --> tests/fail/stacked_borrows/raw_tracking.rs:LL:CC | LL | unsafe { *raw1 = 13 }; | ^^^^^^^^^^ @@ -10,17 +10,17 @@ LL | unsafe { *raw1 = 13 }; = help: this indicates a potential bug in the program: it performed an invalid operation, but the Stacked Borrows rules it violated are still experimental = help: see https://github.com/rust-lang/unsafe-code-guidelines/blob/master/wip/stacked-borrows.md for further information help: was created by a SharedReadWrite retag at offsets [0x0..0x4] - --> $DIR/raw_tracking.rs:LL:CC + --> tests/fail/stacked_borrows/raw_tracking.rs:LL:CC | LL | let raw1 = &mut l as *mut _; | ^^^^^^ help: was later invalidated at offsets [0x0..0x4] by a Unique retag - --> $DIR/raw_tracking.rs:LL:CC + --> tests/fail/stacked_borrows/raw_tracking.rs:LL:CC | LL | let raw2 = &mut l as *mut _; // invalidates raw1 | ^^^^^^ = note: BACKTRACE (of the first span): - = note: inside `main` at $DIR/raw_tracking.rs:LL:CC + = note: inside `main` at tests/fail/stacked_borrows/raw_tracking.rs:LL:CC note: some details are omitted, run with `MIRIFLAGS=-Zmiri-backtrace=full` for a verbose backtrace diff --git a/tests/fail/stacked_borrows/retag_data_race_protected_read.stderr b/tests/fail/stacked_borrows/retag_data_race_protected_read.stderr index 47ae4b5d46..fd5d83211d 100644 --- a/tests/fail/stacked_borrows/retag_data_race_protected_read.stderr +++ b/tests/fail/stacked_borrows/retag_data_race_protected_read.stderr @@ -1,11 +1,11 @@ error: Undefined Behavior: Data race detected between (1) non-atomic read on thread `main` and (2) retag write of type `i32` on thread `unnamed-ID` at ALLOC. (2) just happened here - --> $DIR/retag_data_race_protected_read.rs:LL:CC + --> tests/fail/stacked_borrows/retag_data_race_protected_read.rs:LL:CC | LL | retag(unsafe { &mut *ptr.0 }); | ^^^^^^^^^^^ Data race detected between (1) non-atomic read on thread `main` and (2) retag write of type `i32` on thread `unnamed-ID` at ALLOC. (2) just happened here | help: and (1) occurred earlier here - --> $DIR/retag_data_race_protected_read.rs:LL:CC + --> tests/fail/stacked_borrows/retag_data_race_protected_read.rs:LL:CC | LL | unsafe { ptr.0.read() }; | ^^^^^^^^^^^^ @@ -15,7 +15,7 @@ LL | unsafe { ptr.0.read() }; = 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 = note: BACKTRACE (of the first span) on thread `unnamed-ID`: - = note: inside closure at $DIR/retag_data_race_protected_read.rs:LL:CC + = note: inside closure at tests/fail/stacked_borrows/retag_data_race_protected_read.rs:LL:CC note: some details are omitted, run with `MIRIFLAGS=-Zmiri-backtrace=full` for a verbose backtrace diff --git a/tests/fail/stacked_borrows/retag_data_race_read.stderr b/tests/fail/stacked_borrows/retag_data_race_read.stderr index 9fe9fbeda4..87155ebc51 100644 --- a/tests/fail/stacked_borrows/retag_data_race_read.stderr +++ b/tests/fail/stacked_borrows/retag_data_race_read.stderr @@ -1,11 +1,11 @@ error: Undefined Behavior: Data race detected between (1) retag read on thread `unnamed-ID` and (2) non-atomic write on thread `unnamed-ID` at ALLOC. (2) just happened here - --> $DIR/retag_data_race_read.rs:LL:CC + --> tests/fail/stacked_borrows/retag_data_race_read.rs:LL:CC | LL | *p = 5; | ^^^^^^ Data race detected between (1) retag read on thread `unnamed-ID` and (2) non-atomic write on thread `unnamed-ID` at ALLOC. (2) just happened here | help: and (1) occurred earlier here - --> $DIR/retag_data_race_read.rs:LL:CC + --> tests/fail/stacked_borrows/retag_data_race_read.rs:LL:CC | LL | let _r = &*p; | ^^^ @@ -15,9 +15,9 @@ LL | let _r = &*p; = 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 = note: BACKTRACE (of the first span) on thread `unnamed-ID`: - = note: inside `thread_2` at $DIR/retag_data_race_read.rs:LL:CC + = note: inside `thread_2` at tests/fail/stacked_borrows/retag_data_race_read.rs:LL:CC note: inside closure - --> $DIR/retag_data_race_read.rs:LL:CC + --> tests/fail/stacked_borrows/retag_data_race_read.rs:LL:CC | LL | let t2 = std::thread::spawn(move || thread_2(p)); | ^^^^^^^^^^^ diff --git a/tests/fail/stacked_borrows/return_invalid_mut.stderr b/tests/fail/stacked_borrows/return_invalid_mut.stderr index 78008e9264..760ed78317 100644 --- a/tests/fail/stacked_borrows/return_invalid_mut.stderr +++ b/tests/fail/stacked_borrows/return_invalid_mut.stderr @@ -1,5 +1,5 @@ error: Undefined Behavior: trying to retag from for Unique permission at ALLOC[0x4], but that tag does not exist in the borrow stack for this location - --> $DIR/return_invalid_mut.rs:LL:CC + --> tests/fail/stacked_borrows/return_invalid_mut.rs:LL:CC | LL | ret | ^^^ @@ -10,19 +10,19 @@ LL | ret = help: this indicates a potential bug in the program: it performed an invalid operation, but the Stacked Borrows rules it violated are still experimental = help: see https://github.com/rust-lang/unsafe-code-guidelines/blob/master/wip/stacked-borrows.md for further information help: was created by a Unique retag at offsets [0x4..0x8] - --> $DIR/return_invalid_mut.rs:LL:CC + --> tests/fail/stacked_borrows/return_invalid_mut.rs:LL:CC | LL | let ret = unsafe { &mut (*xraw).1 }; | ^^^^^^^^^^^^^^ help: was later invalidated at offsets [0x0..0x8] by a read access - --> $DIR/return_invalid_mut.rs:LL:CC + --> tests/fail/stacked_borrows/return_invalid_mut.rs:LL:CC | LL | let _val = unsafe { *xraw }; // invalidate xref | ^^^^^ = note: BACKTRACE (of the first span): - = note: inside `foo` at $DIR/return_invalid_mut.rs:LL:CC + = note: inside `foo` at tests/fail/stacked_borrows/return_invalid_mut.rs:LL:CC note: inside `main` - --> $DIR/return_invalid_mut.rs:LL:CC + --> tests/fail/stacked_borrows/return_invalid_mut.rs:LL:CC | LL | foo(&mut (1, 2)); | ^^^^^^^^^^^^^^^^ diff --git a/tests/fail/stacked_borrows/return_invalid_mut_option.stderr b/tests/fail/stacked_borrows/return_invalid_mut_option.stderr index b9ae34df07..3175e09962 100644 --- a/tests/fail/stacked_borrows/return_invalid_mut_option.stderr +++ b/tests/fail/stacked_borrows/return_invalid_mut_option.stderr @@ -1,5 +1,5 @@ error: Undefined Behavior: trying to retag from for Unique permission at ALLOC[0x4], but that tag does not exist in the borrow stack for this location - --> $DIR/return_invalid_mut_option.rs:LL:CC + --> tests/fail/stacked_borrows/return_invalid_mut_option.rs:LL:CC | LL | ret | ^^^ @@ -11,19 +11,19 @@ LL | ret = help: this indicates a potential bug in the program: it performed an invalid operation, but the Stacked Borrows rules it violated are still experimental = help: see https://github.com/rust-lang/unsafe-code-guidelines/blob/master/wip/stacked-borrows.md for further information help: was created by a Unique retag at offsets [0x4..0x8] - --> $DIR/return_invalid_mut_option.rs:LL:CC + --> tests/fail/stacked_borrows/return_invalid_mut_option.rs:LL:CC | LL | let ret = Some(ret); | ^^^^^^^^^ help: was later invalidated at offsets [0x0..0x8] by a read access - --> $DIR/return_invalid_mut_option.rs:LL:CC + --> tests/fail/stacked_borrows/return_invalid_mut_option.rs:LL:CC | LL | let _val = unsafe { *xraw }; // invalidate xref | ^^^^^ = note: BACKTRACE (of the first span): - = note: inside `foo` at $DIR/return_invalid_mut_option.rs:LL:CC + = note: inside `foo` at tests/fail/stacked_borrows/return_invalid_mut_option.rs:LL:CC note: inside `main` - --> $DIR/return_invalid_mut_option.rs:LL:CC + --> tests/fail/stacked_borrows/return_invalid_mut_option.rs:LL:CC | LL | match foo(&mut (1, 2)) { | ^^^^^^^^^^^^^^^^ diff --git a/tests/fail/stacked_borrows/return_invalid_mut_tuple.stderr b/tests/fail/stacked_borrows/return_invalid_mut_tuple.stderr index 7522115c51..2cc3ba2c9a 100644 --- a/tests/fail/stacked_borrows/return_invalid_mut_tuple.stderr +++ b/tests/fail/stacked_borrows/return_invalid_mut_tuple.stderr @@ -1,5 +1,5 @@ error: Undefined Behavior: trying to retag from for Unique permission at ALLOC[0x4], but that tag does not exist in the borrow stack for this location - --> $DIR/return_invalid_mut_tuple.rs:LL:CC + --> tests/fail/stacked_borrows/return_invalid_mut_tuple.rs:LL:CC | LL | ret | ^^^ @@ -11,19 +11,19 @@ LL | ret = help: this indicates a potential bug in the program: it performed an invalid operation, but the Stacked Borrows rules it violated are still experimental = help: see https://github.com/rust-lang/unsafe-code-guidelines/blob/master/wip/stacked-borrows.md for further information help: was created by a Unique retag at offsets [0x4..0x8] - --> $DIR/return_invalid_mut_tuple.rs:LL:CC + --> tests/fail/stacked_borrows/return_invalid_mut_tuple.rs:LL:CC | LL | let ret = (unsafe { &mut (*xraw).1 },); | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: was later invalidated at offsets [0x0..0x8] by a read access - --> $DIR/return_invalid_mut_tuple.rs:LL:CC + --> tests/fail/stacked_borrows/return_invalid_mut_tuple.rs:LL:CC | LL | let _val = unsafe { *xraw }; // invalidate xref | ^^^^^ = note: BACKTRACE (of the first span): - = note: inside `foo` at $DIR/return_invalid_mut_tuple.rs:LL:CC + = note: inside `foo` at tests/fail/stacked_borrows/return_invalid_mut_tuple.rs:LL:CC note: inside `main` - --> $DIR/return_invalid_mut_tuple.rs:LL:CC + --> tests/fail/stacked_borrows/return_invalid_mut_tuple.rs:LL:CC | LL | foo(&mut (1, 2)).0; | ^^^^^^^^^^^^^^^^ diff --git a/tests/fail/stacked_borrows/shared_rw_borrows_are_weak1.stderr b/tests/fail/stacked_borrows/shared_rw_borrows_are_weak1.stderr index b5106c9d94..56d9783367 100644 --- a/tests/fail/stacked_borrows/shared_rw_borrows_are_weak1.stderr +++ b/tests/fail/stacked_borrows/shared_rw_borrows_are_weak1.stderr @@ -1,5 +1,5 @@ error: Undefined Behavior: trying to retag from for SharedReadWrite permission at ALLOC[0x0], but that tag does not exist in the borrow stack for this location - --> $DIR/shared_rw_borrows_are_weak1.rs:LL:CC + --> tests/fail/stacked_borrows/shared_rw_borrows_are_weak1.rs:LL:CC | LL | y.get_mut(); | ^ @@ -10,17 +10,17 @@ LL | y.get_mut(); = help: this indicates a potential bug in the program: it performed an invalid operation, but the Stacked Borrows rules it violated are still experimental = help: see https://github.com/rust-lang/unsafe-code-guidelines/blob/master/wip/stacked-borrows.md for further information help: was created by a Unique retag at offsets [0x0..0x4] - --> $DIR/shared_rw_borrows_are_weak1.rs:LL:CC + --> tests/fail/stacked_borrows/shared_rw_borrows_are_weak1.rs:LL:CC | LL | let y: &mut Cell = mem::transmute(&mut *x); // launder lifetime | ^^^^^^^^^^^^^^^^^^^^^^^ help: was later invalidated at offsets [0x0..0x4] by a Unique retag - --> $DIR/shared_rw_borrows_are_weak1.rs:LL:CC + --> tests/fail/stacked_borrows/shared_rw_borrows_are_weak1.rs:LL:CC | LL | shr_rw.set(1); | ^^^^^^^^^^^^^ = note: BACKTRACE (of the first span): - = note: inside `main` at $DIR/shared_rw_borrows_are_weak1.rs:LL:CC + = note: inside `main` at tests/fail/stacked_borrows/shared_rw_borrows_are_weak1.rs:LL:CC note: some details are omitted, run with `MIRIFLAGS=-Zmiri-backtrace=full` for a verbose backtrace diff --git a/tests/fail/stacked_borrows/shared_rw_borrows_are_weak2.stderr b/tests/fail/stacked_borrows/shared_rw_borrows_are_weak2.stderr index ccea83db85..8ca56afc12 100644 --- a/tests/fail/stacked_borrows/shared_rw_borrows_are_weak2.stderr +++ b/tests/fail/stacked_borrows/shared_rw_borrows_are_weak2.stderr @@ -1,5 +1,5 @@ error: Undefined Behavior: attempting a read access using at ALLOC[$HEX], but that tag does not exist in the borrow stack for this location - --> $DIR/shared_rw_borrows_are_weak2.rs:LL:CC + --> tests/fail/stacked_borrows/shared_rw_borrows_are_weak2.rs:LL:CC | LL | let _val = *y; | ^^ @@ -10,17 +10,17 @@ LL | let _val = *y; = help: this indicates a potential bug in the program: it performed an invalid operation, but the Stacked Borrows rules it violated are still experimental = help: see https://github.com/rust-lang/unsafe-code-guidelines/blob/master/wip/stacked-borrows.md for further information help: was created by a SharedReadOnly retag at offsets [$HEX..$HEX] - --> $DIR/shared_rw_borrows_are_weak2.rs:LL:CC + --> tests/fail/stacked_borrows/shared_rw_borrows_are_weak2.rs:LL:CC | LL | let y: &i32 = mem::transmute(&*x.borrow()); // launder lifetime | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: was later invalidated at offsets [$HEX..$HEX] by a Unique retag - --> $DIR/shared_rw_borrows_are_weak2.rs:LL:CC + --> tests/fail/stacked_borrows/shared_rw_borrows_are_weak2.rs:LL:CC | LL | shr_rw.replace(1); | ^^^^^^^^^^^^^^^^^ = note: BACKTRACE (of the first span): - = note: inside `main` at $DIR/shared_rw_borrows_are_weak2.rs:LL:CC + = note: inside `main` at tests/fail/stacked_borrows/shared_rw_borrows_are_weak2.rs:LL:CC note: some details are omitted, run with `MIRIFLAGS=-Zmiri-backtrace=full` for a verbose backtrace diff --git a/tests/fail/stacked_borrows/static_memory_modification.stderr b/tests/fail/stacked_borrows/static_memory_modification.stderr index f605fa9d3b..b86a64623b 100644 --- a/tests/fail/stacked_borrows/static_memory_modification.stderr +++ b/tests/fail/stacked_borrows/static_memory_modification.stderr @@ -1,5 +1,5 @@ error: Undefined Behavior: writing to ALLOC which is read-only - --> $DIR/static_memory_modification.rs:LL:CC + --> tests/fail/stacked_borrows/static_memory_modification.rs:LL:CC | LL | std::mem::transmute::<&usize, &mut usize>(&X) | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ writing to ALLOC which is read-only @@ -7,7 +7,7 @@ LL | std::mem::transmute::<&usize, &mut usize>(&X) = 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 = note: BACKTRACE: - = note: inside `main` at $DIR/static_memory_modification.rs:LL:CC + = note: inside `main` at tests/fail/stacked_borrows/static_memory_modification.rs:LL:CC note: some details are omitted, run with `MIRIFLAGS=-Zmiri-backtrace=full` for a verbose backtrace diff --git a/tests/fail/stacked_borrows/track_caller.stderr b/tests/fail/stacked_borrows/track_caller.stderr index f341222a66..163ec84281 100644 --- a/tests/fail/stacked_borrows/track_caller.stderr +++ b/tests/fail/stacked_borrows/track_caller.stderr @@ -1,5 +1,5 @@ error: Undefined Behavior: attempting a read access using at ALLOC[0x0], but that tag does not exist in the borrow stack for this location - --> $DIR/track_caller.rs:LL:CC + --> tests/fail/stacked_borrows/track_caller.rs:LL:CC | LL | let _val = *xref; // ...but any use of raw will invalidate our ref. | ^^^^^ @@ -10,17 +10,17 @@ LL | let _val = *xref; // ...but any use of raw will invalidate our ref. = help: this indicates a potential bug in the program: it performed an invalid operation, but the Stacked Borrows rules it violated are still experimental = help: see https://github.com/rust-lang/unsafe-code-guidelines/blob/master/wip/stacked-borrows.md for further information help: was created by a Unique retag at offsets [0x0..0x4] - --> $DIR/track_caller.rs:LL:CC + --> tests/fail/stacked_borrows/track_caller.rs:LL:CC | LL | let xref = unsafe { &mut *xraw }; // derived from raw, so using raw is still ok... | ^^^^^^^^^^ help: was later invalidated at offsets [0x0..0x4] by a read access - --> $DIR/track_caller.rs:LL:CC + --> tests/fail/stacked_borrows/track_caller.rs:LL:CC | LL | callee(xraw); | ^^^^^^^^^^^^ = note: BACKTRACE (of the first span): - = note: inside `main` at $DIR/track_caller.rs:LL:CC + = note: inside `main` at tests/fail/stacked_borrows/track_caller.rs:LL:CC note: some details are omitted, run with `MIRIFLAGS=-Zmiri-backtrace=full` for a verbose backtrace diff --git a/tests/fail/stacked_borrows/transmute-is-no-escape.stderr b/tests/fail/stacked_borrows/transmute-is-no-escape.stderr index 7d8132b85c..becd6681ec 100644 --- a/tests/fail/stacked_borrows/transmute-is-no-escape.stderr +++ b/tests/fail/stacked_borrows/transmute-is-no-escape.stderr @@ -1,5 +1,5 @@ error: Undefined Behavior: attempting a write access using at ALLOC[0x0], but that tag does not exist in the borrow stack for this location - --> $DIR/transmute-is-no-escape.rs:LL:CC + --> tests/fail/stacked_borrows/transmute-is-no-escape.rs:LL:CC | LL | unsafe { *raw = 13 }; | ^^^^^^^^^ @@ -10,12 +10,12 @@ LL | unsafe { *raw = 13 }; = help: this indicates a potential bug in the program: it performed an invalid operation, but the Stacked Borrows rules it violated are still experimental = help: see https://github.com/rust-lang/unsafe-code-guidelines/blob/master/wip/stacked-borrows.md for further information help: was created by a SharedReadWrite retag at offsets [0x4..0x8] - --> $DIR/transmute-is-no-escape.rs:LL:CC + --> tests/fail/stacked_borrows/transmute-is-no-escape.rs:LL:CC | LL | let raw = (&mut x[1] as *mut i32).wrapping_offset(-1); | ^^^^^^^^^ = note: BACKTRACE (of the first span): - = note: inside `main` at $DIR/transmute-is-no-escape.rs:LL:CC + = note: inside `main` at tests/fail/stacked_borrows/transmute-is-no-escape.rs:LL:CC note: some details are omitted, run with `MIRIFLAGS=-Zmiri-backtrace=full` for a verbose backtrace diff --git a/tests/fail/stacked_borrows/unescaped_local.stderr b/tests/fail/stacked_borrows/unescaped_local.stderr index 50c02b3455..08c2cf2099 100644 --- a/tests/fail/stacked_borrows/unescaped_local.stderr +++ b/tests/fail/stacked_borrows/unescaped_local.stderr @@ -1,5 +1,5 @@ error: Undefined Behavior: attempting a write access using at ALLOC[0x0], but no exposed tags have suitable permission in the borrow stack for this location - --> $DIR/unescaped_local.rs:LL:CC + --> tests/fail/stacked_borrows/unescaped_local.rs:LL:CC | LL | *raw = 13; | ^^^^^^^^^ @@ -10,7 +10,7 @@ LL | *raw = 13; = help: this indicates a potential bug in the program: it performed an invalid operation, but the Stacked Borrows rules it violated are still experimental = help: see https://github.com/rust-lang/unsafe-code-guidelines/blob/master/wip/stacked-borrows.md for further information = note: BACKTRACE: - = note: inside `main` at $DIR/unescaped_local.rs:LL:CC + = note: inside `main` at tests/fail/stacked_borrows/unescaped_local.rs:LL:CC note: some details are omitted, run with `MIRIFLAGS=-Zmiri-backtrace=full` for a verbose backtrace diff --git a/tests/fail/stacked_borrows/unescaped_static.stderr b/tests/fail/stacked_borrows/unescaped_static.stderr index 7578b89708..fb48edc5dd 100644 --- a/tests/fail/stacked_borrows/unescaped_static.stderr +++ b/tests/fail/stacked_borrows/unescaped_static.stderr @@ -1,5 +1,5 @@ error: Undefined Behavior: attempting a read access using at ALLOC[0x1], but that tag does not exist in the borrow stack for this location - --> $DIR/unescaped_static.rs:LL:CC + --> tests/fail/stacked_borrows/unescaped_static.rs:LL:CC | LL | let _val = unsafe { *ptr_to_first.add(1) }; | ^^^^^^^^^^^^^^^^^^^^ @@ -10,12 +10,12 @@ LL | let _val = unsafe { *ptr_to_first.add(1) }; = help: this indicates a potential bug in the program: it performed an invalid operation, but the Stacked Borrows rules it violated are still experimental = help: see https://github.com/rust-lang/unsafe-code-guidelines/blob/master/wip/stacked-borrows.md for further information help: was created by a SharedReadOnly retag at offsets [0x0..0x1] - --> $DIR/unescaped_static.rs:LL:CC + --> tests/fail/stacked_borrows/unescaped_static.rs:LL:CC | LL | let ptr_to_first = &ARRAY[0] as *const u8; | ^^^^^^^^^ = note: BACKTRACE (of the first span): - = note: inside `main` at $DIR/unescaped_static.rs:LL:CC + = note: inside `main` at tests/fail/stacked_borrows/unescaped_static.rs:LL:CC note: some details are omitted, run with `MIRIFLAGS=-Zmiri-backtrace=full` for a verbose backtrace diff --git a/tests/fail/stacked_borrows/zst_slice.stderr b/tests/fail/stacked_borrows/zst_slice.stderr index acae479ced..01e3c60f0f 100644 --- a/tests/fail/stacked_borrows/zst_slice.stderr +++ b/tests/fail/stacked_borrows/zst_slice.stderr @@ -1,5 +1,5 @@ error: Undefined Behavior: trying to retag from for SharedReadOnly permission at ALLOC[0x4], but that tag does not exist in the borrow stack for this location - --> $DIR/zst_slice.rs:LL:CC + --> tests/fail/stacked_borrows/zst_slice.rs:LL:CC | LL | assert_eq!(*s.as_ptr().add(1), 2); | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ @@ -10,7 +10,7 @@ LL | assert_eq!(*s.as_ptr().add(1), 2); = help: this indicates a potential bug in the program: it performed an invalid operation, but the Stacked Borrows rules it violated are still experimental = help: see https://github.com/rust-lang/unsafe-code-guidelines/blob/master/wip/stacked-borrows.md for further information help: would have been created here, but this is a zero-size retag ([0x0..0x0]) so the tag in question does not exist anywhere - --> $DIR/zst_slice.rs:LL:CC + --> tests/fail/stacked_borrows/zst_slice.rs:LL:CC | LL | assert_eq!(*s.as_ptr().add(1), 2); | ^^^^^^^^^^ diff --git a/tests/fail/static_memory_modification1.stderr b/tests/fail/static_memory_modification1.stderr index 877cf1d6e4..2b2cd4af3d 100644 --- a/tests/fail/static_memory_modification1.stderr +++ b/tests/fail/static_memory_modification1.stderr @@ -1,5 +1,5 @@ error: Undefined Behavior: writing to ALLOC which is read-only - --> $DIR/static_memory_modification1.rs:LL:CC + --> tests/fail/static_memory_modification1.rs:LL:CC | LL | *std::mem::transmute::<&usize, &mut usize>(&X) = 6; | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ writing to ALLOC which is read-only @@ -7,7 +7,7 @@ LL | *std::mem::transmute::<&usize, &mut usize>(&X) = 6; = 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 = note: BACKTRACE: - = note: inside `main` at $DIR/static_memory_modification1.rs:LL:CC + = note: inside `main` at tests/fail/static_memory_modification1.rs:LL:CC note: some details are omitted, run with `MIRIFLAGS=-Zmiri-backtrace=full` for a verbose backtrace diff --git a/tests/fail/static_memory_modification2.stderr b/tests/fail/static_memory_modification2.stderr index 77bbace469..99c7f15d9f 100644 --- a/tests/fail/static_memory_modification2.stderr +++ b/tests/fail/static_memory_modification2.stderr @@ -1,5 +1,5 @@ error: Undefined Behavior: writing to ALLOC which is read-only - --> $DIR/static_memory_modification2.rs:LL:CC + --> tests/fail/static_memory_modification2.rs:LL:CC | LL | transmute::<&[u8], &mut [u8]>(s.as_bytes())[4] = 42; | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ writing to ALLOC which is read-only @@ -7,7 +7,7 @@ LL | transmute::<&[u8], &mut [u8]>(s.as_bytes())[4] = 42; = 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 = note: BACKTRACE: - = note: inside `main` at $DIR/static_memory_modification2.rs:LL:CC + = note: inside `main` at tests/fail/static_memory_modification2.rs:LL:CC note: some details are omitted, run with `MIRIFLAGS=-Zmiri-backtrace=full` for a verbose backtrace diff --git a/tests/fail/static_memory_modification3.stderr b/tests/fail/static_memory_modification3.stderr index a04609805c..cb37a2a2da 100644 --- a/tests/fail/static_memory_modification3.stderr +++ b/tests/fail/static_memory_modification3.stderr @@ -1,5 +1,5 @@ error: Undefined Behavior: writing to ALLOC which is read-only - --> $DIR/static_memory_modification3.rs:LL:CC + --> tests/fail/static_memory_modification3.rs:LL:CC | LL | transmute::<&[u8], &mut [u8]>(bs)[4] = 42; | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ writing to ALLOC which is read-only @@ -7,7 +7,7 @@ LL | transmute::<&[u8], &mut [u8]>(bs)[4] = 42; = 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 = note: BACKTRACE: - = note: inside `main` at $DIR/static_memory_modification3.rs:LL:CC + = note: inside `main` at tests/fail/static_memory_modification3.rs:LL:CC note: some details are omitted, run with `MIRIFLAGS=-Zmiri-backtrace=full` for a verbose backtrace diff --git a/tests/fail/storage-live-dead-var.stderr b/tests/fail/storage-live-dead-var.stderr index ccc77b1c97..f370c28483 100644 --- a/tests/fail/storage-live-dead-var.stderr +++ b/tests/fail/storage-live-dead-var.stderr @@ -1,5 +1,5 @@ error: Undefined Behavior: accessing a dead local variable - --> $DIR/storage-live-dead-var.rs:LL:CC + --> tests/fail/storage-live-dead-var.rs:LL:CC | LL | val = 42; | ^^^^^^^^ accessing a dead local variable @@ -7,7 +7,7 @@ LL | val = 42; = 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 = note: BACKTRACE: - = note: inside `main` at $DIR/storage-live-dead-var.rs:LL:CC + = note: inside `main` at tests/fail/storage-live-dead-var.rs:LL:CC note: some details are omitted, run with `MIRIFLAGS=-Zmiri-backtrace=full` for a verbose backtrace diff --git a/tests/fail/storage-live-resets-var.stderr b/tests/fail/storage-live-resets-var.stderr index 07d39cc9d6..099dd3a1f7 100644 --- a/tests/fail/storage-live-resets-var.stderr +++ b/tests/fail/storage-live-resets-var.stderr @@ -1,5 +1,5 @@ error: Undefined Behavior: constructing invalid value: encountered uninitialized memory, but expected an integer - --> $DIR/storage-live-resets-var.rs:LL:CC + --> tests/fail/storage-live-resets-var.rs:LL:CC | LL | _val2 = val; | ^^^^^^^^^^^ constructing invalid value: encountered uninitialized memory, but expected an integer @@ -7,7 +7,7 @@ LL | _val2 = val; = 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 = note: BACKTRACE: - = note: inside `main` at $DIR/storage-live-resets-var.rs:LL:CC + = note: inside `main` at tests/fail/storage-live-resets-var.rs:LL:CC note: some details are omitted, run with `MIRIFLAGS=-Zmiri-backtrace=full` for a verbose backtrace diff --git a/tests/fail/tail_calls/signature-mismatch-arg.stderr b/tests/fail/tail_calls/signature-mismatch-arg.stderr index 8823ab9b97..db8ab7cb46 100644 --- a/tests/fail/tail_calls/signature-mismatch-arg.stderr +++ b/tests/fail/tail_calls/signature-mismatch-arg.stderr @@ -1,5 +1,5 @@ error: Undefined Behavior: calling a function with argument of type i32 passing data of type u32 - --> $DIR/signature-mismatch-arg.rs:LL:CC + --> tests/fail/tail_calls/signature-mismatch-arg.rs:LL:CC | LL | f(0); | ^^^^ calling a function with argument of type i32 passing data of type u32 @@ -9,7 +9,7 @@ LL | f(0); = help: this means these two types are not *guaranteed* to be ABI-compatible across all targets = help: if you think this code should be accepted anyway, please report an issue with Miri = note: BACKTRACE: - = note: inside `main` at $DIR/signature-mismatch-arg.rs:LL:CC + = note: inside `main` at tests/fail/tail_calls/signature-mismatch-arg.rs:LL:CC note: some details are omitted, run with `MIRIFLAGS=-Zmiri-backtrace=full` for a verbose backtrace diff --git a/tests/fail/terminate-terminator.stderr b/tests/fail/terminate-terminator.stderr index 6384689c56..e1c0fabd03 100644 --- a/tests/fail/terminate-terminator.stderr +++ b/tests/fail/terminate-terminator.stderr @@ -1,6 +1,6 @@ warning: You have explicitly enabled MIR optimizations, overriding Miri's default which is to completely disable them. Any optimizations may hide UB that Miri would otherwise detect, and it is not necessarily possible to predict what kind of UB will be missed. If you are enabling optimizations to make Miri run faster, we advise using cfg(miri) to shrink your workload instead. The performance benefit of enabling MIR optimizations is usually marginal at best. -thread 'main' panicked at $DIR/terminate-terminator.rs:LL:CC: +thread 'main' panicked at tests/fail/terminate-terminator.rs:LL:CC: explicit panic 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 @@ -23,7 +23,7 @@ LL | ABORT(); = note: inside `core::panicking::panic_nounwind` at RUSTLIB/core/src/panicking.rs:LL:CC = note: inside `core::panicking::panic_cannot_unwind` at RUSTLIB/core/src/panicking.rs:LL:CC note: inside `has_cleanup` - --> $DIR/terminate-terminator.rs:LL:CC + --> tests/fail/terminate-terminator.rs:LL:CC | LL | / fn has_cleanup() { LL | | let _f = Foo; @@ -31,12 +31,12 @@ LL | | panic!(); LL | | } | |_^ note: inside `panic_abort` - --> $DIR/terminate-terminator.rs:LL:CC + --> tests/fail/terminate-terminator.rs:LL:CC | LL | has_cleanup(); | ^ note: inside `main` - --> $DIR/terminate-terminator.rs:LL:CC + --> tests/fail/terminate-terminator.rs:LL:CC | LL | panic_abort(); | ^ diff --git a/tests/fail/tls/tls_static_dealloc.stderr b/tests/fail/tls/tls_static_dealloc.stderr index a49933b7d0..3a45dbfb58 100644 --- a/tests/fail/tls/tls_static_dealloc.stderr +++ b/tests/fail/tls/tls_static_dealloc.stderr @@ -1,5 +1,5 @@ error: Undefined Behavior: memory access failed: ALLOC has been freed, so this pointer is dangling - --> $DIR/tls_static_dealloc.rs:LL:CC + --> tests/fail/tls/tls_static_dealloc.rs:LL:CC | LL | let _val = *dangling_ptr.0; | ^^^^^^^^^^^^^^^ memory access failed: ALLOC has been freed, so this pointer is dangling @@ -7,7 +7,7 @@ LL | let _val = *dangling_ptr.0; = 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 = note: BACKTRACE: - = note: inside `main` at $DIR/tls_static_dealloc.rs:LL:CC + = note: inside `main` at tests/fail/tls/tls_static_dealloc.rs:LL:CC note: some details are omitted, run with `MIRIFLAGS=-Zmiri-backtrace=full` for a verbose backtrace diff --git a/tests/fail/tls_macro_leak.stderr b/tests/fail/tls_macro_leak.stderr index c7c641a30f..d32795963f 100644 --- a/tests/fail/tls_macro_leak.stderr +++ b/tests/fail/tls_macro_leak.stderr @@ -11,14 +11,14 @@ LL | __rust_alloc(layout.size(), layout.align()) = note: inside `alloc::alloc::exchange_malloc` at RUSTLIB/alloc/src/alloc.rs:LL:CC = note: inside `std::boxed::Box::::new` at RUSTLIB/alloc/src/boxed.rs:LL:CC note: inside closure - --> $DIR/tls_macro_leak.rs:LL:CC + --> tests/fail/tls_macro_leak.rs:LL:CC | LL | cell.set(Some(Box::leak(Box::new(123)))); | ^^^^^^^^^^^^^ - = note: inside `std::thread::LocalKey::>>::try_with::<{closure@$DIR/tls_macro_leak.rs:LL:CC}, ()>` at RUSTLIB/std/src/thread/local.rs:LL:CC - = note: inside `std::thread::LocalKey::>>::with::<{closure@$DIR/tls_macro_leak.rs:LL:CC}, ()>` at RUSTLIB/std/src/thread/local.rs:LL:CC + = note: inside `std::thread::LocalKey::>>::try_with::<{closure@tests/fail/tls_macro_leak.rs:LL:CC}, ()>` at RUSTLIB/std/src/thread/local.rs:LL:CC + = note: inside `std::thread::LocalKey::>>::with::<{closure@tests/fail/tls_macro_leak.rs:LL:CC}, ()>` at RUSTLIB/std/src/thread/local.rs:LL:CC note: inside closure - --> $DIR/tls_macro_leak.rs:LL:CC + --> tests/fail/tls_macro_leak.rs:LL:CC | LL | / TLS.with(|cell| { LL | | cell.set(Some(Box::leak(Box::new(123)))); diff --git a/tests/fail/tls_static_leak.stderr b/tests/fail/tls_static_leak.stderr index f7b90a1118..304287b0db 100644 --- a/tests/fail/tls_static_leak.stderr +++ b/tests/fail/tls_static_leak.stderr @@ -11,7 +11,7 @@ LL | __rust_alloc(layout.size(), layout.align()) = note: inside `alloc::alloc::exchange_malloc` at RUSTLIB/alloc/src/alloc.rs:LL:CC = note: inside `std::boxed::Box::::new` at RUSTLIB/alloc/src/boxed.rs:LL:CC note: inside closure - --> $DIR/tls_static_leak.rs:LL:CC + --> tests/fail/tls_static_leak.rs:LL:CC | LL | TLS.set(Some(Box::leak(Box::new(123)))); | ^^^^^^^^^^^^^ diff --git a/tests/fail/transmute-pair-uninit.stderr b/tests/fail/transmute-pair-uninit.stderr index 30306054fb..65a6fafffa 100644 --- a/tests/fail/transmute-pair-uninit.stderr +++ b/tests/fail/transmute-pair-uninit.stderr @@ -1,5 +1,5 @@ error: Undefined Behavior: using uninitialized data, but this operation requires initialized memory - --> $DIR/transmute-pair-uninit.rs:LL:CC + --> tests/fail/transmute-pair-uninit.rs:LL:CC | LL | let v = unsafe { *z.offset(first_undef) }; | ^^^^^^^^^^^^^^^^^^^^^^ using uninitialized data, but this operation requires initialized memory @@ -7,7 +7,7 @@ LL | let v = unsafe { *z.offset(first_undef) }; = 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 = note: BACKTRACE: - = note: inside `main` at $DIR/transmute-pair-uninit.rs:LL:CC + = note: inside `main` at tests/fail/transmute-pair-uninit.rs:LL:CC note: some details are omitted, run with `MIRIFLAGS=-Zmiri-backtrace=full` for a verbose backtrace diff --git a/tests/fail/tree_borrows/alternate-read-write.rs b/tests/fail/tree_borrows/alternate-read-write.rs index 122a8ff875..fee88cf348 100644 --- a/tests/fail/tree_borrows/alternate-read-write.rs +++ b/tests/fail/tree_borrows/alternate-read-write.rs @@ -13,7 +13,8 @@ pub fn main() { // This time y gets Frozen... let _val = *x; // ... and the next Write attempt fails. - *y += 1; // Failure //~ ERROR: /write access through .* is forbidden/ + //~v ERROR: /write access through .* is forbidden/ + *y += 1; // Failure let _val = *x; *y += 1; // Unreachable } diff --git a/tests/fail/tree_borrows/alternate-read-write.stderr b/tests/fail/tree_borrows/alternate-read-write.stderr index bd969d089c..1294b52c05 100644 --- a/tests/fail/tree_borrows/alternate-read-write.stderr +++ b/tests/fail/tree_borrows/alternate-read-write.stderr @@ -1,5 +1,5 @@ error: Undefined Behavior: write access through at ALLOC[0x0] is forbidden - --> $DIR/alternate-read-write.rs:LL:CC + --> tests/fail/tree_borrows/alternate-read-write.rs:LL:CC | LL | *y += 1; // Failure | ^^^^^^^ write access through at ALLOC[0x0] is forbidden @@ -7,24 +7,24 @@ LL | *y += 1; // Failure = help: this indicates a potential bug in the program: it performed an invalid operation, but the Tree Borrows rules it violated are still experimental = help: the accessed tag has state Frozen which forbids this child write access help: the accessed tag was created here, in the initial state Reserved - --> $DIR/alternate-read-write.rs:LL:CC + --> tests/fail/tree_borrows/alternate-read-write.rs:LL:CC | LL | let y = unsafe { &mut *(x as *mut u8) }; | ^^^^^^^^^^^^^^^^^^^^ help: the accessed tag later transitioned to Active due to a child write access at offsets [0x0..0x1] - --> $DIR/alternate-read-write.rs:LL:CC + --> tests/fail/tree_borrows/alternate-read-write.rs:LL:CC | LL | *y += 1; // Success | ^^^^^^^ = help: this transition corresponds to the first write to a 2-phase borrowed mutable reference help: the accessed tag later transitioned to Frozen due to a foreign read access at offsets [0x0..0x1] - --> $DIR/alternate-read-write.rs:LL:CC + --> tests/fail/tree_borrows/alternate-read-write.rs:LL:CC | LL | let _val = *x; | ^^ = help: this transition corresponds to a loss of write permissions = note: BACKTRACE (of the first span): - = note: inside `main` at $DIR/alternate-read-write.rs:LL:CC + = note: inside `main` at tests/fail/tree_borrows/alternate-read-write.rs:LL:CC note: some details are omitted, run with `MIRIFLAGS=-Zmiri-backtrace=full` for a verbose backtrace diff --git a/tests/fail/tree_borrows/children-can-alias.default.stderr b/tests/fail/tree_borrows/children-can-alias.default.stderr index 87286f1a1a..b9651e21ec 100644 --- a/tests/fail/tree_borrows/children-can-alias.default.stderr +++ b/tests/fail/tree_borrows/children-can-alias.default.stderr @@ -1,5 +1,5 @@ error: Undefined Behavior: entering unreachable code - --> $DIR/children-can-alias.rs:LL:CC + --> tests/fail/tree_borrows/children-can-alias.rs:LL:CC | LL | std::hint::unreachable_unchecked(); | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ entering unreachable code @@ -7,7 +7,7 @@ LL | std::hint::unreachable_unchecked(); = 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 = note: BACKTRACE: - = note: inside `main` at $DIR/children-can-alias.rs:LL:CC + = note: inside `main` at tests/fail/tree_borrows/children-can-alias.rs:LL:CC note: some details are omitted, run with `MIRIFLAGS=-Zmiri-backtrace=full` for a verbose backtrace diff --git a/tests/fail/tree_borrows/children-can-alias.uniq.stderr b/tests/fail/tree_borrows/children-can-alias.uniq.stderr index cdfa8a7423..83c506abb2 100644 --- a/tests/fail/tree_borrows/children-can-alias.uniq.stderr +++ b/tests/fail/tree_borrows/children-can-alias.uniq.stderr @@ -1,5 +1,5 @@ error: Undefined Behavior: write access through at ALLOC[0x0] is forbidden - --> $DIR/children-can-alias.rs:LL:CC + --> tests/fail/tree_borrows/children-can-alias.rs:LL:CC | LL | child2.write(2); | ^^^^^^^^^^^^^^^ write access through at ALLOC[0x0] is forbidden @@ -7,20 +7,20 @@ LL | child2.write(2); = help: this indicates a potential bug in the program: it performed an invalid operation, but the Tree Borrows rules it violated are still experimental = help: the accessed tag has state Disabled which forbids this child write access help: the accessed tag was created here, in the initial state Reserved - --> $DIR/children-can-alias.rs:LL:CC + --> tests/fail/tree_borrows/children-can-alias.rs:LL:CC | LL | let child2 = x.as_ptr(); | ^^^^^^^^^^ help: the accessed tag later transitioned to Disabled due to a foreign write access at offsets [0x0..0x1] - --> $DIR/children-can-alias.rs:LL:CC + --> tests/fail/tree_borrows/children-can-alias.rs:LL:CC | LL | child1.write(1); | ^^^^^^^^^^^^^^^ = help: this transition corresponds to a loss of read and write permissions = note: BACKTRACE (of the first span): - = note: inside `raw_children_of_unique_can_alias` at $DIR/children-can-alias.rs:LL:CC + = note: inside `raw_children_of_unique_can_alias` at tests/fail/tree_borrows/children-can-alias.rs:LL:CC note: inside `main` - --> $DIR/children-can-alias.rs:LL:CC + --> tests/fail/tree_borrows/children-can-alias.rs:LL:CC | LL | raw_children_of_unique_can_alias(Unique::new_unchecked(raw)); | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ diff --git a/tests/fail/tree_borrows/error-range.stderr b/tests/fail/tree_borrows/error-range.stderr index 090ae4507b..dc4d7c1f7f 100644 --- a/tests/fail/tree_borrows/error-range.stderr +++ b/tests/fail/tree_borrows/error-range.stderr @@ -1,5 +1,5 @@ error: Undefined Behavior: read access through at ALLOC[0x5] is forbidden - --> $DIR/error-range.rs:LL:CC + --> tests/fail/tree_borrows/error-range.rs:LL:CC | LL | rmut[5] += 1; | ^^^^^^^^^^^^ read access through at ALLOC[0x5] is forbidden @@ -7,18 +7,18 @@ LL | rmut[5] += 1; = help: this indicates a potential bug in the program: it performed an invalid operation, but the Tree Borrows rules it violated are still experimental = help: the accessed tag has state Disabled which forbids this child read access help: the accessed tag was created here, in the initial state Reserved - --> $DIR/error-range.rs:LL:CC + --> tests/fail/tree_borrows/error-range.rs:LL:CC | LL | let rmut = &mut *addr_of_mut!(data[0..6]); | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: the accessed tag later transitioned to Disabled due to a foreign write access at offsets [0x5..0x6] - --> $DIR/error-range.rs:LL:CC + --> tests/fail/tree_borrows/error-range.rs:LL:CC | LL | data[5] = 1; | ^^^^^^^^^^^ = help: this transition corresponds to a loss of read permissions = note: BACKTRACE (of the first span): - = note: inside `main` at $DIR/error-range.rs:LL:CC + = note: inside `main` at tests/fail/tree_borrows/error-range.rs:LL:CC note: some details are omitted, run with `MIRIFLAGS=-Zmiri-backtrace=full` for a verbose backtrace diff --git a/tests/fail/tree_borrows/fnentry_invalidation.stderr b/tests/fail/tree_borrows/fnentry_invalidation.stderr index dd5d27107f..6b8e8fc114 100644 --- a/tests/fail/tree_borrows/fnentry_invalidation.stderr +++ b/tests/fail/tree_borrows/fnentry_invalidation.stderr @@ -1,5 +1,5 @@ error: Undefined Behavior: write access through at ALLOC[0x0] is forbidden - --> $DIR/fnentry_invalidation.rs:LL:CC + --> tests/fail/tree_borrows/fnentry_invalidation.rs:LL:CC | LL | *z = 2; | ^^^^^^ write access through at ALLOC[0x0] is forbidden @@ -7,24 +7,24 @@ LL | *z = 2; = help: this indicates a potential bug in the program: it performed an invalid operation, but the Tree Borrows rules it violated are still experimental = help: the accessed tag has state Frozen which forbids this child write access help: the accessed tag was created here, in the initial state Reserved - --> $DIR/fnentry_invalidation.rs:LL:CC + --> tests/fail/tree_borrows/fnentry_invalidation.rs:LL:CC | LL | let z = &mut x as *mut i32; | ^^^^^^ help: the accessed tag later transitioned to Active due to a child write access at offsets [0x0..0x4] - --> $DIR/fnentry_invalidation.rs:LL:CC + --> tests/fail/tree_borrows/fnentry_invalidation.rs:LL:CC | LL | *z = 1; | ^^^^^^ = help: this transition corresponds to the first write to a 2-phase borrowed mutable reference help: the accessed tag later transitioned to Frozen due to a reborrow (acting as a foreign read access) at offsets [0x0..0x4] - --> $DIR/fnentry_invalidation.rs:LL:CC + --> tests/fail/tree_borrows/fnentry_invalidation.rs:LL:CC | LL | x.do_bad(); | ^ = help: this transition corresponds to a loss of write permissions = note: BACKTRACE (of the first span): - = note: inside `main` at $DIR/fnentry_invalidation.rs:LL:CC + = note: inside `main` at tests/fail/tree_borrows/fnentry_invalidation.rs:LL:CC note: some details are omitted, run with `MIRIFLAGS=-Zmiri-backtrace=full` for a verbose backtrace diff --git a/tests/fail/tree_borrows/outside-range.stderr b/tests/fail/tree_borrows/outside-range.stderr index 715228028b..39fb956f73 100644 --- a/tests/fail/tree_borrows/outside-range.stderr +++ b/tests/fail/tree_borrows/outside-range.stderr @@ -1,5 +1,5 @@ error: Undefined Behavior: write access through at ALLOC[0x3] is forbidden - --> $DIR/outside-range.rs:LL:CC + --> tests/fail/tree_borrows/outside-range.rs:LL:CC | LL | *y.add(3) = 42; | ^^^^^^^^^^^^^^ write access through at ALLOC[0x3] is forbidden @@ -9,19 +9,19 @@ LL | *y.add(3) = 42; = help: this foreign write access would cause the protected tag (currently Reserved) to become Disabled = help: protected tags must never be Disabled help: the accessed tag was created here - --> $DIR/outside-range.rs:LL:CC + --> tests/fail/tree_borrows/outside-range.rs:LL:CC | LL | let raw = data.as_mut_ptr(); | ^^^^^^^^^^^^^^^^^ help: the protected tag was created here, in the initial state Reserved - --> $DIR/outside-range.rs:LL:CC + --> tests/fail/tree_borrows/outside-range.rs:LL:CC | LL | unsafe fn stuff(x: &mut u8, y: *mut u8) { | ^ = note: BACKTRACE (of the first span): - = note: inside `stuff` at $DIR/outside-range.rs:LL:CC + = note: inside `stuff` at tests/fail/tree_borrows/outside-range.rs:LL:CC note: inside `main` - --> $DIR/outside-range.rs:LL:CC + --> tests/fail/tree_borrows/outside-range.rs:LL:CC | LL | stuff(&mut *raw, raw); | ^^^^^^^^^^^^^^^^^^^^^ diff --git a/tests/fail/tree_borrows/parent_read_freezes_raw_mut.stderr b/tests/fail/tree_borrows/parent_read_freezes_raw_mut.stderr index 87844ff401..15f257c3d9 100644 --- a/tests/fail/tree_borrows/parent_read_freezes_raw_mut.stderr +++ b/tests/fail/tree_borrows/parent_read_freezes_raw_mut.stderr @@ -1,5 +1,5 @@ error: Undefined Behavior: write access through at ALLOC[0x0] is forbidden - --> $DIR/parent_read_freezes_raw_mut.rs:LL:CC + --> tests/fail/tree_borrows/parent_read_freezes_raw_mut.rs:LL:CC | LL | *ptr = 0; | ^^^^^^^^ write access through at ALLOC[0x0] is forbidden @@ -7,24 +7,24 @@ LL | *ptr = 0; = help: this indicates a potential bug in the program: it performed an invalid operation, but the Tree Borrows rules it violated are still experimental = help: the accessed tag has state Frozen which forbids this child write access help: the accessed tag was created here, in the initial state Reserved - --> $DIR/parent_read_freezes_raw_mut.rs:LL:CC + --> tests/fail/tree_borrows/parent_read_freezes_raw_mut.rs:LL:CC | LL | let mref = &mut root; | ^^^^^^^^^ help: the accessed tag later transitioned to Active due to a child write access at offsets [0x0..0x1] - --> $DIR/parent_read_freezes_raw_mut.rs:LL:CC + --> tests/fail/tree_borrows/parent_read_freezes_raw_mut.rs:LL:CC | LL | *ptr = 0; // Write | ^^^^^^^^ = help: this transition corresponds to the first write to a 2-phase borrowed mutable reference help: the accessed tag later transitioned to Frozen due to a reborrow (acting as a foreign read access) at offsets [0x0..0x1] - --> $DIR/parent_read_freezes_raw_mut.rs:LL:CC + --> tests/fail/tree_borrows/parent_read_freezes_raw_mut.rs:LL:CC | LL | assert_eq!(root, 0); // Parent Read | ^^^^^^^^^^^^^^^^^^^ = help: this transition corresponds to a loss of write permissions = note: BACKTRACE (of the first span): - = note: inside `main` at $DIR/parent_read_freezes_raw_mut.rs:LL:CC + = note: inside `main` at tests/fail/tree_borrows/parent_read_freezes_raw_mut.rs:LL:CC = note: this error originates in the macro `assert_eq` (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 diff --git a/tests/fail/tree_borrows/pass_invalid_mut.stderr b/tests/fail/tree_borrows/pass_invalid_mut.stderr index 84fbc91e68..f6da0b8ec5 100644 --- a/tests/fail/tree_borrows/pass_invalid_mut.stderr +++ b/tests/fail/tree_borrows/pass_invalid_mut.stderr @@ -1,5 +1,5 @@ error: Undefined Behavior: write access through at ALLOC[0x0] is forbidden - --> $DIR/pass_invalid_mut.rs:LL:CC + --> tests/fail/tree_borrows/pass_invalid_mut.rs:LL:CC | LL | *nope = 31; | ^^^^^^^^^^ write access through at ALLOC[0x0] is forbidden @@ -8,31 +8,31 @@ LL | *nope = 31; = help: the accessed tag is a child of the conflicting tag = help: the conflicting tag has state Frozen which forbids this child write access help: the accessed tag was created here - --> $DIR/pass_invalid_mut.rs:LL:CC + --> tests/fail/tree_borrows/pass_invalid_mut.rs:LL:CC | LL | fn foo(nope: &mut i32) { | ^^^^ help: the conflicting tag was created here, in the initial state Reserved - --> $DIR/pass_invalid_mut.rs:LL:CC + --> tests/fail/tree_borrows/pass_invalid_mut.rs:LL:CC | LL | let xref = unsafe { &mut *xraw }; | ^^^^^^^^^^ help: the conflicting tag later transitioned to Active due to a child write access at offsets [0x0..0x4] - --> $DIR/pass_invalid_mut.rs:LL:CC + --> tests/fail/tree_borrows/pass_invalid_mut.rs:LL:CC | LL | *xref = 18; // activate xref | ^^^^^^^^^^ = help: this transition corresponds to the first write to a 2-phase borrowed mutable reference help: the conflicting tag later transitioned to Frozen due to a foreign read access at offsets [0x0..0x4] - --> $DIR/pass_invalid_mut.rs:LL:CC + --> tests/fail/tree_borrows/pass_invalid_mut.rs:LL:CC | LL | let _val = unsafe { *xraw }; // invalidate xref for writing | ^^^^^ = help: this transition corresponds to a loss of write permissions = note: BACKTRACE (of the first span): - = note: inside `foo` at $DIR/pass_invalid_mut.rs:LL:CC + = note: inside `foo` at tests/fail/tree_borrows/pass_invalid_mut.rs:LL:CC note: inside `main` - --> $DIR/pass_invalid_mut.rs:LL:CC + --> tests/fail/tree_borrows/pass_invalid_mut.rs:LL:CC | LL | foo(xref); | ^^^^^^^^^ diff --git a/tests/fail/tree_borrows/protector-write-lazy.stderr b/tests/fail/tree_borrows/protector-write-lazy.stderr index 955abd144c..bb07776da6 100644 --- a/tests/fail/tree_borrows/protector-write-lazy.stderr +++ b/tests/fail/tree_borrows/protector-write-lazy.stderr @@ -1,5 +1,5 @@ error: Undefined Behavior: reborrow through at ALLOC[0x0] is forbidden - --> $DIR/protector-write-lazy.rs:LL:CC + --> tests/fail/tree_borrows/protector-write-lazy.rs:LL:CC | LL | unsafe { println!("Value of funky: {}", *funky_ptr_lazy_on_fst_elem) } | ^^^^^^^^^^^^^^^^^^^^^^^^^^^ reborrow through at ALLOC[0x0] is forbidden @@ -7,18 +7,18 @@ LL | unsafe { println!("Value of funky: {}", *funky_ptr_lazy_on_fst_elem) } = help: this indicates a potential bug in the program: it performed an invalid operation, but the Tree Borrows rules it violated are still experimental = help: the accessed tag has state Disabled which forbids this reborrow (acting as a child read access) help: the accessed tag was created here, in the initial state Reserved - --> $DIR/protector-write-lazy.rs:LL:CC + --> tests/fail/tree_borrows/protector-write-lazy.rs:LL:CC | LL | unsafe { (&mut *(ptr_to_vec.wrapping_add(1))) as *mut i32 }.wrapping_sub(1); | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: the accessed tag later transitioned to Disabled due to a protector release (acting as a foreign write access) on every location previously accessed by this tag - --> $DIR/protector-write-lazy.rs:LL:CC + --> tests/fail/tree_borrows/protector-write-lazy.rs:LL:CC | LL | } | ^ = help: this transition corresponds to a loss of read and write permissions = note: BACKTRACE (of the first span): - = note: inside `main` at $DIR/protector-write-lazy.rs:LL:CC + = note: inside `main` at tests/fail/tree_borrows/protector-write-lazy.rs:LL:CC = note: this error originates in the macro `$crate::format_args_nl` which comes from the expansion of the macro `println` (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 diff --git a/tests/fail/tree_borrows/repeated_foreign_read_lazy_conflicted.stderr b/tests/fail/tree_borrows/repeated_foreign_read_lazy_conflicted.stderr index 963e8e5eca..d81ecff6cc 100644 --- a/tests/fail/tree_borrows/repeated_foreign_read_lazy_conflicted.stderr +++ b/tests/fail/tree_borrows/repeated_foreign_read_lazy_conflicted.stderr @@ -1,5 +1,5 @@ error: Undefined Behavior: write access through at ALLOC[0x0] is forbidden - --> $DIR/repeated_foreign_read_lazy_conflicted.rs:LL:CC + --> tests/fail/tree_borrows/repeated_foreign_read_lazy_conflicted.rs:LL:CC | LL | *(x as *mut u8).byte_sub(1) = 42; | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ write access through at ALLOC[0x0] is forbidden @@ -7,20 +7,20 @@ LL | *(x as *mut u8).byte_sub(1) = 42; = help: this indicates a potential bug in the program: it performed an invalid operation, but the Tree Borrows rules it violated are still experimental = help: the accessed tag has state Reserved (conflicted) which forbids this child write access help: the accessed tag was created here, in the initial state Reserved - --> $DIR/repeated_foreign_read_lazy_conflicted.rs:LL:CC + --> tests/fail/tree_borrows/repeated_foreign_read_lazy_conflicted.rs:LL:CC | LL | unsafe fn access_after_sub_1(x: &mut u8, orig_ptr: *mut u8) { | ^ help: the accessed tag later transitioned to Reserved (conflicted) due to a foreign read access at offsets [0x0..0x1] - --> $DIR/repeated_foreign_read_lazy_conflicted.rs:LL:CC + --> tests/fail/tree_borrows/repeated_foreign_read_lazy_conflicted.rs:LL:CC | LL | do_something(*orig_ptr); | ^^^^^^^^^ = help: this transition corresponds to a temporary loss of write permissions until function exit = note: BACKTRACE (of the first span): - = note: inside `access_after_sub_1` at $DIR/repeated_foreign_read_lazy_conflicted.rs:LL:CC + = note: inside `access_after_sub_1` at tests/fail/tree_borrows/repeated_foreign_read_lazy_conflicted.rs:LL:CC note: inside `main` - --> $DIR/repeated_foreign_read_lazy_conflicted.rs:LL:CC + --> tests/fail/tree_borrows/repeated_foreign_read_lazy_conflicted.rs:LL:CC | LL | access_after_sub_1(&mut *(foo as *mut u8).byte_add(1), orig_ptr); | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ diff --git a/tests/fail/tree_borrows/reserved/cell-protected-write.stderr b/tests/fail/tree_borrows/reserved/cell-protected-write.stderr index 133a50938f..03f79fe0a5 100644 --- a/tests/fail/tree_borrows/reserved/cell-protected-write.stderr +++ b/tests/fail/tree_borrows/reserved/cell-protected-write.stderr @@ -9,7 +9,7 @@ Warning: this tree is indicative only. Some tags may have been hidden. | ReIM| └──── ────────────────────────────────────────────────── error: Undefined Behavior: write access through (y, callee:y, caller:y) at ALLOC[0x0] is forbidden - --> $DIR/cell-protected-write.rs:LL:CC + --> tests/fail/tree_borrows/reserved/cell-protected-write.rs:LL:CC | LL | *y = 1; | ^^^^^^ write access through (y, callee:y, caller:y) at ALLOC[0x0] is forbidden @@ -19,19 +19,19 @@ LL | *y = 1; = help: this foreign write access would cause the protected tag (callee:x) (currently Reserved) to become Disabled = help: protected tags must never be Disabled help: the accessed tag was created here - --> $DIR/cell-protected-write.rs:LL:CC + --> tests/fail/tree_borrows/reserved/cell-protected-write.rs:LL:CC | LL | let y = (&mut *n).get(); | ^^^^^^^^^ help: the protected tag was created here, in the initial state Reserved - --> $DIR/cell-protected-write.rs:LL:CC + --> tests/fail/tree_borrows/reserved/cell-protected-write.rs:LL:CC | LL | unsafe fn write_second(x: &mut UnsafeCell, y: *mut u8) { | ^ = note: BACKTRACE (of the first span): - = note: inside `main::write_second` at $DIR/cell-protected-write.rs:LL:CC + = note: inside `main::write_second` at tests/fail/tree_borrows/reserved/cell-protected-write.rs:LL:CC note: inside `main` - --> $DIR/cell-protected-write.rs:LL:CC + --> tests/fail/tree_borrows/reserved/cell-protected-write.rs:LL:CC | LL | write_second(x, y); | ^^^^^^^^^^^^^^^^^^ diff --git a/tests/fail/tree_borrows/reserved/int-protected-write.stderr b/tests/fail/tree_borrows/reserved/int-protected-write.stderr index a4dc123979..a9683c9e61 100644 --- a/tests/fail/tree_borrows/reserved/int-protected-write.stderr +++ b/tests/fail/tree_borrows/reserved/int-protected-write.stderr @@ -9,7 +9,7 @@ Warning: this tree is indicative only. Some tags may have been hidden. | Res | └──── ────────────────────────────────────────────────── error: Undefined Behavior: write access through (y, callee:y, caller:y) at ALLOC[0x0] is forbidden - --> $DIR/int-protected-write.rs:LL:CC + --> tests/fail/tree_borrows/reserved/int-protected-write.rs:LL:CC | LL | *y = 0; | ^^^^^^ write access through (y, callee:y, caller:y) at ALLOC[0x0] is forbidden @@ -19,19 +19,19 @@ LL | *y = 0; = help: this foreign write access would cause the protected tag (callee:x) (currently Reserved) to become Disabled = help: protected tags must never be Disabled help: the accessed tag was created here - --> $DIR/int-protected-write.rs:LL:CC + --> tests/fail/tree_borrows/reserved/int-protected-write.rs:LL:CC | LL | let y = (&mut *n) as *mut _; | ^^^^^^^^^ help: the protected tag was created here, in the initial state Reserved - --> $DIR/int-protected-write.rs:LL:CC + --> tests/fail/tree_borrows/reserved/int-protected-write.rs:LL:CC | LL | unsafe fn write_second(x: &mut u8, y: *mut u8) { | ^ = note: BACKTRACE (of the first span): - = note: inside `main::write_second` at $DIR/int-protected-write.rs:LL:CC + = note: inside `main::write_second` at tests/fail/tree_borrows/reserved/int-protected-write.rs:LL:CC note: inside `main` - --> $DIR/int-protected-write.rs:LL:CC + --> tests/fail/tree_borrows/reserved/int-protected-write.rs:LL:CC | LL | write_second(x, y); | ^^^^^^^^^^^^^^^^^^ diff --git a/tests/fail/tree_borrows/reservedim_spurious_write.with.stderr b/tests/fail/tree_borrows/reservedim_spurious_write.with.stderr index 0e4517e901..47341e027d 100644 --- a/tests/fail/tree_borrows/reservedim_spurious_write.with.stderr +++ b/tests/fail/tree_borrows/reservedim_spurious_write.with.stderr @@ -13,7 +13,7 @@ Thread 1 executing: ret x Thread 1 executing: write y Thread 2 executing: write y error: Undefined Behavior: write access through at ALLOC[0x0] is forbidden - --> $DIR/reservedim_spurious_write.rs:LL:CC + --> tests/fail/tree_borrows/reservedim_spurious_write.rs:LL:CC | LL | unsafe { *y = 13 } | ^^^^^^^ write access through at ALLOC[0x0] is forbidden @@ -21,18 +21,18 @@ LL | unsafe { *y = 13 } = help: this indicates a potential bug in the program: it performed an invalid operation, but the Tree Borrows rules it violated are still experimental = help: the accessed tag has state Disabled which forbids this child write access help: the accessed tag was created here, in the initial state Reserved - --> $DIR/reservedim_spurious_write.rs:LL:CC + --> tests/fail/tree_borrows/reservedim_spurious_write.rs:LL:CC | LL | fn inner(y: &mut Cell<()>, b: IdxBarrier) -> *mut u8 { | ^ help: the accessed tag later transitioned to Disabled due to a foreign write access at offsets [0x0..0x1] - --> $DIR/reservedim_spurious_write.rs:LL:CC + --> tests/fail/tree_borrows/reservedim_spurious_write.rs:LL:CC | LL | *x = 64; | ^^^^^^^ = help: this transition corresponds to a loss of read and write permissions = note: BACKTRACE (of the first span) on thread `unnamed-ID`: - = note: inside closure at $DIR/reservedim_spurious_write.rs:LL:CC + = note: inside closure at tests/fail/tree_borrows/reservedim_spurious_write.rs:LL:CC note: some details are omitted, run with `MIRIFLAGS=-Zmiri-backtrace=full` for a verbose backtrace diff --git a/tests/fail/tree_borrows/reservedim_spurious_write.without.stderr b/tests/fail/tree_borrows/reservedim_spurious_write.without.stderr index cbeef90243..504b8cc0ac 100644 --- a/tests/fail/tree_borrows/reservedim_spurious_write.without.stderr +++ b/tests/fail/tree_borrows/reservedim_spurious_write.without.stderr @@ -13,7 +13,7 @@ Thread 1 executing: ret x Thread 1 executing: write y Thread 2 executing: write y error: Undefined Behavior: write access through at ALLOC[0x0] is forbidden - --> $DIR/reservedim_spurious_write.rs:LL:CC + --> tests/fail/tree_borrows/reservedim_spurious_write.rs:LL:CC | LL | unsafe { *y = 13 } | ^^^^^^^ write access through at ALLOC[0x0] is forbidden @@ -21,18 +21,18 @@ LL | unsafe { *y = 13 } = help: this indicates a potential bug in the program: it performed an invalid operation, but the Tree Borrows rules it violated are still experimental = help: the accessed tag has state Disabled which forbids this child write access help: the accessed tag was created here, in the initial state Reserved - --> $DIR/reservedim_spurious_write.rs:LL:CC + --> tests/fail/tree_borrows/reservedim_spurious_write.rs:LL:CC | LL | fn inner(y: &mut Cell<()>, b: IdxBarrier) -> *mut u8 { | ^ help: the accessed tag later transitioned to Disabled due to a protector release (acting as a foreign write access) on every location previously accessed by this tag - --> $DIR/reservedim_spurious_write.rs:LL:CC + --> tests/fail/tree_borrows/reservedim_spurious_write.rs:LL:CC | LL | } | ^ = help: this transition corresponds to a loss of read and write permissions = note: BACKTRACE (of the first span) on thread `unnamed-ID`: - = note: inside closure at $DIR/reservedim_spurious_write.rs:LL:CC + = note: inside closure at tests/fail/tree_borrows/reservedim_spurious_write.rs:LL:CC note: some details are omitted, run with `MIRIFLAGS=-Zmiri-backtrace=full` for a verbose backtrace diff --git a/tests/fail/tree_borrows/return_invalid_mut.stderr b/tests/fail/tree_borrows/return_invalid_mut.stderr index ca8c45d36f..81fa326287 100644 --- a/tests/fail/tree_borrows/return_invalid_mut.stderr +++ b/tests/fail/tree_borrows/return_invalid_mut.stderr @@ -1,5 +1,5 @@ error: Undefined Behavior: write access through at ALLOC[0x4] is forbidden - --> $DIR/return_invalid_mut.rs:LL:CC + --> tests/fail/tree_borrows/return_invalid_mut.rs:LL:CC | LL | *ret = 3; | ^^^^^^^^ write access through at ALLOC[0x4] is forbidden @@ -8,29 +8,29 @@ LL | *ret = 3; = help: the accessed tag is a child of the conflicting tag = help: the conflicting tag has state Frozen which forbids this child write access help: the accessed tag was created here - --> $DIR/return_invalid_mut.rs:LL:CC + --> tests/fail/tree_borrows/return_invalid_mut.rs:LL:CC | LL | let ret = foo(arg); | ^^^^^^^^ help: the conflicting tag was created here, in the initial state Reserved - --> $DIR/return_invalid_mut.rs:LL:CC + --> tests/fail/tree_borrows/return_invalid_mut.rs:LL:CC | LL | let ret = unsafe { &mut (*xraw).1 }; | ^^^^^^^^^^^^^^ help: the conflicting tag later transitioned to Active due to a child write access at offsets [0x4..0x8] - --> $DIR/return_invalid_mut.rs:LL:CC + --> tests/fail/tree_borrows/return_invalid_mut.rs:LL:CC | LL | *ret = *ret; // activate | ^^^^^^^^^^^ = help: this transition corresponds to the first write to a 2-phase borrowed mutable reference help: the conflicting tag later transitioned to Frozen due to a foreign read access at offsets [0x0..0x8] - --> $DIR/return_invalid_mut.rs:LL:CC + --> tests/fail/tree_borrows/return_invalid_mut.rs:LL:CC | LL | let _val = unsafe { *xraw }; // invalidate xref for writing | ^^^^^ = help: this transition corresponds to a loss of write permissions = note: BACKTRACE (of the first span): - = note: inside `main` at $DIR/return_invalid_mut.rs:LL:CC + = note: inside `main` at tests/fail/tree_borrows/return_invalid_mut.rs:LL:CC note: some details are omitted, run with `MIRIFLAGS=-Zmiri-backtrace=full` for a verbose backtrace diff --git a/tests/fail/tree_borrows/spurious_read.stderr b/tests/fail/tree_borrows/spurious_read.stderr index f3934d4cbe..bd26b4e36d 100644 --- a/tests/fail/tree_borrows/spurious_read.stderr +++ b/tests/fail/tree_borrows/spurious_read.stderr @@ -12,7 +12,7 @@ Thread 2 executing: write y Thread 1 executing: write y Thread 1 executing: ret y error: Undefined Behavior: write access through at ALLOC[0x0] is forbidden - --> $DIR/spurious_read.rs:LL:CC + --> tests/fail/tree_borrows/spurious_read.rs:LL:CC | LL | *y = 2; | ^^^^^^ write access through at ALLOC[0x0] is forbidden @@ -20,20 +20,20 @@ LL | *y = 2; = help: this indicates a potential bug in the program: it performed an invalid operation, but the Tree Borrows rules it violated are still experimental = help: the accessed tag has state Reserved (conflicted) which forbids this child write access help: the accessed tag was created here, in the initial state Reserved - --> $DIR/spurious_read.rs:LL:CC + --> tests/fail/tree_borrows/spurious_read.rs:LL:CC | LL | fn as_mut(y: &mut u8, b: (usize, Arc)) -> *mut u8 { | ^ help: the accessed tag later transitioned to Reserved (conflicted) due to a protector release (acting as a foreign read access) on every location previously accessed by this tag - --> $DIR/spurious_read.rs:LL:CC + --> tests/fail/tree_borrows/spurious_read.rs:LL:CC | LL | } | ^ = help: this transition corresponds to a temporary loss of write permissions until function exit = note: BACKTRACE (of the first span) on thread `unnamed-ID`: - = note: inside `retagx_retagy_retx_writey_rety::{closure#1}::as_mut` at $DIR/spurious_read.rs:LL:CC + = note: inside `retagx_retagy_retx_writey_rety::{closure#1}::as_mut` at tests/fail/tree_borrows/spurious_read.rs:LL:CC note: inside closure - --> $DIR/spurious_read.rs:LL:CC + --> tests/fail/tree_borrows/spurious_read.rs:LL:CC | LL | let _y = as_mut(unsafe { &mut *ptr.0 }, b.clone()); | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ diff --git a/tests/fail/tree_borrows/strongly-protected.stderr b/tests/fail/tree_borrows/strongly-protected.stderr index 9da43055af..8b24d185c1 100644 --- a/tests/fail/tree_borrows/strongly-protected.stderr +++ b/tests/fail/tree_borrows/strongly-protected.stderr @@ -8,12 +8,12 @@ LL | unsafe { __rust_dealloc(ptr, layout.size(), layout.align()) } = help: the allocation of the accessed tag also contains the strongly protected tag = help: the strongly protected tag disallows deallocations help: the accessed tag was created here - --> $DIR/strongly-protected.rs:LL:CC + --> tests/fail/tree_borrows/strongly-protected.rs:LL:CC | LL | drop(unsafe { Box::from_raw(raw) }); | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: the strongly protected tag was created here, in the initial state Reserved - --> $DIR/strongly-protected.rs:LL:CC + --> tests/fail/tree_borrows/strongly-protected.rs:LL:CC | LL | fn inner(x: &mut i32, f: fn(*mut i32)) { | ^ @@ -24,18 +24,18 @@ LL | fn inner(x: &mut i32, f: fn(*mut i32)) { = note: inside `std::ptr::drop_in_place::> - shim(Some(std::boxed::Box))` at RUSTLIB/core/src/ptr/mod.rs:LL:CC = note: inside `std::mem::drop::>` at RUSTLIB/core/src/mem/mod.rs:LL:CC note: inside closure - --> $DIR/strongly-protected.rs:LL:CC + --> tests/fail/tree_borrows/strongly-protected.rs:LL:CC | LL | drop(unsafe { Box::from_raw(raw) }); | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ - = note: inside `<{closure@$DIR/strongly-protected.rs:LL:CC} as std::ops::FnOnce<(*mut i32,)>>::call_once - shim` at RUSTLIB/core/src/ops/function.rs:LL:CC + = note: inside `<{closure@tests/fail/tree_borrows/strongly-protected.rs:LL:CC} as std::ops::FnOnce<(*mut i32,)>>::call_once - shim` at RUSTLIB/core/src/ops/function.rs:LL:CC note: inside `inner` - --> $DIR/strongly-protected.rs:LL:CC + --> tests/fail/tree_borrows/strongly-protected.rs:LL:CC | LL | f(x) | ^^^^ note: inside `main` - --> $DIR/strongly-protected.rs:LL:CC + --> tests/fail/tree_borrows/strongly-protected.rs:LL:CC | LL | / inner(Box::leak(Box::new(0)), |raw| { LL | | drop(unsafe { Box::from_raw(raw) }); diff --git a/tests/fail/tree_borrows/unique.default.stderr b/tests/fail/tree_borrows/unique.default.stderr index bce8cb011f..c7d72f70f4 100644 --- a/tests/fail/tree_borrows/unique.default.stderr +++ b/tests/fail/tree_borrows/unique.default.stderr @@ -1,5 +1,5 @@ error: Undefined Behavior: write access through at ALLOC[0x0] is forbidden - --> $DIR/unique.rs:LL:CC + --> tests/fail/tree_borrows/unique.rs:LL:CC | LL | *uniq.as_ptr() = 3; | ^^^^^^^^^^^^^^^^^^ write access through at ALLOC[0x0] is forbidden @@ -7,24 +7,24 @@ LL | *uniq.as_ptr() = 3; = help: this indicates a potential bug in the program: it performed an invalid operation, but the Tree Borrows rules it violated are still experimental = help: the accessed tag has state Frozen which forbids this child write access help: the accessed tag was created here, in the initial state Reserved - --> $DIR/unique.rs:LL:CC + --> tests/fail/tree_borrows/unique.rs:LL:CC | LL | let refmut = &mut data; | ^^^^^^^^^ help: the accessed tag later transitioned to Active due to a child write access at offsets [0x0..0x1] - --> $DIR/unique.rs:LL:CC + --> tests/fail/tree_borrows/unique.rs:LL:CC | LL | *uniq.as_ptr() = 1; // activation | ^^^^^^^^^^^^^^^^^^ = help: this transition corresponds to the first write to a 2-phase borrowed mutable reference help: the accessed tag later transitioned to Frozen due to a foreign read access at offsets [0x0..0x1] - --> $DIR/unique.rs:LL:CC + --> tests/fail/tree_borrows/unique.rs:LL:CC | LL | let _definitely_parent = data; // definitely Frozen by now | ^^^^ = help: this transition corresponds to a loss of write permissions = note: BACKTRACE (of the first span): - = note: inside `main` at $DIR/unique.rs:LL:CC + = note: inside `main` at tests/fail/tree_borrows/unique.rs:LL:CC note: some details are omitted, run with `MIRIFLAGS=-Zmiri-backtrace=full` for a verbose backtrace diff --git a/tests/fail/tree_borrows/unique.uniq.stderr b/tests/fail/tree_borrows/unique.uniq.stderr index 7323cd1c5a..4ecff3ea0e 100644 --- a/tests/fail/tree_borrows/unique.uniq.stderr +++ b/tests/fail/tree_borrows/unique.uniq.stderr @@ -1,5 +1,5 @@ error: Undefined Behavior: write access through at ALLOC[0x0] is forbidden - --> $DIR/unique.rs:LL:CC + --> tests/fail/tree_borrows/unique.rs:LL:CC | LL | *uniq.as_ptr() = 2; | ^^^^^^^^^^^^^^^^^^ write access through at ALLOC[0x0] is forbidden @@ -8,29 +8,29 @@ LL | *uniq.as_ptr() = 2; = help: the accessed tag is a child of the conflicting tag = help: the conflicting tag has state Frozen which forbids this child write access help: the accessed tag was created here - --> $DIR/unique.rs:LL:CC + --> tests/fail/tree_borrows/unique.rs:LL:CC | LL | *uniq.as_ptr() = 2; | ^^^^^^^^^^^^^ help: the conflicting tag was created here, in the initial state Reserved - --> $DIR/unique.rs:LL:CC + --> tests/fail/tree_borrows/unique.rs:LL:CC | LL | let uniq = Unique::new_unchecked(rawptr); | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: the conflicting tag later transitioned to Active due to a child write access at offsets [0x0..0x1] - --> $DIR/unique.rs:LL:CC + --> tests/fail/tree_borrows/unique.rs:LL:CC | LL | *uniq.as_ptr() = 1; // activation | ^^^^^^^^^^^^^^^^^^ = help: this transition corresponds to the first write to a 2-phase borrowed mutable reference help: the conflicting tag later transitioned to Frozen due to a foreign read access at offsets [0x0..0x1] - --> $DIR/unique.rs:LL:CC + --> tests/fail/tree_borrows/unique.rs:LL:CC | LL | let _maybe_parent = *rawptr; // maybe becomes Frozen | ^^^^^^^ = help: this transition corresponds to a loss of write permissions = note: BACKTRACE (of the first span): - = note: inside `main` at $DIR/unique.rs:LL:CC + = note: inside `main` at tests/fail/tree_borrows/unique.rs:LL:CC note: some details are omitted, run with `MIRIFLAGS=-Zmiri-backtrace=full` for a verbose backtrace diff --git a/tests/fail/tree_borrows/write-during-2phase.stderr b/tests/fail/tree_borrows/write-during-2phase.stderr index 87589299cb..b85aac7db7 100644 --- a/tests/fail/tree_borrows/write-during-2phase.stderr +++ b/tests/fail/tree_borrows/write-during-2phase.stderr @@ -1,5 +1,5 @@ error: Undefined Behavior: reborrow through at ALLOC[0x0] is forbidden - --> $DIR/write-during-2phase.rs:LL:CC + --> tests/fail/tree_borrows/write-during-2phase.rs:LL:CC | LL | fn add(&mut self, n: u64) -> u64 { | ^^^^^^^^^ reborrow through at ALLOC[0x0] is forbidden @@ -7,20 +7,20 @@ LL | fn add(&mut self, n: u64) -> u64 { = help: this indicates a potential bug in the program: it performed an invalid operation, but the Tree Borrows rules it violated are still experimental = help: the accessed tag has state Disabled which forbids this reborrow (acting as a child read access) help: the accessed tag was created here, in the initial state Reserved - --> $DIR/write-during-2phase.rs:LL:CC + --> tests/fail/tree_borrows/write-during-2phase.rs:LL:CC | LL | let _res = f.add(unsafe { | ^ help: the accessed tag later transitioned to Disabled due to a foreign write access at offsets [0x0..0x8] - --> $DIR/write-during-2phase.rs:LL:CC + --> tests/fail/tree_borrows/write-during-2phase.rs:LL:CC | LL | *inner = 42; | ^^^^^^^^^^^ = help: this transition corresponds to a loss of read and write permissions = note: BACKTRACE (of the first span): - = note: inside `Foo::add` at $DIR/write-during-2phase.rs:LL:CC + = note: inside `Foo::add` at tests/fail/tree_borrows/write-during-2phase.rs:LL:CC note: inside `main` - --> $DIR/write-during-2phase.rs:LL:CC + --> tests/fail/tree_borrows/write-during-2phase.rs:LL:CC | LL | let _res = f.add(unsafe { | ________________^ diff --git a/tests/fail/type-too-large.rs b/tests/fail/type-too-large.rs index 81ecc6145d..46e3ac2d6c 100644 --- a/tests/fail/type-too-large.rs +++ b/tests/fail/type-too-large.rs @@ -1,4 +1,4 @@ -//@ignore-32bit +//@ignore-bitwidth: 32 fn main() { let _fat: [u8; (1 << 61) + (1 << 31)]; // ideally we'd error here, but we avoid computing the layout until absolutely necessary diff --git a/tests/fail/type-too-large.stderr b/tests/fail/type-too-large.stderr index b07bb84e34..15ad8f1764 100644 --- a/tests/fail/type-too-large.stderr +++ b/tests/fail/type-too-large.stderr @@ -1,11 +1,11 @@ error: post-monomorphization error: values of the type `[u8; 2305843011361177600]` are too big for the current architecture - --> $DIR/type-too-large.rs:LL:CC + --> tests/fail/type-too-large.rs:LL:CC | LL | _fat = [0; (1u64 << 61) as usize + (1u64 << 31) as usize]; | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ values of the type `[u8; 2305843011361177600]` are too big for the current architecture | = note: BACKTRACE: - = note: inside `main` at $DIR/type-too-large.rs:LL:CC + = note: inside `main` at tests/fail/type-too-large.rs:LL:CC note: some details are omitted, run with `MIRIFLAGS=-Zmiri-backtrace=full` for a verbose backtrace diff --git a/tests/fail/unaligned_pointers/alignment.stderr b/tests/fail/unaligned_pointers/alignment.stderr index ca3d34661d..8bbb4dfdb6 100644 --- a/tests/fail/unaligned_pointers/alignment.stderr +++ b/tests/fail/unaligned_pointers/alignment.stderr @@ -1,5 +1,5 @@ error: Undefined Behavior: accessing memory based on pointer with alignment ALIGN, but alignment ALIGN is required - --> $DIR/alignment.rs:LL:CC + --> tests/fail/unaligned_pointers/alignment.rs:LL:CC | LL | *(x_ptr as *mut u32) = 42; *(x_ptr.add(1) as *mut u32) = 42; | ^ accessing memory based on pointer with alignment ALIGN, but alignment ALIGN is required @@ -7,7 +7,7 @@ LL | *(x_ptr as *mut u32) = 42; *(x_ptr.add(1) as *mut u32) = 42; = 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 = note: BACKTRACE: - = note: inside `main` at $DIR/alignment.rs:LL:CC + = note: inside `main` at tests/fail/unaligned_pointers/alignment.rs:LL:CC note: some details are omitted, run with `MIRIFLAGS=-Zmiri-backtrace=full` for a verbose backtrace diff --git a/tests/fail/unaligned_pointers/atomic_unaligned.stderr b/tests/fail/unaligned_pointers/atomic_unaligned.stderr index 161e8977bf..a9da740be1 100644 --- a/tests/fail/unaligned_pointers/atomic_unaligned.stderr +++ b/tests/fail/unaligned_pointers/atomic_unaligned.stderr @@ -1,5 +1,5 @@ error: Undefined Behavior: accessing memory with alignment ALIGN, but alignment ALIGN is required - --> $DIR/atomic_unaligned.rs:LL:CC + --> tests/fail/unaligned_pointers/atomic_unaligned.rs:LL:CC | LL | ::std::intrinsics::atomic_load_seqcst(zptr); | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ accessing memory with alignment ALIGN, but alignment ALIGN is required @@ -7,7 +7,7 @@ LL | ::std::intrinsics::atomic_load_seqcst(zptr); = help: this usually indicates that your program performed an invalid operation and caused Undefined Behavior = help: but due to `-Zmiri-symbolic-alignment-check`, alignment errors can also be false positives = note: BACKTRACE: - = note: inside `main` at $DIR/atomic_unaligned.rs:LL:CC + = note: inside `main` at tests/fail/unaligned_pointers/atomic_unaligned.rs:LL:CC note: some details are omitted, run with `MIRIFLAGS=-Zmiri-backtrace=full` for a verbose backtrace diff --git a/tests/fail/unaligned_pointers/drop_in_place.stderr b/tests/fail/unaligned_pointers/drop_in_place.stderr index 600028337f..75efa5ff80 100644 --- a/tests/fail/unaligned_pointers/drop_in_place.stderr +++ b/tests/fail/unaligned_pointers/drop_in_place.stderr @@ -9,7 +9,7 @@ LL | pub unsafe fn drop_in_place(to_drop: *mut T) { = note: BACKTRACE: = note: inside `std::ptr::drop_in_place:: - shim(Some(PartialDrop))` at RUSTLIB/core/src/ptr/mod.rs:LL:CC note: inside `main` - --> $DIR/drop_in_place.rs:LL:CC + --> tests/fail/unaligned_pointers/drop_in_place.rs:LL:CC | LL | core::ptr::drop_in_place(p); | ^^^^^^^^^^^^^^^^^^^^^^^^^^^ diff --git a/tests/fail/unaligned_pointers/dyn_alignment.rs b/tests/fail/unaligned_pointers/dyn_alignment.rs index b5a9b2bf18..1f54f9071c 100644 --- a/tests/fail/unaligned_pointers/dyn_alignment.rs +++ b/tests/fail/unaligned_pointers/dyn_alignment.rs @@ -1,6 +1,5 @@ // should find the bug even without, but gets masked by optimizations //@compile-flags: -Zmiri-disable-stacked-borrows -Cdebug-assertions=no -//@normalize-stderr-test: "but found [0-9]+" -> "but found $$ALIGN" #[repr(align(256))] #[derive(Debug)] diff --git a/tests/fail/unaligned_pointers/dyn_alignment.stderr b/tests/fail/unaligned_pointers/dyn_alignment.stderr index 05e30f833b..72cded1c07 100644 --- a/tests/fail/unaligned_pointers/dyn_alignment.stderr +++ b/tests/fail/unaligned_pointers/dyn_alignment.stderr @@ -1,5 +1,5 @@ error: Undefined Behavior: constructing invalid value: encountered an unaligned reference (required ALIGN byte alignment but found ALIGN) - --> $DIR/dyn_alignment.rs:LL:CC + --> tests/fail/unaligned_pointers/dyn_alignment.rs:LL:CC | LL | let _ptr = &*ptr; | ^^^^^ constructing invalid value: encountered an unaligned reference (required ALIGN byte alignment but found ALIGN) @@ -7,7 +7,7 @@ LL | let _ptr = &*ptr; = 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 = note: BACKTRACE: - = note: inside `main` at $DIR/dyn_alignment.rs:LL:CC + = note: inside `main` at tests/fail/unaligned_pointers/dyn_alignment.rs:LL:CC note: some details are omitted, run with `MIRIFLAGS=-Zmiri-backtrace=full` for a verbose backtrace diff --git a/tests/fail/unaligned_pointers/field_requires_parent_struct_alignment.stderr b/tests/fail/unaligned_pointers/field_requires_parent_struct_alignment.stderr index 9046502975..04ecf618fc 100644 --- a/tests/fail/unaligned_pointers/field_requires_parent_struct_alignment.stderr +++ b/tests/fail/unaligned_pointers/field_requires_parent_struct_alignment.stderr @@ -1,5 +1,5 @@ error: Undefined Behavior: accessing memory based on pointer with alignment ALIGN, but alignment ALIGN is required - --> $DIR/field_requires_parent_struct_alignment.rs:LL:CC + --> tests/fail/unaligned_pointers/field_requires_parent_struct_alignment.rs:LL:CC | LL | unsafe { (*x).x } | ^^^^^^ accessing memory based on pointer with alignment ALIGN, but alignment ALIGN is required @@ -7,9 +7,9 @@ LL | unsafe { (*x).x } = 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 = note: BACKTRACE: - = note: inside `foo` at $DIR/field_requires_parent_struct_alignment.rs:LL:CC + = note: inside `foo` at tests/fail/unaligned_pointers/field_requires_parent_struct_alignment.rs:LL:CC note: inside `main` - --> $DIR/field_requires_parent_struct_alignment.rs:LL:CC + --> tests/fail/unaligned_pointers/field_requires_parent_struct_alignment.rs:LL:CC | LL | foo(odd_ptr.cast()); | ^^^^^^^^^^^^^^^^^^^ diff --git a/tests/fail/unaligned_pointers/field_requires_parent_struct_alignment2.stderr b/tests/fail/unaligned_pointers/field_requires_parent_struct_alignment2.stderr index 0d0057a79a..da5a34a8dc 100644 --- a/tests/fail/unaligned_pointers/field_requires_parent_struct_alignment2.stderr +++ b/tests/fail/unaligned_pointers/field_requires_parent_struct_alignment2.stderr @@ -1,5 +1,5 @@ error: Undefined Behavior: accessing memory based on pointer with alignment ALIGN, but alignment ALIGN is required - --> $DIR/field_requires_parent_struct_alignment2.rs:LL:CC + --> tests/fail/unaligned_pointers/field_requires_parent_struct_alignment2.rs:LL:CC | LL | unsafe { (*x).packed.x } | ^^^^^^^^^^^^^ accessing memory based on pointer with alignment ALIGN, but alignment ALIGN is required @@ -7,9 +7,9 @@ LL | unsafe { (*x).packed.x } = 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 = note: BACKTRACE: - = note: inside `foo` at $DIR/field_requires_parent_struct_alignment2.rs:LL:CC + = note: inside `foo` at tests/fail/unaligned_pointers/field_requires_parent_struct_alignment2.rs:LL:CC note: inside `main` - --> $DIR/field_requires_parent_struct_alignment2.rs:LL:CC + --> tests/fail/unaligned_pointers/field_requires_parent_struct_alignment2.rs:LL:CC | LL | foo(odd_ptr.cast()); | ^^^^^^^^^^^^^^^^^^^ diff --git a/tests/fail/unaligned_pointers/intptrcast_alignment_check.stderr b/tests/fail/unaligned_pointers/intptrcast_alignment_check.stderr index 318004da60..e0e866b25c 100644 --- a/tests/fail/unaligned_pointers/intptrcast_alignment_check.stderr +++ b/tests/fail/unaligned_pointers/intptrcast_alignment_check.stderr @@ -1,5 +1,5 @@ error: Undefined Behavior: accessing memory based on pointer with alignment ALIGN, but alignment ALIGN is required - --> $DIR/intptrcast_alignment_check.rs:LL:CC + --> tests/fail/unaligned_pointers/intptrcast_alignment_check.rs:LL:CC | LL | unsafe { *u16_ptr = 2 }; | ^^^^^^^^^^^^ accessing memory based on pointer with alignment ALIGN, but alignment ALIGN is required @@ -7,7 +7,7 @@ LL | unsafe { *u16_ptr = 2 }; = help: this usually indicates that your program performed an invalid operation and caused Undefined Behavior = help: but due to `-Zmiri-symbolic-alignment-check`, alignment errors can also be false positives = note: BACKTRACE: - = note: inside `main` at $DIR/intptrcast_alignment_check.rs:LL:CC + = note: inside `main` at tests/fail/unaligned_pointers/intptrcast_alignment_check.rs:LL:CC note: some details are omitted, run with `MIRIFLAGS=-Zmiri-backtrace=full` for a verbose backtrace diff --git a/tests/fail/unaligned_pointers/promise_alignment.call_unaligned_ptr.stderr b/tests/fail/unaligned_pointers/promise_alignment.call_unaligned_ptr.stderr index 6d62db4d3d..91df7cf47a 100644 --- a/tests/fail/unaligned_pointers/promise_alignment.call_unaligned_ptr.stderr +++ b/tests/fail/unaligned_pointers/promise_alignment.call_unaligned_ptr.stderr @@ -1,12 +1,12 @@ error: unsupported operation: `miri_promise_symbolic_alignment`: pointer is not actually aligned - --> $DIR/promise_alignment.rs:LL:CC + --> tests/fail/unaligned_pointers/promise_alignment.rs:LL:CC | LL | unsafe { utils::miri_promise_symbolic_alignment(align8.add(1).cast(), 8) }; | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ `miri_promise_symbolic_alignment`: pointer is not actually aligned | = help: this is likely not a bug in the program; it indicates that the program performed an operation that Miri does not support = note: BACKTRACE: - = note: inside `main` at $DIR/promise_alignment.rs:LL:CC + = note: inside `main` at tests/fail/unaligned_pointers/promise_alignment.rs:LL:CC note: some details are omitted, run with `MIRIFLAGS=-Zmiri-backtrace=full` for a verbose backtrace diff --git a/tests/fail/unaligned_pointers/promise_alignment.read_unaligned_ptr.stderr b/tests/fail/unaligned_pointers/promise_alignment.read_unaligned_ptr.stderr index 0842ccd6d5..1e984aa3ef 100644 --- a/tests/fail/unaligned_pointers/promise_alignment.read_unaligned_ptr.stderr +++ b/tests/fail/unaligned_pointers/promise_alignment.read_unaligned_ptr.stderr @@ -1,5 +1,5 @@ error: Undefined Behavior: accessing memory based on pointer with alignment ALIGN, but alignment ALIGN is required - --> $DIR/promise_alignment.rs:LL:CC + --> tests/fail/unaligned_pointers/promise_alignment.rs:LL:CC | LL | let _val = unsafe { align8.cast::().read() }; | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ accessing memory based on pointer with alignment ALIGN, but alignment ALIGN is required @@ -7,7 +7,7 @@ LL | let _val = unsafe { align8.cast::().read() }; = help: this usually indicates that your program performed an invalid operation and caused Undefined Behavior = help: but due to `-Zmiri-symbolic-alignment-check`, alignment errors can also be false positives = note: BACKTRACE: - = note: inside `main` at $DIR/promise_alignment.rs:LL:CC + = note: inside `main` at tests/fail/unaligned_pointers/promise_alignment.rs:LL:CC note: some details are omitted, run with `MIRIFLAGS=-Zmiri-backtrace=full` for a verbose backtrace diff --git a/tests/fail/unaligned_pointers/promise_alignment_zero.stderr b/tests/fail/unaligned_pointers/promise_alignment_zero.stderr index 3f7ced0b40..c687d99861 100644 --- a/tests/fail/unaligned_pointers/promise_alignment_zero.stderr +++ b/tests/fail/unaligned_pointers/promise_alignment_zero.stderr @@ -1,12 +1,12 @@ error: unsupported operation: `miri_promise_symbolic_alignment`: alignment must be a power of 2, got 0 - --> $DIR/promise_alignment_zero.rs:LL:CC + --> tests/fail/unaligned_pointers/promise_alignment_zero.rs:LL:CC | LL | unsafe { utils::miri_promise_symbolic_alignment(buffer.as_ptr().cast(), 0) }; | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ `miri_promise_symbolic_alignment`: alignment must be a power of 2, got 0 | = help: this is likely not a bug in the program; it indicates that the program performed an operation that Miri does not support = note: BACKTRACE: - = note: inside `main` at $DIR/promise_alignment_zero.rs:LL:CC + = note: inside `main` at tests/fail/unaligned_pointers/promise_alignment_zero.rs:LL:CC note: some details are omitted, run with `MIRIFLAGS=-Zmiri-backtrace=full` for a verbose backtrace diff --git a/tests/fail/unaligned_pointers/reference_to_packed.stderr b/tests/fail/unaligned_pointers/reference_to_packed.stderr index 938a037572..9adbd7f815 100644 --- a/tests/fail/unaligned_pointers/reference_to_packed.stderr +++ b/tests/fail/unaligned_pointers/reference_to_packed.stderr @@ -1,5 +1,5 @@ error: Undefined Behavior: constructing invalid value: encountered an unaligned reference (required ALIGN byte alignment but found ALIGN) - --> $DIR/reference_to_packed.rs:LL:CC + --> tests/fail/unaligned_pointers/reference_to_packed.rs:LL:CC | LL | mem::transmute(x) | ^^^^^^^^^^^^^^^^^ constructing invalid value: encountered an unaligned reference (required ALIGN byte alignment but found ALIGN) @@ -7,9 +7,9 @@ LL | mem::transmute(x) = 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 = note: BACKTRACE: - = note: inside `raw_to_ref::<'_, i32>` at $DIR/reference_to_packed.rs:LL:CC + = note: inside `raw_to_ref::<'_, i32>` at tests/fail/unaligned_pointers/reference_to_packed.rs:LL:CC note: inside `main` - --> $DIR/reference_to_packed.rs:LL:CC + --> tests/fail/unaligned_pointers/reference_to_packed.rs:LL:CC | LL | let p: &i32 = unsafe { raw_to_ref(ptr::addr_of!(foo.x)) }; | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ diff --git a/tests/fail/unaligned_pointers/unaligned_ptr1.stderr b/tests/fail/unaligned_pointers/unaligned_ptr1.stderr index ae3be1ed3a..90cfb4245c 100644 --- a/tests/fail/unaligned_pointers/unaligned_ptr1.stderr +++ b/tests/fail/unaligned_pointers/unaligned_ptr1.stderr @@ -1,5 +1,5 @@ error: Undefined Behavior: accessing memory based on pointer with alignment ALIGN, but alignment ALIGN is required - --> $DIR/unaligned_ptr1.rs:LL:CC + --> tests/fail/unaligned_pointers/unaligned_ptr1.rs:LL:CC | LL | let _x = unsafe { *x }; | ^^ accessing memory based on pointer with alignment ALIGN, but alignment ALIGN is required @@ -7,7 +7,7 @@ LL | let _x = unsafe { *x }; = 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 = note: BACKTRACE: - = note: inside `main` at $DIR/unaligned_ptr1.rs:LL:CC + = note: inside `main` at tests/fail/unaligned_pointers/unaligned_ptr1.rs:LL:CC note: some details are omitted, run with `MIRIFLAGS=-Zmiri-backtrace=full` for a verbose backtrace diff --git a/tests/fail/unaligned_pointers/unaligned_ptr2.stderr b/tests/fail/unaligned_pointers/unaligned_ptr2.stderr index 2b92602749..57ac855393 100644 --- a/tests/fail/unaligned_pointers/unaligned_ptr2.stderr +++ b/tests/fail/unaligned_pointers/unaligned_ptr2.stderr @@ -1,5 +1,5 @@ error: Undefined Behavior: accessing memory based on pointer with alignment ALIGN, but alignment ALIGN is required - --> $DIR/unaligned_ptr2.rs:LL:CC + --> tests/fail/unaligned_pointers/unaligned_ptr2.rs:LL:CC | LL | let _x = unsafe { *x }; | ^^ accessing memory based on pointer with alignment ALIGN, but alignment ALIGN is required @@ -7,7 +7,7 @@ LL | let _x = unsafe { *x }; = 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 = note: BACKTRACE: - = note: inside `main` at $DIR/unaligned_ptr2.rs:LL:CC + = note: inside `main` at tests/fail/unaligned_pointers/unaligned_ptr2.rs:LL:CC note: some details are omitted, run with `MIRIFLAGS=-Zmiri-backtrace=full` for a verbose backtrace diff --git a/tests/fail/unaligned_pointers/unaligned_ptr3.stderr b/tests/fail/unaligned_pointers/unaligned_ptr3.stderr index 5ac4e23bf0..d8ab546af6 100644 --- a/tests/fail/unaligned_pointers/unaligned_ptr3.stderr +++ b/tests/fail/unaligned_pointers/unaligned_ptr3.stderr @@ -1,5 +1,5 @@ error: Undefined Behavior: accessing memory based on pointer with alignment ALIGN, but alignment ALIGN is required - --> $DIR/unaligned_ptr3.rs:LL:CC + --> tests/fail/unaligned_pointers/unaligned_ptr3.rs:LL:CC | LL | let _x = unsafe { *x }; | ^^ accessing memory based on pointer with alignment ALIGN, but alignment ALIGN is required @@ -7,7 +7,7 @@ LL | let _x = unsafe { *x }; = 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 = note: BACKTRACE: - = note: inside `main` at $DIR/unaligned_ptr3.rs:LL:CC + = note: inside `main` at tests/fail/unaligned_pointers/unaligned_ptr3.rs:LL:CC note: some details are omitted, run with `MIRIFLAGS=-Zmiri-backtrace=full` for a verbose backtrace diff --git a/tests/fail/unaligned_pointers/unaligned_ptr4.stderr b/tests/fail/unaligned_pointers/unaligned_ptr4.stderr index 4de90118b4..5fe342c9b3 100644 --- a/tests/fail/unaligned_pointers/unaligned_ptr4.stderr +++ b/tests/fail/unaligned_pointers/unaligned_ptr4.stderr @@ -1,5 +1,5 @@ error: Undefined Behavior: accessing memory based on pointer with alignment ALIGN, but alignment ALIGN is required - --> $DIR/unaligned_ptr4.rs:LL:CC + --> tests/fail/unaligned_pointers/unaligned_ptr4.rs:LL:CC | LL | let _val = unsafe { *ptr }; | ^^^^ accessing memory based on pointer with alignment ALIGN, but alignment ALIGN is required @@ -7,7 +7,7 @@ LL | let _val = unsafe { *ptr }; = 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 = note: BACKTRACE: - = note: inside `main` at $DIR/unaligned_ptr4.rs:LL:CC + = note: inside `main` at tests/fail/unaligned_pointers/unaligned_ptr4.rs:LL:CC note: some details are omitted, run with `MIRIFLAGS=-Zmiri-backtrace=full` for a verbose backtrace diff --git a/tests/fail/unaligned_pointers/unaligned_ptr_zst.stderr b/tests/fail/unaligned_pointers/unaligned_ptr_zst.stderr index 72db125074..1ae8d95488 100644 --- a/tests/fail/unaligned_pointers/unaligned_ptr_zst.stderr +++ b/tests/fail/unaligned_pointers/unaligned_ptr_zst.stderr @@ -1,5 +1,5 @@ error: Undefined Behavior: accessing memory based on pointer with alignment ALIGN, but alignment ALIGN is required - --> $DIR/unaligned_ptr_zst.rs:LL:CC + --> tests/fail/unaligned_pointers/unaligned_ptr_zst.rs:LL:CC | LL | let _x = unsafe { *x }; | ^^ accessing memory based on pointer with alignment ALIGN, but alignment ALIGN is required @@ -7,7 +7,7 @@ LL | let _x = unsafe { *x }; = 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 = note: BACKTRACE: - = note: inside `main` at $DIR/unaligned_ptr_zst.rs:LL:CC + = note: inside `main` at tests/fail/unaligned_pointers/unaligned_ptr_zst.rs:LL:CC note: some details are omitted, run with `MIRIFLAGS=-Zmiri-backtrace=full` for a verbose backtrace diff --git a/tests/fail/unaligned_pointers/unaligned_ref_addr_of.stderr b/tests/fail/unaligned_pointers/unaligned_ref_addr_of.stderr index 448023a2a3..d7561c57a8 100644 --- a/tests/fail/unaligned_pointers/unaligned_ref_addr_of.stderr +++ b/tests/fail/unaligned_pointers/unaligned_ref_addr_of.stderr @@ -1,5 +1,5 @@ error: Undefined Behavior: constructing invalid value: encountered an unaligned reference (required ALIGN byte alignment but found ALIGN) - --> $DIR/unaligned_ref_addr_of.rs:LL:CC + --> tests/fail/unaligned_pointers/unaligned_ref_addr_of.rs:LL:CC | LL | let _x = unsafe { &*x }; | ^^^ constructing invalid value: encountered an unaligned reference (required ALIGN byte alignment but found ALIGN) @@ -7,7 +7,7 @@ LL | let _x = unsafe { &*x }; = 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 = note: BACKTRACE: - = note: inside `main` at $DIR/unaligned_ref_addr_of.rs:LL:CC + = note: inside `main` at tests/fail/unaligned_pointers/unaligned_ref_addr_of.rs:LL:CC note: some details are omitted, run with `MIRIFLAGS=-Zmiri-backtrace=full` for a verbose backtrace diff --git a/tests/fail/uninit/uninit-after-aggregate-assign.stderr b/tests/fail/uninit/uninit-after-aggregate-assign.stderr index 5f3d9bde1f..ec6ba3fea7 100644 --- a/tests/fail/uninit/uninit-after-aggregate-assign.stderr +++ b/tests/fail/uninit/uninit-after-aggregate-assign.stderr @@ -1,5 +1,5 @@ error: Undefined Behavior: constructing invalid value at [1]: encountered uninitialized memory, but expected an integer - --> $DIR/uninit-after-aggregate-assign.rs:LL:CC + --> tests/fail/uninit/uninit-after-aggregate-assign.rs:LL:CC | LL | _val = *sptr2; // should hence be UB | ^^^^^^^^^^^^^ constructing invalid value at [1]: encountered uninitialized memory, but expected an integer @@ -7,7 +7,7 @@ LL | _val = *sptr2; // should hence be UB = 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 = note: BACKTRACE: - = note: inside `main` at $DIR/uninit-after-aggregate-assign.rs:LL:CC + = note: inside `main` at tests/fail/uninit/uninit-after-aggregate-assign.rs:LL:CC note: some details are omitted, run with `MIRIFLAGS=-Zmiri-backtrace=full` for a verbose backtrace diff --git a/tests/fail/uninit/uninit_alloc_diagnostic.stderr b/tests/fail/uninit/uninit_alloc_diagnostic.stderr index dfe3ed4b52..0996e5d11e 100644 --- a/tests/fail/uninit/uninit_alloc_diagnostic.stderr +++ b/tests/fail/uninit/uninit_alloc_diagnostic.stderr @@ -10,7 +10,7 @@ LL | let mut order = unsafe { compare_bytes(left, right, len) as isize } = note: inside `::compare` at RUSTLIB/core/src/slice/cmp.rs:LL:CC = note: inside `core::slice::cmp::::cmp` at RUSTLIB/core/src/slice/cmp.rs:LL:CC note: inside `main` - --> $DIR/uninit_alloc_diagnostic.rs:LL:CC + --> tests/fail/uninit/uninit_alloc_diagnostic.rs:LL:CC | LL | drop(slice1.cmp(slice2)); | ^^^^^^^^^^^^^^^^^^ diff --git a/tests/fail/uninit/uninit_alloc_diagnostic_with_provenance.stderr b/tests/fail/uninit/uninit_alloc_diagnostic_with_provenance.stderr index 48ce9ae765..bcde9377c5 100644 --- a/tests/fail/uninit/uninit_alloc_diagnostic_with_provenance.stderr +++ b/tests/fail/uninit/uninit_alloc_diagnostic_with_provenance.stderr @@ -10,7 +10,7 @@ LL | let mut order = unsafe { compare_bytes(left, right, len) as isize } = note: inside `::compare` at RUSTLIB/core/src/slice/cmp.rs:LL:CC = note: inside `core::slice::cmp::::cmp` at RUSTLIB/core/src/slice/cmp.rs:LL:CC note: inside `main` - --> $DIR/uninit_alloc_diagnostic_with_provenance.rs:LL:CC + --> tests/fail/uninit/uninit_alloc_diagnostic_with_provenance.rs:LL:CC | LL | drop(slice1.cmp(slice2)); | ^^^^^^^^^^^^^^^^^^ diff --git a/tests/fail/uninit/uninit_byte_read.stderr b/tests/fail/uninit/uninit_byte_read.stderr index 3917d86828..5da89976b0 100644 --- a/tests/fail/uninit/uninit_byte_read.stderr +++ b/tests/fail/uninit/uninit_byte_read.stderr @@ -1,5 +1,5 @@ error: Undefined Behavior: using uninitialized data, but this operation requires initialized memory - --> $DIR/uninit_byte_read.rs:LL:CC + --> tests/fail/uninit/uninit_byte_read.rs:LL:CC | LL | let undef = unsafe { *v.as_ptr().add(5) }; | ^^^^^^^^^^^^^^^^^^ using uninitialized data, but this operation requires initialized memory @@ -7,7 +7,7 @@ LL | let undef = unsafe { *v.as_ptr().add(5) }; = 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 = note: BACKTRACE: - = note: inside `main` at $DIR/uninit_byte_read.rs:LL:CC + = note: inside `main` at tests/fail/uninit/uninit_byte_read.rs:LL:CC note: some details are omitted, run with `MIRIFLAGS=-Zmiri-backtrace=full` for a verbose backtrace diff --git a/tests/fail/unreachable.stderr b/tests/fail/unreachable.stderr index f6982dc865..46c956ff77 100644 --- a/tests/fail/unreachable.stderr +++ b/tests/fail/unreachable.stderr @@ -1,5 +1,5 @@ error: Undefined Behavior: entering unreachable code - --> $DIR/unreachable.rs:LL:CC + --> tests/fail/unreachable.rs:LL:CC | LL | unsafe { std::hint::unreachable_unchecked() } | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ entering unreachable code @@ -7,7 +7,7 @@ LL | unsafe { std::hint::unreachable_unchecked() } = 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 = note: BACKTRACE: - = note: inside `main` at $DIR/unreachable.rs:LL:CC + = note: inside `main` at tests/fail/unreachable.rs:LL:CC note: some details are omitted, run with `MIRIFLAGS=-Zmiri-backtrace=full` for a verbose backtrace diff --git a/tests/fail/unsized-local.stderr b/tests/fail/unsized-local.stderr index df54c98bb0..548f3d66c7 100644 --- a/tests/fail/unsized-local.stderr +++ b/tests/fail/unsized-local.stderr @@ -1,12 +1,12 @@ error: unsupported operation: unsized locals are not supported - --> $DIR/unsized-local.rs:LL:CC + --> tests/fail/unsized-local.rs:LL:CC | LL | let x = *(Box::new(A) as Box); | ^ unsized locals are not supported | = help: this is likely not a bug in the program; it indicates that the program performed an operation that Miri does not support = note: BACKTRACE: - = note: inside `main` at $DIR/unsized-local.rs:LL:CC + = note: inside `main` at tests/fail/unsized-local.rs:LL:CC note: some details are omitted, run with `MIRIFLAGS=-Zmiri-backtrace=full` for a verbose backtrace diff --git a/tests/fail/unsupported_foreign_function.stderr b/tests/fail/unsupported_foreign_function.stderr index f392e9564c..4fe45b0868 100644 --- a/tests/fail/unsupported_foreign_function.stderr +++ b/tests/fail/unsupported_foreign_function.stderr @@ -1,5 +1,5 @@ error: unsupported operation: can't call foreign function `foo` on $OS - --> $DIR/unsupported_foreign_function.rs:LL:CC + --> tests/fail/unsupported_foreign_function.rs:LL:CC | LL | foo(); | ^^^^^ can't call foreign function `foo` on $OS @@ -7,7 +7,7 @@ LL | foo(); = help: if this is a basic API commonly used on this target, please report an issue with Miri = help: however, note that Miri does not aim to support every FFI function out there; for instance, we will not support APIs for things such as GUIs, scripting languages, or databases = note: BACKTRACE: - = note: inside `main` at $DIR/unsupported_foreign_function.rs:LL:CC + = note: inside `main` at tests/fail/unsupported_foreign_function.rs:LL:CC note: some details are omitted, run with `MIRIFLAGS=-Zmiri-backtrace=full` for a verbose backtrace diff --git a/tests/fail/unwind-action-terminate.stderr b/tests/fail/unwind-action-terminate.stderr index fd67bdf4a9..8183712205 100644 --- a/tests/fail/unwind-action-terminate.stderr +++ b/tests/fail/unwind-action-terminate.stderr @@ -1,4 +1,4 @@ -thread 'main' panicked at $DIR/unwind-action-terminate.rs:LL:CC: +thread 'main' panicked at tests/fail/unwind-action-terminate.rs:LL:CC: explicit panic 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 @@ -21,14 +21,14 @@ LL | ABORT(); = note: inside `core::panicking::panic_nounwind` at RUSTLIB/core/src/panicking.rs:LL:CC = note: inside `core::panicking::panic_cannot_unwind` at RUSTLIB/core/src/panicking.rs:LL:CC note: inside `panic_abort` - --> $DIR/unwind-action-terminate.rs:LL:CC + --> tests/fail/unwind-action-terminate.rs:LL:CC | LL | / extern "C" fn panic_abort() { LL | | panic!() LL | | } | |_^ note: inside `main` - --> $DIR/unwind-action-terminate.rs:LL:CC + --> tests/fail/unwind-action-terminate.rs:LL:CC | LL | panic_abort(); | ^ diff --git a/tests/fail/validity/cast_fn_ptr_invalid_callee_arg.stderr b/tests/fail/validity/cast_fn_ptr_invalid_callee_arg.stderr index f526f77a4f..9b6b7098e5 100644 --- a/tests/fail/validity/cast_fn_ptr_invalid_callee_arg.stderr +++ b/tests/fail/validity/cast_fn_ptr_invalid_callee_arg.stderr @@ -1,5 +1,5 @@ error: Undefined Behavior: constructing invalid value: encountered a null reference - --> $DIR/cast_fn_ptr_invalid_callee_arg.rs:LL:CC + --> tests/fail/validity/cast_fn_ptr_invalid_callee_arg.rs:LL:CC | LL | g(0usize as *const i32) | ^^^^^^^^^^^^^^^^^^^^^^^ constructing invalid value: encountered a null reference @@ -7,7 +7,7 @@ LL | g(0usize as *const i32) = 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 = note: BACKTRACE: - = note: inside `main` at $DIR/cast_fn_ptr_invalid_callee_arg.rs:LL:CC + = note: inside `main` at tests/fail/validity/cast_fn_ptr_invalid_callee_arg.rs:LL:CC note: some details are omitted, run with `MIRIFLAGS=-Zmiri-backtrace=full` for a verbose backtrace diff --git a/tests/fail/validity/cast_fn_ptr_invalid_callee_ret.stderr b/tests/fail/validity/cast_fn_ptr_invalid_callee_ret.stderr index 35de453522..a0b7cc7a52 100644 --- a/tests/fail/validity/cast_fn_ptr_invalid_callee_ret.stderr +++ b/tests/fail/validity/cast_fn_ptr_invalid_callee_ret.stderr @@ -1,5 +1,5 @@ error: Undefined Behavior: constructing invalid value at .0: encountered 0, but expected something greater or equal to 1 - --> $DIR/cast_fn_ptr_invalid_callee_ret.rs:LL:CC + --> tests/fail/validity/cast_fn_ptr_invalid_callee_ret.rs:LL:CC | LL | f(); | ^^^ constructing invalid value at .0: encountered 0, but expected something greater or equal to 1 @@ -7,7 +7,7 @@ LL | f(); = 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 = note: BACKTRACE: - = note: inside `main` at $DIR/cast_fn_ptr_invalid_callee_ret.rs:LL:CC + = note: inside `main` at tests/fail/validity/cast_fn_ptr_invalid_callee_ret.rs:LL:CC note: some details are omitted, run with `MIRIFLAGS=-Zmiri-backtrace=full` for a verbose backtrace diff --git a/tests/fail/validity/cast_fn_ptr_invalid_caller_arg.stderr b/tests/fail/validity/cast_fn_ptr_invalid_caller_arg.stderr index 81d775f6d7..6af0e72b9c 100644 --- a/tests/fail/validity/cast_fn_ptr_invalid_caller_arg.stderr +++ b/tests/fail/validity/cast_fn_ptr_invalid_caller_arg.stderr @@ -1,5 +1,5 @@ error: Undefined Behavior: constructing invalid value at .0: encountered 0, but expected something greater or equal to 1 - --> $DIR/cast_fn_ptr_invalid_caller_arg.rs:LL:CC + --> tests/fail/validity/cast_fn_ptr_invalid_caller_arg.rs:LL:CC | LL | Call(_res = f(*ptr), ReturnTo(retblock), UnwindContinue()) | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ constructing invalid value at .0: encountered 0, but expected something greater or equal to 1 @@ -7,9 +7,9 @@ LL | Call(_res = f(*ptr), ReturnTo(retblock), UnwindContinue()) = 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 = note: BACKTRACE: - = note: inside `call` at $DIR/cast_fn_ptr_invalid_caller_arg.rs:LL:CC + = note: inside `call` at tests/fail/validity/cast_fn_ptr_invalid_caller_arg.rs:LL:CC note: inside `main` - --> $DIR/cast_fn_ptr_invalid_caller_arg.rs:LL:CC + --> tests/fail/validity/cast_fn_ptr_invalid_caller_arg.rs:LL:CC | LL | call(f); | ^^^^^^^ diff --git a/tests/fail/validity/cast_fn_ptr_invalid_caller_ret.stderr b/tests/fail/validity/cast_fn_ptr_invalid_caller_ret.stderr index 7593b8a399..c02651c7cc 100644 --- a/tests/fail/validity/cast_fn_ptr_invalid_caller_ret.stderr +++ b/tests/fail/validity/cast_fn_ptr_invalid_caller_ret.stderr @@ -1,5 +1,5 @@ error: Undefined Behavior: constructing invalid value: encountered a null reference - --> $DIR/cast_fn_ptr_invalid_caller_ret.rs:LL:CC + --> tests/fail/validity/cast_fn_ptr_invalid_caller_ret.rs:LL:CC | LL | let _x = g(); | ^^^ constructing invalid value: encountered a null reference @@ -7,7 +7,7 @@ LL | let _x = g(); = 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 = note: BACKTRACE: - = note: inside `main` at $DIR/cast_fn_ptr_invalid_caller_ret.rs:LL:CC + = note: inside `main` at tests/fail/validity/cast_fn_ptr_invalid_caller_ret.rs:LL:CC note: some details are omitted, run with `MIRIFLAGS=-Zmiri-backtrace=full` for a verbose backtrace diff --git a/tests/fail/validity/dangling_ref1.stderr b/tests/fail/validity/dangling_ref1.stderr index fd4dd502bd..09634e5ae7 100644 --- a/tests/fail/validity/dangling_ref1.stderr +++ b/tests/fail/validity/dangling_ref1.stderr @@ -1,5 +1,5 @@ error: Undefined Behavior: constructing invalid value: encountered a dangling reference (0x10[noalloc] has no provenance) - --> $DIR/dangling_ref1.rs:LL:CC + --> tests/fail/validity/dangling_ref1.rs:LL:CC | LL | let _x: &i32 = unsafe { mem::transmute(16usize) }; | ^^^^^^^^^^^^^^^^^^^^^^^ constructing invalid value: encountered a dangling reference (0x10[noalloc] has no provenance) @@ -7,7 +7,7 @@ LL | let _x: &i32 = unsafe { mem::transmute(16usize) }; = 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 = note: BACKTRACE: - = note: inside `main` at $DIR/dangling_ref1.rs:LL:CC + = note: inside `main` at tests/fail/validity/dangling_ref1.rs:LL:CC note: some details are omitted, run with `MIRIFLAGS=-Zmiri-backtrace=full` for a verbose backtrace diff --git a/tests/fail/validity/dangling_ref2.stderr b/tests/fail/validity/dangling_ref2.stderr index 2d45ae68ca..fe7fe2795e 100644 --- a/tests/fail/validity/dangling_ref2.stderr +++ b/tests/fail/validity/dangling_ref2.stderr @@ -1,5 +1,5 @@ error: Undefined Behavior: constructing invalid value: encountered a dangling reference (going beyond the bounds of its allocation) - --> $DIR/dangling_ref2.rs:LL:CC + --> tests/fail/validity/dangling_ref2.rs:LL:CC | LL | let _x: &i32 = unsafe { mem::transmute(ptr) }; | ^^^^^^^^^^^^^^^^^^^ constructing invalid value: encountered a dangling reference (going beyond the bounds of its allocation) @@ -7,7 +7,7 @@ LL | let _x: &i32 = unsafe { mem::transmute(ptr) }; = 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 = note: BACKTRACE: - = note: inside `main` at $DIR/dangling_ref2.rs:LL:CC + = note: inside `main` at tests/fail/validity/dangling_ref2.rs:LL:CC note: some details are omitted, run with `MIRIFLAGS=-Zmiri-backtrace=full` for a verbose backtrace diff --git a/tests/fail/validity/dangling_ref3.stderr b/tests/fail/validity/dangling_ref3.stderr index 5ac4f5deff..fe40aaa122 100644 --- a/tests/fail/validity/dangling_ref3.stderr +++ b/tests/fail/validity/dangling_ref3.stderr @@ -1,5 +1,5 @@ error: Undefined Behavior: constructing invalid value: encountered a dangling reference (use-after-free) - --> $DIR/dangling_ref3.rs:LL:CC + --> tests/fail/validity/dangling_ref3.rs:LL:CC | LL | let _x: &i32 = unsafe { mem::transmute(dangling()) }; | ^^^^^^^^^^^^^^^^^^^^^^^^^^ constructing invalid value: encountered a dangling reference (use-after-free) @@ -7,7 +7,7 @@ LL | let _x: &i32 = unsafe { mem::transmute(dangling()) }; = 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 = note: BACKTRACE: - = note: inside `main` at $DIR/dangling_ref3.rs:LL:CC + = note: inside `main` at tests/fail/validity/dangling_ref3.rs:LL:CC note: some details are omitted, run with `MIRIFLAGS=-Zmiri-backtrace=full` for a verbose backtrace diff --git a/tests/fail/validity/invalid_bool.stderr b/tests/fail/validity/invalid_bool.stderr index 3ed823dde9..9bed0f716a 100644 --- a/tests/fail/validity/invalid_bool.stderr +++ b/tests/fail/validity/invalid_bool.stderr @@ -1,5 +1,5 @@ error: Undefined Behavior: constructing invalid value: encountered 0x02, but expected a boolean - --> $DIR/invalid_bool.rs:LL:CC + --> tests/fail/validity/invalid_bool.rs:LL:CC | LL | let _b = unsafe { std::mem::transmute::(2) }; | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ constructing invalid value: encountered 0x02, but expected a boolean @@ -7,7 +7,7 @@ LL | let _b = unsafe { std::mem::transmute::(2) }; = 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 = note: BACKTRACE: - = note: inside `main` at $DIR/invalid_bool.rs:LL:CC + = note: inside `main` at tests/fail/validity/invalid_bool.rs:LL:CC note: some details are omitted, run with `MIRIFLAGS=-Zmiri-backtrace=full` for a verbose backtrace diff --git a/tests/fail/validity/invalid_bool_op.stderr b/tests/fail/validity/invalid_bool_op.stderr index b938d29e76..ee84762fe4 100644 --- a/tests/fail/validity/invalid_bool_op.stderr +++ b/tests/fail/validity/invalid_bool_op.stderr @@ -1,5 +1,5 @@ error: Undefined Behavior: interpreting an invalid 8-bit value as a bool: 0x02 - --> $DIR/invalid_bool_op.rs:LL:CC + --> tests/fail/validity/invalid_bool_op.rs:LL:CC | LL | let _x = b == std::hint::black_box(true); | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ interpreting an invalid 8-bit value as a bool: 0x02 @@ -7,7 +7,7 @@ LL | let _x = b == std::hint::black_box(true); = 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 = note: BACKTRACE: - = note: inside `main` at $DIR/invalid_bool_op.rs:LL:CC + = note: inside `main` at tests/fail/validity/invalid_bool_op.rs:LL:CC note: some details are omitted, run with `MIRIFLAGS=-Zmiri-backtrace=full` for a verbose backtrace diff --git a/tests/fail/validity/invalid_bool_uninit.stderr b/tests/fail/validity/invalid_bool_uninit.stderr index 314416766a..487e3714b7 100644 --- a/tests/fail/validity/invalid_bool_uninit.stderr +++ b/tests/fail/validity/invalid_bool_uninit.stderr @@ -1,5 +1,5 @@ error: Undefined Behavior: constructing invalid value at [0]: encountered uninitialized memory, but expected a boolean - --> $DIR/invalid_bool_uninit.rs:LL:CC + --> tests/fail/validity/invalid_bool_uninit.rs:LL:CC | LL | let _b = unsafe { MyUninit { init: () }.uninit }; | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ constructing invalid value at [0]: encountered uninitialized memory, but expected a boolean @@ -7,7 +7,7 @@ LL | let _b = unsafe { MyUninit { init: () }.uninit }; = 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 = note: BACKTRACE: - = note: inside `main` at $DIR/invalid_bool_uninit.rs:LL:CC + = note: inside `main` at tests/fail/validity/invalid_bool_uninit.rs:LL:CC note: some details are omitted, run with `MIRIFLAGS=-Zmiri-backtrace=full` for a verbose backtrace diff --git a/tests/fail/validity/invalid_char.stderr b/tests/fail/validity/invalid_char.stderr index c761669c6d..5d258176cb 100644 --- a/tests/fail/validity/invalid_char.stderr +++ b/tests/fail/validity/invalid_char.stderr @@ -1,5 +1,5 @@ error: Undefined Behavior: constructing invalid value: encountered $HEX, but expected a valid unicode scalar value (in `0..=$HEX` but not in `$HEX..=$HEX`) - --> $DIR/invalid_char.rs:LL:CC + --> tests/fail/validity/invalid_char.rs:LL:CC | LL | let _val = match unsafe { std::mem::transmute::(-1) } { | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ constructing invalid value: encountered $HEX, but expected a valid unicode scalar value (in `0..=$HEX` but not in `$HEX..=$HEX`) @@ -7,7 +7,7 @@ LL | let _val = match unsafe { std::mem::transmute::(-1) } { = 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 = note: BACKTRACE: - = note: inside `main` at $DIR/invalid_char.rs:LL:CC + = note: inside `main` at tests/fail/validity/invalid_char.rs:LL:CC note: some details are omitted, run with `MIRIFLAGS=-Zmiri-backtrace=full` for a verbose backtrace diff --git a/tests/fail/validity/invalid_char_cast.stderr b/tests/fail/validity/invalid_char_cast.stderr index 1b5c838cf4..b88f9f7720 100644 --- a/tests/fail/validity/invalid_char_cast.stderr +++ b/tests/fail/validity/invalid_char_cast.stderr @@ -1,5 +1,5 @@ error: Undefined Behavior: interpreting an invalid 32-bit value as a char: $HEX - --> $DIR/invalid_char_cast.rs:LL:CC + --> tests/fail/validity/invalid_char_cast.rs:LL:CC | LL | RET = *ptr as u32; | ^^^^^^^^^^^^^^^^^ interpreting an invalid 32-bit value as a char: $HEX @@ -7,9 +7,9 @@ LL | RET = *ptr as u32; = 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 = note: BACKTRACE: - = note: inside `cast` at $DIR/invalid_char_cast.rs:LL:CC + = note: inside `cast` at tests/fail/validity/invalid_char_cast.rs:LL:CC note: inside `main` - --> $DIR/invalid_char_cast.rs:LL:CC + --> tests/fail/validity/invalid_char_cast.rs:LL:CC | LL | cast(&v as *const u32 as *const char); | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ diff --git a/tests/fail/validity/invalid_char_match.stderr b/tests/fail/validity/invalid_char_match.stderr index 7706ed9731..9ce1631e67 100644 --- a/tests/fail/validity/invalid_char_match.stderr +++ b/tests/fail/validity/invalid_char_match.stderr @@ -1,5 +1,5 @@ error: Undefined Behavior: interpreting an invalid 32-bit value as a char: $HEX - --> $DIR/invalid_char_match.rs:LL:CC + --> tests/fail/validity/invalid_char_match.rs:LL:CC | LL | / match *ptr { LL | | '0' => ret, @@ -10,9 +10,9 @@ LL | | } = 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 = note: BACKTRACE: - = note: inside `switch_int` at $DIR/invalid_char_match.rs:LL:CC + = note: inside `switch_int` at tests/fail/validity/invalid_char_match.rs:LL:CC note: inside `main` - --> $DIR/invalid_char_match.rs:LL:CC + --> tests/fail/validity/invalid_char_match.rs:LL:CC | LL | switch_int(&v as *const u32 as *const char); | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ diff --git a/tests/fail/validity/invalid_char_op.stderr b/tests/fail/validity/invalid_char_op.stderr index 113eecd9cf..2d84ef3dda 100644 --- a/tests/fail/validity/invalid_char_op.stderr +++ b/tests/fail/validity/invalid_char_op.stderr @@ -1,5 +1,5 @@ error: Undefined Behavior: interpreting an invalid 32-bit value as a char: $HEX - --> $DIR/invalid_char_op.rs:LL:CC + --> tests/fail/validity/invalid_char_op.rs:LL:CC | LL | let _x = c == 'x'; | ^^^^^^^^ interpreting an invalid 32-bit value as a char: $HEX @@ -7,7 +7,7 @@ LL | let _x = c == 'x'; = 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 = note: BACKTRACE: - = note: inside `main` at $DIR/invalid_char_op.rs:LL:CC + = note: inside `main` at tests/fail/validity/invalid_char_op.rs:LL:CC note: some details are omitted, run with `MIRIFLAGS=-Zmiri-backtrace=full` for a verbose backtrace diff --git a/tests/fail/validity/invalid_char_uninit.stderr b/tests/fail/validity/invalid_char_uninit.stderr index 34babac4dd..6fd311df5e 100644 --- a/tests/fail/validity/invalid_char_uninit.stderr +++ b/tests/fail/validity/invalid_char_uninit.stderr @@ -1,5 +1,5 @@ error: Undefined Behavior: constructing invalid value at [0]: encountered uninitialized memory, but expected a unicode scalar value - --> $DIR/invalid_char_uninit.rs:LL:CC + --> tests/fail/validity/invalid_char_uninit.rs:LL:CC | LL | let _b = unsafe { MyUninit { init: () }.uninit }; | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ constructing invalid value at [0]: encountered uninitialized memory, but expected a unicode scalar value @@ -7,7 +7,7 @@ LL | let _b = unsafe { MyUninit { init: () }.uninit }; = 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 = note: BACKTRACE: - = note: inside `main` at $DIR/invalid_char_uninit.rs:LL:CC + = note: inside `main` at tests/fail/validity/invalid_char_uninit.rs:LL:CC note: some details are omitted, run with `MIRIFLAGS=-Zmiri-backtrace=full` for a verbose backtrace diff --git a/tests/fail/validity/invalid_enum_cast.stderr b/tests/fail/validity/invalid_enum_cast.stderr index 30afb5e808..0736dfb2df 100644 --- a/tests/fail/validity/invalid_enum_cast.stderr +++ b/tests/fail/validity/invalid_enum_cast.stderr @@ -1,5 +1,5 @@ error: Undefined Behavior: enum value has invalid tag: 0xff - --> $DIR/invalid_enum_cast.rs:LL:CC + --> tests/fail/validity/invalid_enum_cast.rs:LL:CC | LL | let _val = *ptr as u32; | ^^^^^^^^^^^ enum value has invalid tag: 0xff @@ -7,9 +7,9 @@ LL | let _val = *ptr as u32; = 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 = note: BACKTRACE: - = note: inside `cast` at $DIR/invalid_enum_cast.rs:LL:CC + = note: inside `cast` at tests/fail/validity/invalid_enum_cast.rs:LL:CC note: inside `main` - --> $DIR/invalid_enum_cast.rs:LL:CC + --> tests/fail/validity/invalid_enum_cast.rs:LL:CC | LL | cast(&v as *const u32 as *const E); | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ diff --git a/tests/fail/validity/invalid_enum_op.stderr b/tests/fail/validity/invalid_enum_op.stderr index e7997689c5..d2cfa86de8 100644 --- a/tests/fail/validity/invalid_enum_op.stderr +++ b/tests/fail/validity/invalid_enum_op.stderr @@ -1,5 +1,5 @@ error: Undefined Behavior: enum value has invalid tag: $HEX - --> $DIR/invalid_enum_op.rs:LL:CC + --> tests/fail/validity/invalid_enum_op.rs:LL:CC | LL | let _val = mem::discriminant(&f); | ^^^^^^^^^^^^^^^^^^^^^ enum value has invalid tag: $HEX @@ -7,7 +7,7 @@ LL | let _val = mem::discriminant(&f); = 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 = note: BACKTRACE: - = note: inside `main` at $DIR/invalid_enum_op.rs:LL:CC + = note: inside `main` at tests/fail/validity/invalid_enum_op.rs:LL:CC note: some details are omitted, run with `MIRIFLAGS=-Zmiri-backtrace=full` for a verbose backtrace diff --git a/tests/fail/validity/invalid_enum_tag.stderr b/tests/fail/validity/invalid_enum_tag.stderr index 5d27062fbc..5721cfda93 100644 --- a/tests/fail/validity/invalid_enum_tag.stderr +++ b/tests/fail/validity/invalid_enum_tag.stderr @@ -1,5 +1,5 @@ error: Undefined Behavior: constructing invalid value at .: encountered $HEX, but expected a valid enum tag - --> $DIR/invalid_enum_tag.rs:LL:CC + --> tests/fail/validity/invalid_enum_tag.rs:LL:CC | LL | let _f = unsafe { std::mem::transmute::(42) }; | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ constructing invalid value at .: encountered $HEX, but expected a valid enum tag @@ -7,7 +7,7 @@ LL | let _f = unsafe { std::mem::transmute::(42) }; = 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 = note: BACKTRACE: - = note: inside `main` at $DIR/invalid_enum_tag.rs:LL:CC + = note: inside `main` at tests/fail/validity/invalid_enum_tag.rs:LL:CC note: some details are omitted, run with `MIRIFLAGS=-Zmiri-backtrace=full` for a verbose backtrace diff --git a/tests/fail/validity/invalid_fnptr_null.stderr b/tests/fail/validity/invalid_fnptr_null.stderr index f781ca04f0..a07b5babe1 100644 --- a/tests/fail/validity/invalid_fnptr_null.stderr +++ b/tests/fail/validity/invalid_fnptr_null.stderr @@ -1,5 +1,5 @@ error: Undefined Behavior: constructing invalid value: encountered a null function pointer - --> $DIR/invalid_fnptr_null.rs:LL:CC + --> tests/fail/validity/invalid_fnptr_null.rs:LL:CC | LL | let _b: fn() = unsafe { std::mem::transmute(0usize) }; | ^^^^^^^^^^^^^^^^^^^^^^^^^^^ constructing invalid value: encountered a null function pointer @@ -7,7 +7,7 @@ LL | let _b: fn() = unsafe { std::mem::transmute(0usize) }; = 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 = note: BACKTRACE: - = note: inside `main` at $DIR/invalid_fnptr_null.rs:LL:CC + = note: inside `main` at tests/fail/validity/invalid_fnptr_null.rs:LL:CC note: some details are omitted, run with `MIRIFLAGS=-Zmiri-backtrace=full` for a verbose backtrace diff --git a/tests/fail/validity/invalid_fnptr_uninit.stderr b/tests/fail/validity/invalid_fnptr_uninit.stderr index 54781b507e..85fabc1836 100644 --- a/tests/fail/validity/invalid_fnptr_uninit.stderr +++ b/tests/fail/validity/invalid_fnptr_uninit.stderr @@ -1,5 +1,5 @@ error: Undefined Behavior: constructing invalid value at [0]: encountered uninitialized memory, but expected a function pointer - --> $DIR/invalid_fnptr_uninit.rs:LL:CC + --> tests/fail/validity/invalid_fnptr_uninit.rs:LL:CC | LL | let _b = unsafe { MyUninit { init: () }.uninit }; | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ constructing invalid value at [0]: encountered uninitialized memory, but expected a function pointer @@ -7,7 +7,7 @@ LL | let _b = unsafe { MyUninit { init: () }.uninit }; = 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 = note: BACKTRACE: - = note: inside `main` at $DIR/invalid_fnptr_uninit.rs:LL:CC + = note: inside `main` at tests/fail/validity/invalid_fnptr_uninit.rs:LL:CC note: some details are omitted, run with `MIRIFLAGS=-Zmiri-backtrace=full` for a verbose backtrace diff --git a/tests/fail/validity/invalid_int_op.stderr b/tests/fail/validity/invalid_int_op.stderr index df344311b7..c3f47df12f 100644 --- a/tests/fail/validity/invalid_int_op.stderr +++ b/tests/fail/validity/invalid_int_op.stderr @@ -1,5 +1,5 @@ error: Undefined Behavior: using uninitialized data, but this operation requires initialized memory - --> $DIR/invalid_int_op.rs:LL:CC + --> tests/fail/validity/invalid_int_op.rs:LL:CC | LL | let i = unsafe { std::mem::MaybeUninit::::uninit().assume_init() }; | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ using uninitialized data, but this operation requires initialized memory @@ -7,7 +7,7 @@ LL | let i = unsafe { std::mem::MaybeUninit::::uninit().assume_init() } = 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 = note: BACKTRACE: - = note: inside `main` at $DIR/invalid_int_op.rs:LL:CC + = note: inside `main` at tests/fail/validity/invalid_int_op.rs:LL:CC note: some details are omitted, run with `MIRIFLAGS=-Zmiri-backtrace=full` for a verbose backtrace diff --git a/tests/fail/validity/invalid_wide_raw.stderr b/tests/fail/validity/invalid_wide_raw.stderr index ed34d5255a..5321dc0f4c 100644 --- a/tests/fail/validity/invalid_wide_raw.stderr +++ b/tests/fail/validity/invalid_wide_raw.stderr @@ -1,5 +1,5 @@ error: Undefined Behavior: constructing invalid value: encountered null pointer, but expected a vtable pointer - --> $DIR/invalid_wide_raw.rs:LL:CC + --> tests/fail/validity/invalid_wide_raw.rs:LL:CC | LL | dbg!(S { x: unsafe { std::mem::transmute((0usize, 0usize)) } }); | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ constructing invalid value: encountered null pointer, but expected a vtable pointer @@ -7,7 +7,7 @@ LL | dbg!(S { x: unsafe { std::mem::transmute((0usize, 0usize)) } }); = 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 = note: BACKTRACE: - = note: inside `main` at $DIR/invalid_wide_raw.rs:LL:CC + = note: inside `main` at tests/fail/validity/invalid_wide_raw.rs:LL:CC note: some details are omitted, run with `MIRIFLAGS=-Zmiri-backtrace=full` for a verbose backtrace diff --git a/tests/fail/validity/match_binder_checks_validity1.stderr b/tests/fail/validity/match_binder_checks_validity1.stderr index a1bfa267cb..ec60751268 100644 --- a/tests/fail/validity/match_binder_checks_validity1.stderr +++ b/tests/fail/validity/match_binder_checks_validity1.stderr @@ -1,5 +1,5 @@ error: Undefined Behavior: constructing invalid value: encountered a value of uninhabited type `main::Void` - --> $DIR/match_binder_checks_validity1.rs:LL:CC + --> tests/fail/validity/match_binder_checks_validity1.rs:LL:CC | LL | _x => println!("hi from the void!"), | ^^ constructing invalid value: encountered a value of uninhabited type `main::Void` @@ -7,7 +7,7 @@ LL | _x => println!("hi from the void!"), = 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 = note: BACKTRACE: - = note: inside `main` at $DIR/match_binder_checks_validity1.rs:LL:CC + = note: inside `main` at tests/fail/validity/match_binder_checks_validity1.rs:LL:CC note: some details are omitted, run with `MIRIFLAGS=-Zmiri-backtrace=full` for a verbose backtrace diff --git a/tests/fail/validity/match_binder_checks_validity2.stderr b/tests/fail/validity/match_binder_checks_validity2.stderr index 2d8238350f..0375ead8f5 100644 --- a/tests/fail/validity/match_binder_checks_validity2.stderr +++ b/tests/fail/validity/match_binder_checks_validity2.stderr @@ -1,5 +1,5 @@ error: Undefined Behavior: constructing invalid value: encountered 0x03, but expected a boolean - --> $DIR/match_binder_checks_validity2.rs:LL:CC + --> tests/fail/validity/match_binder_checks_validity2.rs:LL:CC | LL | _x => println!("hi from the void!"), | ^^ constructing invalid value: encountered 0x03, but expected a boolean @@ -7,7 +7,7 @@ LL | _x => println!("hi from the void!"), = 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 = note: BACKTRACE: - = note: inside `main` at $DIR/match_binder_checks_validity2.rs:LL:CC + = note: inside `main` at tests/fail/validity/match_binder_checks_validity2.rs:LL:CC note: some details are omitted, run with `MIRIFLAGS=-Zmiri-backtrace=full` for a verbose backtrace diff --git a/tests/fail/validity/nonzero.stderr b/tests/fail/validity/nonzero.stderr index 2add8434ca..bbf1f9a73f 100644 --- a/tests/fail/validity/nonzero.stderr +++ b/tests/fail/validity/nonzero.stderr @@ -1,5 +1,5 @@ error: Undefined Behavior: constructing invalid value: encountered 0, but expected something greater or equal to 1 - --> $DIR/nonzero.rs:LL:CC + --> tests/fail/validity/nonzero.rs:LL:CC | LL | let _x = Some(unsafe { NonZero(0) }); | ^^^^^^^^^^^^^^^^^^^^^^^^^^^ constructing invalid value: encountered 0, but expected something greater or equal to 1 @@ -7,7 +7,7 @@ LL | let _x = Some(unsafe { NonZero(0) }); = 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 = note: BACKTRACE: - = note: inside `main` at $DIR/nonzero.rs:LL:CC + = note: inside `main` at tests/fail/validity/nonzero.rs:LL:CC note: some details are omitted, run with `MIRIFLAGS=-Zmiri-backtrace=full` for a verbose backtrace diff --git a/tests/fail/validity/recursive-validity-ref-bool.stderr b/tests/fail/validity/recursive-validity-ref-bool.stderr index 2b2fa9b8a2..87ac8c1793 100644 --- a/tests/fail/validity/recursive-validity-ref-bool.stderr +++ b/tests/fail/validity/recursive-validity-ref-bool.stderr @@ -1,5 +1,5 @@ error: Undefined Behavior: constructing invalid value at .: encountered 0x03, but expected a boolean - --> $DIR/recursive-validity-ref-bool.rs:LL:CC + --> tests/fail/validity/recursive-validity-ref-bool.rs:LL:CC | LL | let xref_wrong_type: &bool = unsafe { std::mem::transmute(xref) }; | ^^^^^^^^^^^^^^^^^^^^^^^^^ constructing invalid value at .: encountered 0x03, but expected a boolean @@ -7,7 +7,7 @@ LL | let xref_wrong_type: &bool = unsafe { std::mem::transmute(xref) }; = 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 = note: BACKTRACE: - = note: inside `main` at $DIR/recursive-validity-ref-bool.rs:LL:CC + = note: inside `main` at tests/fail/validity/recursive-validity-ref-bool.rs:LL:CC note: some details are omitted, run with `MIRIFLAGS=-Zmiri-backtrace=full` for a verbose backtrace diff --git a/tests/fail/validity/ref_to_uninhabited1.stderr b/tests/fail/validity/ref_to_uninhabited1.stderr index d893f7a9e5..30acfef02f 100644 --- a/tests/fail/validity/ref_to_uninhabited1.stderr +++ b/tests/fail/validity/ref_to_uninhabited1.stderr @@ -1,5 +1,5 @@ error: Undefined Behavior: constructing invalid value: encountered a box pointing to uninhabited type ! - --> $DIR/ref_to_uninhabited1.rs:LL:CC + --> tests/fail/validity/ref_to_uninhabited1.rs:LL:CC | LL | let x: Box = transmute(&mut 42); | ^^^^^^^^^^^^^^^^^^ constructing invalid value: encountered a box pointing to uninhabited type ! @@ -7,7 +7,7 @@ LL | let x: Box = transmute(&mut 42); = 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 = note: BACKTRACE: - = note: inside `main` at $DIR/ref_to_uninhabited1.rs:LL:CC + = note: inside `main` at tests/fail/validity/ref_to_uninhabited1.rs:LL:CC note: some details are omitted, run with `MIRIFLAGS=-Zmiri-backtrace=full` for a verbose backtrace diff --git a/tests/fail/validity/ref_to_uninhabited2.stderr b/tests/fail/validity/ref_to_uninhabited2.stderr index 1d9c89c688..1015d1ec42 100644 --- a/tests/fail/validity/ref_to_uninhabited2.stderr +++ b/tests/fail/validity/ref_to_uninhabited2.stderr @@ -1,5 +1,5 @@ error: Undefined Behavior: constructing invalid value: encountered a reference pointing to uninhabited type (i32, Void) - --> $DIR/ref_to_uninhabited2.rs:LL:CC + --> tests/fail/validity/ref_to_uninhabited2.rs:LL:CC | LL | let _x: &(i32, Void) = transmute(&42); | ^^^^^^^^^^^^^^ constructing invalid value: encountered a reference pointing to uninhabited type (i32, Void) @@ -7,7 +7,7 @@ LL | let _x: &(i32, Void) = transmute(&42); = 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 = note: BACKTRACE: - = note: inside `main` at $DIR/ref_to_uninhabited2.rs:LL:CC + = note: inside `main` at tests/fail/validity/ref_to_uninhabited2.rs:LL:CC note: some details are omitted, run with `MIRIFLAGS=-Zmiri-backtrace=full` for a verbose backtrace diff --git a/tests/fail/validity/too-big-slice.stderr b/tests/fail/validity/too-big-slice.stderr index 2abe6c6fdf..2b0a8f0381 100644 --- a/tests/fail/validity/too-big-slice.stderr +++ b/tests/fail/validity/too-big-slice.stderr @@ -1,5 +1,5 @@ error: Undefined Behavior: constructing invalid value: encountered invalid reference metadata: slice is bigger than largest supported object - --> $DIR/too-big-slice.rs:LL:CC + --> tests/fail/validity/too-big-slice.rs:LL:CC | LL | let _x: &[u8] = mem::transmute((ptr, usize::MAX)); | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ constructing invalid value: encountered invalid reference metadata: slice is bigger than largest supported object @@ -7,7 +7,7 @@ LL | let _x: &[u8] = mem::transmute((ptr, usize::MAX)); = 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 = note: BACKTRACE: - = note: inside `main` at $DIR/too-big-slice.rs:LL:CC + = note: inside `main` at tests/fail/validity/too-big-slice.rs:LL:CC note: some details are omitted, run with `MIRIFLAGS=-Zmiri-backtrace=full` for a verbose backtrace diff --git a/tests/fail/validity/too-big-unsized.stderr b/tests/fail/validity/too-big-unsized.stderr index bc8a140ac2..1e8b37979b 100644 --- a/tests/fail/validity/too-big-unsized.stderr +++ b/tests/fail/validity/too-big-unsized.stderr @@ -1,5 +1,5 @@ error: Undefined Behavior: constructing invalid value: encountered invalid reference metadata: total size is bigger than largest supported object - --> $DIR/too-big-unsized.rs:LL:CC + --> tests/fail/validity/too-big-unsized.rs:LL:CC | LL | let _x: &MySlice = mem::transmute((ptr, isize::MAX as usize)); | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ constructing invalid value: encountered invalid reference metadata: total size is bigger than largest supported object @@ -7,7 +7,7 @@ LL | let _x: &MySlice = mem::transmute((ptr, isize::MAX as usize)); = 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 = note: BACKTRACE: - = note: inside `main` at $DIR/too-big-unsized.rs:LL:CC + = note: inside `main` at tests/fail/validity/too-big-unsized.rs:LL:CC note: some details are omitted, run with `MIRIFLAGS=-Zmiri-backtrace=full` for a verbose backtrace diff --git a/tests/fail/validity/transmute_through_ptr.stderr b/tests/fail/validity/transmute_through_ptr.stderr index fcd077daa3..bbb40d1f58 100644 --- a/tests/fail/validity/transmute_through_ptr.stderr +++ b/tests/fail/validity/transmute_through_ptr.stderr @@ -1,5 +1,5 @@ error: Undefined Behavior: constructing invalid value at .: encountered $HEX, but expected a valid enum tag - --> $DIR/transmute_through_ptr.rs:LL:CC + --> tests/fail/validity/transmute_through_ptr.rs:LL:CC | LL | let y = x; // reading this ought to be enough to trigger validation | ^ constructing invalid value at .: encountered $HEX, but expected a valid enum tag @@ -7,7 +7,7 @@ LL | let y = x; // reading this ought to be enough to trigger validation = 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 = note: BACKTRACE: - = note: inside `main` at $DIR/transmute_through_ptr.rs:LL:CC + = note: inside `main` at tests/fail/validity/transmute_through_ptr.rs:LL:CC note: some details are omitted, run with `MIRIFLAGS=-Zmiri-backtrace=full` for a verbose backtrace diff --git a/tests/fail/validity/uninit_float.stderr b/tests/fail/validity/uninit_float.stderr index 3d7ec44fdb..a6ca0f40f0 100644 --- a/tests/fail/validity/uninit_float.stderr +++ b/tests/fail/validity/uninit_float.stderr @@ -1,5 +1,5 @@ error: Undefined Behavior: constructing invalid value at .value[0]: encountered uninitialized memory, but expected a floating point number - --> $DIR/uninit_float.rs:LL:CC + --> tests/fail/validity/uninit_float.rs:LL:CC | LL | let _val: [f32; 1] = unsafe { std::mem::uninitialized() }; | ^^^^^^^^^^^^^^^^^^^^^^^^^ constructing invalid value at .value[0]: encountered uninitialized memory, but expected a floating point number @@ -7,7 +7,7 @@ LL | let _val: [f32; 1] = unsafe { std::mem::uninitialized() }; = 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 = note: BACKTRACE: - = note: inside `main` at $DIR/uninit_float.rs:LL:CC + = note: inside `main` at tests/fail/validity/uninit_float.rs:LL:CC note: some details are omitted, run with `MIRIFLAGS=-Zmiri-backtrace=full` for a verbose backtrace diff --git a/tests/fail/validity/uninit_integer.stderr b/tests/fail/validity/uninit_integer.stderr index 55f3f803ad..b983832799 100644 --- a/tests/fail/validity/uninit_integer.stderr +++ b/tests/fail/validity/uninit_integer.stderr @@ -1,5 +1,5 @@ error: Undefined Behavior: constructing invalid value at .value[0]: encountered uninitialized memory, but expected an integer - --> $DIR/uninit_integer.rs:LL:CC + --> tests/fail/validity/uninit_integer.rs:LL:CC | LL | let _val = unsafe { std::mem::MaybeUninit::<[usize; 1]>::uninit().assume_init() }; | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ constructing invalid value at .value[0]: encountered uninitialized memory, but expected an integer @@ -7,7 +7,7 @@ LL | let _val = unsafe { std::mem::MaybeUninit::<[usize; 1]>::uninit().assum = 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 = note: BACKTRACE: - = note: inside `main` at $DIR/uninit_integer.rs:LL:CC + = note: inside `main` at tests/fail/validity/uninit_integer.rs:LL:CC note: some details are omitted, run with `MIRIFLAGS=-Zmiri-backtrace=full` for a verbose backtrace diff --git a/tests/fail/validity/uninit_raw_ptr.stderr b/tests/fail/validity/uninit_raw_ptr.stderr index fed1cf4587..83af585201 100644 --- a/tests/fail/validity/uninit_raw_ptr.stderr +++ b/tests/fail/validity/uninit_raw_ptr.stderr @@ -1,5 +1,5 @@ error: Undefined Behavior: constructing invalid value at .value[0]: encountered uninitialized memory, but expected a raw pointer - --> $DIR/uninit_raw_ptr.rs:LL:CC + --> tests/fail/validity/uninit_raw_ptr.rs:LL:CC | LL | let _val = unsafe { std::mem::MaybeUninit::<[*const u8; 1]>::uninit().assume_init() }; | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ constructing invalid value at .value[0]: encountered uninitialized memory, but expected a raw pointer @@ -7,7 +7,7 @@ LL | let _val = unsafe { std::mem::MaybeUninit::<[*const u8; 1]>::uninit().a = 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 = note: BACKTRACE: - = note: inside `main` at $DIR/uninit_raw_ptr.rs:LL:CC + = note: inside `main` at tests/fail/validity/uninit_raw_ptr.rs:LL:CC note: some details are omitted, run with `MIRIFLAGS=-Zmiri-backtrace=full` for a verbose backtrace diff --git a/tests/fail/validity/wrong-dyn-trait-generic.stderr b/tests/fail/validity/wrong-dyn-trait-generic.stderr index 1219f9f88c..0b5163f711 100644 --- a/tests/fail/validity/wrong-dyn-trait-generic.stderr +++ b/tests/fail/validity/wrong-dyn-trait-generic.stderr @@ -1,5 +1,5 @@ error: Undefined Behavior: constructing invalid value: wrong trait in wide pointer vtable: expected `Trait`, but encountered `Trait` - --> $DIR/wrong-dyn-trait-generic.rs:LL:CC + --> tests/fail/validity/wrong-dyn-trait-generic.rs:LL:CC | LL | let _y: *const dyn Trait = unsafe { mem::transmute(x) }; | ^^^^^^^^^^^^^^^^^ constructing invalid value: wrong trait in wide pointer vtable: expected `Trait`, but encountered `Trait` @@ -7,7 +7,7 @@ LL | let _y: *const dyn Trait = unsafe { mem::transmute(x) }; = 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 = note: BACKTRACE: - = note: inside `main` at $DIR/wrong-dyn-trait-generic.rs:LL:CC + = note: inside `main` at tests/fail/validity/wrong-dyn-trait-generic.rs:LL:CC note: some details are omitted, run with `MIRIFLAGS=-Zmiri-backtrace=full` for a verbose backtrace diff --git a/tests/fail/validity/wrong-dyn-trait.stderr b/tests/fail/validity/wrong-dyn-trait.stderr index e3503323b3..4be3fb52bd 100644 --- a/tests/fail/validity/wrong-dyn-trait.stderr +++ b/tests/fail/validity/wrong-dyn-trait.stderr @@ -1,5 +1,5 @@ error: Undefined Behavior: constructing invalid value: wrong trait in wide pointer vtable: expected `std::fmt::Debug`, but encountered `` - --> $DIR/wrong-dyn-trait.rs:LL:CC + --> tests/fail/validity/wrong-dyn-trait.rs:LL:CC | LL | let _y: *const dyn fmt::Debug = unsafe { mem::transmute(x) }; | ^^^^^^^^^^^^^^^^^ constructing invalid value: wrong trait in wide pointer vtable: expected `std::fmt::Debug`, but encountered `` @@ -7,7 +7,7 @@ LL | let _y: *const dyn fmt::Debug = unsafe { mem::transmute(x) }; = 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 = note: BACKTRACE: - = note: inside `main` at $DIR/wrong-dyn-trait.rs:LL:CC + = note: inside `main` at tests/fail/validity/wrong-dyn-trait.rs:LL:CC note: some details are omitted, run with `MIRIFLAGS=-Zmiri-backtrace=full` for a verbose backtrace diff --git a/tests/fail/weak_memory/racing_mixed_size.stderr b/tests/fail/weak_memory/racing_mixed_size.stderr index 44430cd25d..a437ca3425 100644 --- a/tests/fail/weak_memory/racing_mixed_size.stderr +++ b/tests/fail/weak_memory/racing_mixed_size.stderr @@ -1,11 +1,11 @@ error: Undefined Behavior: Race condition detected between (1) 4-byte atomic store on thread `unnamed-ID` and (2) 2-byte atomic load on thread `unnamed-ID` at ALLOC. (2) just happened here - --> $DIR/racing_mixed_size.rs:LL:CC + --> tests/fail/weak_memory/racing_mixed_size.rs:LL:CC | LL | std::intrinsics::atomic_load_relaxed(hi); | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ Race condition detected between (1) 4-byte atomic store on thread `unnamed-ID` and (2) 2-byte atomic load on thread `unnamed-ID` at ALLOC. (2) just happened here | help: and (1) occurred earlier here - --> $DIR/racing_mixed_size.rs:LL:CC + --> tests/fail/weak_memory/racing_mixed_size.rs:LL:CC | LL | x.store(1, Relaxed); | ^^^^^^^^^^^^^^^^^^^ @@ -14,7 +14,7 @@ LL | x.store(1, Relaxed); = 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 = note: BACKTRACE (of the first span) on thread `unnamed-ID`: - = note: inside closure at $DIR/racing_mixed_size.rs:LL:CC + = note: inside closure at tests/fail/weak_memory/racing_mixed_size.rs:LL:CC note: some details are omitted, run with `MIRIFLAGS=-Zmiri-backtrace=full` for a verbose backtrace diff --git a/tests/fail/weak_memory/racing_mixed_size_read.stderr b/tests/fail/weak_memory/racing_mixed_size_read.stderr index 94b4123d34..9e6a6e8041 100644 --- a/tests/fail/weak_memory/racing_mixed_size_read.stderr +++ b/tests/fail/weak_memory/racing_mixed_size_read.stderr @@ -1,11 +1,11 @@ error: Undefined Behavior: Race condition detected between (1) 4-byte atomic load on thread `unnamed-ID` and (2) 2-byte atomic load on thread `unnamed-ID` at ALLOC. (2) just happened here - --> $DIR/racing_mixed_size_read.rs:LL:CC + --> tests/fail/weak_memory/racing_mixed_size_read.rs:LL:CC | LL | (*hi).load(Relaxed); | ^^^^^^^^^^^^^^^^^^^ Race condition detected between (1) 4-byte atomic load on thread `unnamed-ID` and (2) 2-byte atomic load on thread `unnamed-ID` at ALLOC. (2) just happened here | help: and (1) occurred earlier here - --> $DIR/racing_mixed_size_read.rs:LL:CC + --> tests/fail/weak_memory/racing_mixed_size_read.rs:LL:CC | LL | x.load(Relaxed); | ^^^^^^^^^^^^^^^ @@ -14,7 +14,7 @@ LL | x.load(Relaxed); = 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 = note: BACKTRACE (of the first span) on thread `unnamed-ID`: - = note: inside closure at $DIR/racing_mixed_size_read.rs:LL:CC + = note: inside closure at tests/fail/weak_memory/racing_mixed_size_read.rs:LL:CC note: some details are omitted, run with `MIRIFLAGS=-Zmiri-backtrace=full` for a verbose backtrace diff --git a/tests/fail/weak_memory/weak_uninit.stderr b/tests/fail/weak_memory/weak_uninit.stderr index 9aa5bc2fa7..816bd323f4 100644 --- a/tests/fail/weak_memory/weak_uninit.stderr +++ b/tests/fail/weak_memory/weak_uninit.stderr @@ -1,5 +1,5 @@ error: Undefined Behavior: using uninitialized data, but this operation requires initialized memory - --> $DIR/weak_uninit.rs:LL:CC + --> tests/fail/weak_memory/weak_uninit.rs:LL:CC | LL | let j2 = spawn(move || x.load(Ordering::Relaxed)); | ^^^^^^^^^^^^^^^^^^^^^^^^^ using uninitialized data, but this operation requires initialized memory @@ -7,7 +7,7 @@ LL | let j2 = spawn(move || x.load(Ordering::Relaxed)); = 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 = note: BACKTRACE on thread `unnamed-ID`: - = note: inside closure at $DIR/weak_uninit.rs:LL:CC + = note: inside closure at tests/fail/weak_memory/weak_uninit.rs:LL:CC note: some details are omitted, run with `MIRIFLAGS=-Zmiri-backtrace=full` for a verbose backtrace diff --git a/tests/fail/zst_local_oob.stderr b/tests/fail/zst_local_oob.stderr index 39ac2c9143..26911948ef 100644 --- a/tests/fail/zst_local_oob.stderr +++ b/tests/fail/zst_local_oob.stderr @@ -1,5 +1,5 @@ error: Undefined Behavior: memory access failed: expected a pointer to 1 byte of memory, but got ALLOC which is at or beyond the end of the allocation of size 0 bytes - --> $DIR/zst_local_oob.rs:LL:CC + --> tests/fail/zst_local_oob.rs:LL:CC | LL | let _val = unsafe { *x }; | ^^ memory access failed: expected a pointer to 1 byte of memory, but got ALLOC which is at or beyond the end of the allocation of size 0 bytes @@ -7,7 +7,7 @@ LL | let _val = unsafe { *x }; = 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 = note: BACKTRACE: - = note: inside `main` at $DIR/zst_local_oob.rs:LL:CC + = note: inside `main` at tests/fail/zst_local_oob.rs:LL:CC note: some details are omitted, run with `MIRIFLAGS=-Zmiri-backtrace=full` for a verbose backtrace diff --git a/tests/native-lib/fail/function_not_in_so.rs b/tests/native-lib/fail/function_not_in_so.rs index c532d05224..a7df3e6118 100644 --- a/tests/native-lib/fail/function_not_in_so.rs +++ b/tests/native-lib/fail/function_not_in_so.rs @@ -1,6 +1,5 @@ // Only works on Unix targets -//@ignore-target-windows -//@ignore-target-wasm +//@ignore-target: windows wasm //@only-on-host //@normalize-stderr-test: "OS `.*`" -> "$$OS" diff --git a/tests/native-lib/fail/function_not_in_so.stderr b/tests/native-lib/fail/function_not_in_so.stderr index e905d7d039..5579f8141c 100644 --- a/tests/native-lib/fail/function_not_in_so.stderr +++ b/tests/native-lib/fail/function_not_in_so.stderr @@ -1,15 +1,15 @@ -error: unsupported operation: can't call foreign function `foo` on $OS - --> $DIR/function_not_in_so.rs:LL:CC - | -LL | foo(); - | ^^^^^ can't call foreign function `foo` on $OS - | - = help: if this is a basic API commonly used on this target, please report an issue with Miri - = help: however, note that Miri does not aim to support every FFI function out there; for instance, we will not support APIs for things such as GUIs, scripting languages, or databases - = note: BACKTRACE: - = note: inside `main` at $DIR/function_not_in_so.rs:LL:CC - -note: some details are omitted, run with `MIRIFLAGS=-Zmiri-backtrace=full` for a verbose backtrace - -error: aborting due to 1 previous error - +error: unsupported operation: can't call foreign function `foo` on $OS + --> tests/native-lib/fail/function_not_in_so.rs:LL:CC + | +LL | foo(); + | ^^^^^ can't call foreign function `foo` on $OS + | + = help: if this is a basic API commonly used on this target, please report an issue with Miri + = help: however, note that Miri does not aim to support every FFI function out there; for instance, we will not support APIs for things such as GUIs, scripting languages, or databases + = note: BACKTRACE: + = note: inside `main` at tests/native-lib/fail/function_not_in_so.rs:LL:CC + +note: some details are omitted, run with `MIRIFLAGS=-Zmiri-backtrace=full` for a verbose backtrace + +error: aborting due to 1 previous error + diff --git a/tests/native-lib/fail/private_function.rs b/tests/native-lib/fail/private_function.rs index 3c6fda741d..e54880e97d 100644 --- a/tests/native-lib/fail/private_function.rs +++ b/tests/native-lib/fail/private_function.rs @@ -1,6 +1,5 @@ // Only works on Unix targets -//@ignore-target-windows -//@ignore-target-wasm +//@ignore-target: windows wasm //@only-on-host //@normalize-stderr-test: "OS `.*`" -> "$$OS" diff --git a/tests/native-lib/fail/private_function.stderr b/tests/native-lib/fail/private_function.stderr index e27a501ebb..3d0e0a1420 100644 --- a/tests/native-lib/fail/private_function.stderr +++ b/tests/native-lib/fail/private_function.stderr @@ -1,15 +1,15 @@ -error: unsupported operation: can't call foreign function `not_exported` on $OS - --> $DIR/private_function.rs:LL:CC - | -LL | not_exported(); - | ^^^^^^^^^^^^^^ can't call foreign function `not_exported` on $OS - | - = help: if this is a basic API commonly used on this target, please report an issue with Miri - = help: however, note that Miri does not aim to support every FFI function out there; for instance, we will not support APIs for things such as GUIs, scripting languages, or databases - = note: BACKTRACE: - = note: inside `main` at $DIR/private_function.rs:LL:CC - -note: some details are omitted, run with `MIRIFLAGS=-Zmiri-backtrace=full` for a verbose backtrace - -error: aborting due to 1 previous error - +error: unsupported operation: can't call foreign function `not_exported` on $OS + --> tests/native-lib/fail/private_function.rs:LL:CC + | +LL | not_exported(); + | ^^^^^^^^^^^^^^ can't call foreign function `not_exported` on $OS + | + = help: if this is a basic API commonly used on this target, please report an issue with Miri + = help: however, note that Miri does not aim to support every FFI function out there; for instance, we will not support APIs for things such as GUIs, scripting languages, or databases + = note: BACKTRACE: + = note: inside `main` at tests/native-lib/fail/private_function.rs:LL:CC + +note: some details are omitted, run with `MIRIFLAGS=-Zmiri-backtrace=full` for a verbose backtrace + +error: aborting due to 1 previous error + diff --git a/tests/native-lib/pass/ptr_read_access.rs b/tests/native-lib/pass/ptr_read_access.rs index 2990dfa897..46eb5778b3 100644 --- a/tests/native-lib/pass/ptr_read_access.rs +++ b/tests/native-lib/pass/ptr_read_access.rs @@ -1,6 +1,5 @@ // Only works on Unix targets -//@ignore-target-windows -//@ignore-target-wasm +//@ignore-target: windows wasm //@only-on-host fn main() { diff --git a/tests/native-lib/pass/scalar_arguments.rs b/tests/native-lib/pass/scalar_arguments.rs index 378baa7ce9..c896bd8dd3 100644 --- a/tests/native-lib/pass/scalar_arguments.rs +++ b/tests/native-lib/pass/scalar_arguments.rs @@ -1,6 +1,5 @@ // Only works on Unix targets -//@ignore-target-windows -//@ignore-target-wasm +//@ignore-target: windows wasm //@only-on-host extern "C" { diff --git a/tests/panic/alloc_error_handler_hook.stderr b/tests/panic/alloc_error_handler_hook.stderr index 319a10febb..363298e49d 100644 --- a/tests/panic/alloc_error_handler_hook.stderr +++ b/tests/panic/alloc_error_handler_hook.stderr @@ -1,4 +1,4 @@ -thread 'main' panicked at $DIR/alloc_error_handler_hook.rs:LL:CC: +thread 'main' panicked at tests/panic/alloc_error_handler_hook.rs:LL:CC: alloc error hook called 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 diff --git a/tests/panic/div-by-zero-2.stderr b/tests/panic/div-by-zero-2.stderr index ed394f76b0..e47a754d38 100644 --- a/tests/panic/div-by-zero-2.stderr +++ b/tests/panic/div-by-zero-2.stderr @@ -1,4 +1,4 @@ -thread 'main' panicked at $DIR/div-by-zero-2.rs:LL:CC: +thread 'main' panicked at tests/panic/div-by-zero-2.rs:LL:CC: attempt to divide by zero 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 diff --git a/tests/panic/function_calls/exported_symbol_good_unwind.stderr b/tests/panic/function_calls/exported_symbol_good_unwind.stderr index 6733f2e42c..ec75b6201c 100644 --- a/tests/panic/function_calls/exported_symbol_good_unwind.stderr +++ b/tests/panic/function_calls/exported_symbol_good_unwind.stderr @@ -1,8 +1,8 @@ -thread 'main' panicked at $DIR/exported_symbol_good_unwind.rs:LL:CC: +thread 'main' panicked at tests/panic/function_calls/exported_symbol_good_unwind.rs:LL:CC: explicit panic 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 'main' panicked at $DIR/exported_symbol_good_unwind.rs:LL:CC: +thread 'main' panicked at tests/panic/function_calls/exported_symbol_good_unwind.rs:LL:CC: explicit panic -thread 'main' panicked at $DIR/exported_symbol_good_unwind.rs:LL:CC: +thread 'main' panicked at tests/panic/function_calls/exported_symbol_good_unwind.rs:LL:CC: explicit panic diff --git a/tests/panic/mir-validation.rs b/tests/panic/mir-validation.rs index f1d0ccc7d0..e4b75cccbb 100644 --- a/tests/panic/mir-validation.rs +++ b/tests/panic/mir-validation.rs @@ -7,7 +7,7 @@ //@normalize-stderr-test: "DefId\([^()]*\)" -> "DefId" // Somehow on rustc Windows CI, the "Miri caused an ICE" message is not shown // and we don't even get a regular panic; rustc aborts with a different exit code instead. -//@ignore-host-windows +//@ignore-host: windows #![feature(custom_mir, core_intrinsics)] use core::intrinsics::mir::*; diff --git a/tests/panic/oob_subslice.stderr b/tests/panic/oob_subslice.stderr index 46f0f643a4..d608cec20a 100644 --- a/tests/panic/oob_subslice.stderr +++ b/tests/panic/oob_subslice.stderr @@ -1,4 +1,4 @@ -thread 'main' panicked at $DIR/oob_subslice.rs:LL:CC: +thread 'main' panicked at tests/panic/oob_subslice.rs:LL:CC: range end index 5 out of range for slice of length 4 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 diff --git a/tests/panic/overflowing-lsh-neg.stderr b/tests/panic/overflowing-lsh-neg.stderr index be822bd028..29150052b3 100644 --- a/tests/panic/overflowing-lsh-neg.stderr +++ b/tests/panic/overflowing-lsh-neg.stderr @@ -1,4 +1,4 @@ -thread 'main' panicked at $DIR/overflowing-lsh-neg.rs:LL:CC: +thread 'main' panicked at tests/panic/overflowing-lsh-neg.rs:LL:CC: attempt to shift left with overflow 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 diff --git a/tests/panic/overflowing-rsh-1.stderr b/tests/panic/overflowing-rsh-1.stderr index fc090aba5f..9a71a797da 100644 --- a/tests/panic/overflowing-rsh-1.stderr +++ b/tests/panic/overflowing-rsh-1.stderr @@ -1,4 +1,4 @@ -thread 'main' panicked at $DIR/overflowing-rsh-1.rs:LL:CC: +thread 'main' panicked at tests/panic/overflowing-rsh-1.rs:LL:CC: attempt to shift right with overflow 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 diff --git a/tests/panic/overflowing-rsh-2.stderr b/tests/panic/overflowing-rsh-2.stderr index 77160e1870..b671c53c61 100644 --- a/tests/panic/overflowing-rsh-2.stderr +++ b/tests/panic/overflowing-rsh-2.stderr @@ -1,4 +1,4 @@ -thread 'main' panicked at $DIR/overflowing-rsh-2.rs:LL:CC: +thread 'main' panicked at tests/panic/overflowing-rsh-2.rs:LL:CC: attempt to shift right with overflow 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 diff --git a/tests/panic/panic1.stderr b/tests/panic/panic1.stderr index 4eb4244d74..7e011bfd53 100644 --- a/tests/panic/panic1.stderr +++ b/tests/panic/panic1.stderr @@ -1,4 +1,4 @@ -thread 'main' panicked at $DIR/panic1.rs:LL:CC: +thread 'main' panicked at tests/panic/panic1.rs:LL:CC: panicking from libstd stack backtrace: 0: std::panicking::begin_panic_handler @@ -6,7 +6,7 @@ stack backtrace: 1: std::rt::panic_fmt at RUSTLIB/core/src/panicking.rs:LL:CC 2: main - at $DIR/panic1.rs:LL:CC + at tests/panic/panic1.rs:LL:CC 3: >::call_once - shim(fn()) at RUSTLIB/core/src/ops/function.rs:LL:CC note: Some details are omitted, run with `RUST_BACKTRACE=full` for a verbose backtrace. diff --git a/tests/panic/panic2.stderr b/tests/panic/panic2.stderr index f740831009..5640bd0b8d 100644 --- a/tests/panic/panic2.stderr +++ b/tests/panic/panic2.stderr @@ -1,4 +1,4 @@ -thread 'main' panicked at $DIR/panic2.rs:LL:CC: +thread 'main' panicked at tests/panic/panic2.rs:LL:CC: 42-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 diff --git a/tests/panic/panic3.stderr b/tests/panic/panic3.stderr index 32ba400e02..0114320503 100644 --- a/tests/panic/panic3.stderr +++ b/tests/panic/panic3.stderr @@ -1,4 +1,4 @@ -thread 'main' panicked at $DIR/panic3.rs:LL:CC: +thread 'main' panicked at tests/panic/panic3.rs:LL:CC: 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 diff --git a/tests/panic/panic4.stderr b/tests/panic/panic4.stderr index a8a23ee3ce..f13b355ea4 100644 --- a/tests/panic/panic4.stderr +++ b/tests/panic/panic4.stderr @@ -1,4 +1,4 @@ -thread 'main' panicked at $DIR/panic4.rs:LL:CC: +thread 'main' panicked at tests/panic/panic4.rs:LL:CC: 42-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 diff --git a/tests/panic/transmute_fat2.stderr b/tests/panic/transmute_fat2.stderr index 021ca1c4b3..a9bc0eb9d0 100644 --- a/tests/panic/transmute_fat2.stderr +++ b/tests/panic/transmute_fat2.stderr @@ -1,4 +1,4 @@ -thread 'main' panicked at $DIR/transmute_fat2.rs:LL:CC: +thread 'main' panicked at tests/panic/transmute_fat2.rs:LL:CC: index out of bounds: the len is 0 but the index is 0 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 diff --git a/tests/panic/unsupported_foreign_function.stderr b/tests/panic/unsupported_foreign_function.stderr index fcc4220bfc..278af9612d 100644 --- a/tests/panic/unsupported_foreign_function.stderr +++ b/tests/panic/unsupported_foreign_function.stderr @@ -1,4 +1,4 @@ -thread 'main' panicked at $DIR/unsupported_foreign_function.rs:LL:CC: +thread 'main' panicked at tests/panic/unsupported_foreign_function.rs:LL:CC: unsupported Miri functionality: can't call foreign function `foo` on $OS 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 diff --git a/tests/panic/unsupported_syscall.rs b/tests/panic/unsupported_syscall.rs index 30f9da5f80..24b8f22e95 100644 --- a/tests/panic/unsupported_syscall.rs +++ b/tests/panic/unsupported_syscall.rs @@ -1,5 +1,7 @@ -//@ignore-target-windows: no `syscall` on Windows -//@ignore-target-apple: `syscall` is not supported on macOS +// no `syscall` on Windows +//@ignore-target: windows +// `syscall` is not supported on macOS +//@ignore-target: apple //@compile-flags: -Zmiri-panic-on-unsupported fn main() { diff --git a/tests/panic/unsupported_syscall.stderr b/tests/panic/unsupported_syscall.stderr index 660cfba890..e9b2b5b665 100644 --- a/tests/panic/unsupported_syscall.stderr +++ b/tests/panic/unsupported_syscall.stderr @@ -1,4 +1,4 @@ -thread 'main' panicked at $DIR/unsupported_syscall.rs:LL:CC: +thread 'main' panicked at tests/panic/unsupported_syscall.rs:LL:CC: unsupported Miri functionality: can't execute syscall with ID 0 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 diff --git a/tests/pass-dep/concurrency/apple-os-unfair-lock.rs b/tests/pass-dep/concurrency/apple-os-unfair-lock.rs index c2b9c37bbf..0fc432f24c 100644 --- a/tests/pass-dep/concurrency/apple-os-unfair-lock.rs +++ b/tests/pass-dep/concurrency/apple-os-unfair-lock.rs @@ -1,4 +1,4 @@ -//@ only-target-darwin +//@only-target: darwin use std::cell::UnsafeCell; diff --git a/tests/pass-dep/concurrency/env-cleanup-data-race.rs b/tests/pass-dep/concurrency/env-cleanup-data-race.rs index 86a47ba365..a2d6af3638 100644 --- a/tests/pass-dep/concurrency/env-cleanup-data-race.rs +++ b/tests/pass-dep/concurrency/env-cleanup-data-race.rs @@ -1,5 +1,6 @@ //@compile-flags: -Zmiri-disable-isolation -Zmiri-preemption-rate=0 -//@ignore-target-windows: No libc env support on Windows +// No libc env support on Windows +//@ignore-target: windows use std::ffi::CStr; use std::thread; diff --git a/tests/pass-dep/concurrency/libc_pthread_cond_timedwait.rs b/tests/pass-dep/concurrency/libc_pthread_cond_timedwait.rs index d758168c7c..76de478306 100644 --- a/tests/pass-dep/concurrency/libc_pthread_cond_timedwait.rs +++ b/tests/pass-dep/concurrency/libc_pthread_cond_timedwait.rs @@ -1,5 +1,7 @@ -//@ignore-target-windows: No pthreads on Windows -//@ignore-target-apple: pthread_condattr_setclock is not supported on MacOS. +// No pthreads on Windows +//@ignore-target: windows +// pthread_condattr_setclock is not supported on MacOS. +//@ignore-target: apple //@compile-flags: -Zmiri-disable-isolation /// Test that conditional variable timeouts are working properly with both diff --git a/tests/pass-dep/concurrency/libc_pthread_cond_timedwait_isolated.rs b/tests/pass-dep/concurrency/libc_pthread_cond_timedwait_isolated.rs index f1a3c5dc10..5372f2f041 100644 --- a/tests/pass-dep/concurrency/libc_pthread_cond_timedwait_isolated.rs +++ b/tests/pass-dep/concurrency/libc_pthread_cond_timedwait_isolated.rs @@ -1,5 +1,7 @@ -//@ignore-target-windows: No pthreads on Windows -//@ignore-target-apple: pthread_condattr_setclock is not supported on MacOS. +// No pthreads on Windows +//@ignore-target: windows +// pthread_condattr_setclock is not supported on MacOS. +//@ignore-target: apple /// Test that conditional variable timeouts are working properly /// with monotonic clocks even under isolation. diff --git a/tests/pass-dep/concurrency/linux-futex.rs b/tests/pass-dep/concurrency/linux-futex.rs index 399d6df73f..e84ffee367 100644 --- a/tests/pass-dep/concurrency/linux-futex.rs +++ b/tests/pass-dep/concurrency/linux-futex.rs @@ -1,4 +1,4 @@ -//@only-target-linux +//@only-target: linux //@compile-flags: -Zmiri-disable-isolation use std::mem::MaybeUninit; diff --git a/tests/pass-dep/concurrency/tls_pthread_drop_order.rs b/tests/pass-dep/concurrency/tls_pthread_drop_order.rs index 52348aad33..87afaf37e6 100644 --- a/tests/pass-dep/concurrency/tls_pthread_drop_order.rs +++ b/tests/pass-dep/concurrency/tls_pthread_drop_order.rs @@ -1,4 +1,5 @@ -//@ignore-target-windows: No pthreads on Windows +// No pthreads on Windows +//@ignore-target: windows //! Test that pthread_key destructors are run in the right order. //! Note that these are *not* used by actual `thread_local!` on Linux! Those use //! `destructors::register` from the stdlib instead. In Miri this ends up hitting diff --git a/tests/pass-dep/concurrency/windows_detach_terminated.rs b/tests/pass-dep/concurrency/windows_detach_terminated.rs index 3d4f8c5e1c..835ca478be 100644 --- a/tests/pass-dep/concurrency/windows_detach_terminated.rs +++ b/tests/pass-dep/concurrency/windows_detach_terminated.rs @@ -1,4 +1,4 @@ -//@only-target-windows: Uses win32 api functions +//@only-target: windows: Uses win32 api functions // We are making scheduler assumptions here. //@compile-flags: -Zmiri-preemption-rate=0 diff --git a/tests/pass-dep/concurrency/windows_init_once.rs b/tests/pass-dep/concurrency/windows_init_once.rs index 5e33617f98..8a3e7d1367 100644 --- a/tests/pass-dep/concurrency/windows_init_once.rs +++ b/tests/pass-dep/concurrency/windows_init_once.rs @@ -1,4 +1,4 @@ -//@only-target-windows: Uses win32 api functions +//@only-target: windows: Uses win32 api functions // We are making scheduler assumptions here. //@compile-flags: -Zmiri-preemption-rate=0 diff --git a/tests/pass-dep/concurrency/windows_join_multiple.rs b/tests/pass-dep/concurrency/windows_join_multiple.rs index bff59591a9..4b76416658 100644 --- a/tests/pass-dep/concurrency/windows_join_multiple.rs +++ b/tests/pass-dep/concurrency/windows_join_multiple.rs @@ -1,4 +1,4 @@ -//@only-target-windows: Uses win32 api functions +//@only-target: windows: Uses win32 api functions // We are making scheduler assumptions here. //@compile-flags: -Zmiri-preemption-rate=0 diff --git a/tests/pass-dep/extra_fn_ptr_gc.rs b/tests/pass-dep/extra_fn_ptr_gc.rs index 1198168795..bb79701565 100644 --- a/tests/pass-dep/extra_fn_ptr_gc.rs +++ b/tests/pass-dep/extra_fn_ptr_gc.rs @@ -1,4 +1,5 @@ -//@ignore-target-windows: No `dlsym` on Windows +// No `dlsym` on Windows +//@ignore-target: windows //@compile-flags: -Zmiri-permissive-provenance #[path = "../utils/mod.rs"] diff --git a/tests/pass-dep/libc/fcntl_f-fullfsync_apple.rs b/tests/pass-dep/libc/fcntl_f-fullfsync_apple.rs index 307906f258..cdb79be998 100644 --- a/tests/pass-dep/libc/fcntl_f-fullfsync_apple.rs +++ b/tests/pass-dep/libc/fcntl_f-fullfsync_apple.rs @@ -1,4 +1,5 @@ -//@only-target-apple: F_FULLFSYNC only on apple systems +// F_FULLFSYNC only on apple systems +//@only-target: apple //@compile-flags: -Zmiri-isolation-error=warn-nobacktrace use std::io::Error; diff --git a/tests/pass-dep/libc/gettid.rs b/tests/pass-dep/libc/gettid.rs index 87405b02ac..ca352e0109 100644 --- a/tests/pass-dep/libc/gettid.rs +++ b/tests/pass-dep/libc/gettid.rs @@ -1,4 +1,4 @@ -//@only-target-linux +//@only-target: linux //@revisions: with_isolation without_isolation //@[without_isolation] compile-flags: -Zmiri-disable-isolation diff --git a/tests/pass-dep/libc/libc-affinity.rs b/tests/pass-dep/libc/libc-affinity.rs index 0e482ab260..96cfe3aa25 100644 --- a/tests/pass-dep/libc/libc-affinity.rs +++ b/tests/pass-dep/libc/libc-affinity.rs @@ -1,5 +1,7 @@ -//@ignore-target-windows: only very limited libc on Windows -//@ignore-target-apple: `sched_{g, s}etaffinity` are not supported on macOS +// only very limited libc on Windows +//@ignore-target: windows +// `sched_{g, s}etaffinity` are not supported on macOS +//@ignore-target: apple //@compile-flags: -Zmiri-disable-isolation -Zmiri-num-cpus=4 #![feature(io_error_more)] #![feature(pointer_is_aligned_to)] diff --git a/tests/pass-dep/libc/libc-epoll-blocking.rs b/tests/pass-dep/libc/libc-epoll-blocking.rs index 2a5d3dff07..eb38529ae5 100644 --- a/tests/pass-dep/libc/libc-epoll-blocking.rs +++ b/tests/pass-dep/libc/libc-epoll-blocking.rs @@ -1,4 +1,4 @@ -//@only-target-linux +//@only-target: linux // test_epoll_block_then_unblock depends on a deterministic schedule. //@compile-flags: -Zmiri-preemption-rate=0 diff --git a/tests/pass-dep/libc/libc-epoll-no-blocking.rs b/tests/pass-dep/libc/libc-epoll-no-blocking.rs index 647b5e6064..3e448b6ce3 100644 --- a/tests/pass-dep/libc/libc-epoll-no-blocking.rs +++ b/tests/pass-dep/libc/libc-epoll-no-blocking.rs @@ -1,4 +1,4 @@ -//@only-target-linux +//@only-target: linux #![feature(strict_provenance)] use std::convert::TryInto; diff --git a/tests/pass-dep/libc/libc-eventfd.rs b/tests/pass-dep/libc/libc-eventfd.rs index a3567eeb7c..1e3d486233 100644 --- a/tests/pass-dep/libc/libc-eventfd.rs +++ b/tests/pass-dep/libc/libc-eventfd.rs @@ -1,4 +1,4 @@ -//@only-target-linux +//@only-target: linux // test_race depends on a deterministic schedule. //@compile-flags: -Zmiri-preemption-rate=0 diff --git a/tests/pass-dep/libc/libc-fs-flock.rs b/tests/pass-dep/libc/libc-fs-flock.rs index 3f7f9b18be..feac58d8b2 100644 --- a/tests/pass-dep/libc/libc-fs-flock.rs +++ b/tests/pass-dep/libc/libc-fs-flock.rs @@ -1,4 +1,5 @@ -//@ignore-target-windows: File handling is not implemented yet +// File handling is not implemented yet +//@ignore-target: windows //@compile-flags: -Zmiri-disable-isolation use std::{fs::File, io::Error, os::fd::AsRawFd}; diff --git a/tests/pass-dep/libc/libc-fs-symlink.rs b/tests/pass-dep/libc/libc-fs-symlink.rs index 619c6db3a2..0909b54e7c 100644 --- a/tests/pass-dep/libc/libc-fs-symlink.rs +++ b/tests/pass-dep/libc/libc-fs-symlink.rs @@ -1,6 +1,7 @@ // Symlink tests are separate since they don't in general work on a Windows host. -//@ignore-host-windows: creating symlinks requires admin permissions on Windows -//@ignore-target-windows: File handling is not implemented yet +//@ignore-host: windows +// File handling is not implemented yet +//@ignore-target: windows //@compile-flags: -Zmiri-disable-isolation use std::ffi::CString; diff --git a/tests/pass-dep/libc/libc-fs-with-isolation.rs b/tests/pass-dep/libc/libc-fs-with-isolation.rs index 088a632427..ccff52cda6 100644 --- a/tests/pass-dep/libc/libc-fs-with-isolation.rs +++ b/tests/pass-dep/libc/libc-fs-with-isolation.rs @@ -1,4 +1,5 @@ -//@ignore-target-windows: File handling is not implemented yet +// File handling is not implemented yet +//@ignore-target: windows //@compile-flags: -Zmiri-isolation-error=warn-nobacktrace //@normalize-stderr-test: "(stat(x)?)" -> "$$STAT" diff --git a/tests/pass-dep/libc/libc-fs.rs b/tests/pass-dep/libc/libc-fs.rs index 5b2bbfbb27..53af959d9b 100644 --- a/tests/pass-dep/libc/libc-fs.rs +++ b/tests/pass-dep/libc/libc-fs.rs @@ -1,4 +1,5 @@ -//@ignore-target-windows: File handling is not implemented yet +// File handling is not implemented yet +//@ignore-target: windows //@compile-flags: -Zmiri-disable-isolation #![feature(io_error_more)] diff --git a/tests/pass-dep/libc/libc-misc.rs b/tests/pass-dep/libc/libc-misc.rs index a5b944e9d4..aa2e1bc104 100644 --- a/tests/pass-dep/libc/libc-misc.rs +++ b/tests/pass-dep/libc/libc-misc.rs @@ -1,4 +1,5 @@ -//@ignore-target-windows: only very limited libc on Windows +// only very limited libc on Windows +//@ignore-target: windows //@compile-flags: -Zmiri-disable-isolation #![feature(io_error_more)] #![feature(pointer_is_aligned_to)] diff --git a/tests/pass-dep/libc/libc-pipe.rs b/tests/pass-dep/libc/libc-pipe.rs index 90dbd88839..09e2c6f542 100644 --- a/tests/pass-dep/libc/libc-pipe.rs +++ b/tests/pass-dep/libc/libc-pipe.rs @@ -1,4 +1,5 @@ -//@ignore-target-windows: No libc pipe on Windows +// No libc pipe on Windows +//@ignore-target: windows // test_race depends on a deterministic schedule. //@compile-flags: -Zmiri-preemption-rate=0 use std::thread; diff --git a/tests/pass-dep/libc/libc-random.rs b/tests/pass-dep/libc/libc-random.rs index 71e3352263..bc59420a40 100644 --- a/tests/pass-dep/libc/libc-random.rs +++ b/tests/pass-dep/libc/libc-random.rs @@ -1,4 +1,5 @@ -//@ignore-target-windows: no libc +// no libc +//@ignore-target: windows //@revisions: isolation no_isolation //@[no_isolation]compile-flags: -Zmiri-disable-isolation diff --git a/tests/pass-dep/libc/libc-socketpair.rs b/tests/pass-dep/libc/libc-socketpair.rs index 15e040116d..73d5c2da37 100644 --- a/tests/pass-dep/libc/libc-socketpair.rs +++ b/tests/pass-dep/libc/libc-socketpair.rs @@ -1,4 +1,5 @@ -//@ignore-target-windows: No libc socketpair on Windows +// No libc socketpair on Windows +//@ignore-target: windows // test_race depends on a deterministic schedule. //@compile-flags: -Zmiri-preemption-rate=0 use std::thread; diff --git a/tests/pass-dep/libc/libc-time.rs b/tests/pass-dep/libc/libc-time.rs index 5e4bb73e36..7b12fd3f3b 100644 --- a/tests/pass-dep/libc/libc-time.rs +++ b/tests/pass-dep/libc/libc-time.rs @@ -1,4 +1,5 @@ -//@ignore-target-windows: no libc time APIs on Windows +//No libc time APIs on Windows +//@ignore-target: windows //@compile-flags: -Zmiri-disable-isolation use std::{env, mem, ptr}; diff --git a/tests/pass-dep/libc/mmap.rs b/tests/pass-dep/libc/mmap.rs index fd874dbe89..30efd49976 100644 --- a/tests/pass-dep/libc/mmap.rs +++ b/tests/pass-dep/libc/mmap.rs @@ -1,4 +1,5 @@ -//@ignore-target-windows: No mmap on Windows +// No mmap on Windows +//@ignore-target: windows //@compile-flags: -Zmiri-disable-isolation -Zmiri-permissive-provenance #![feature(strict_provenance)] diff --git a/tests/pass-dep/libc/pthread-sync.rs b/tests/pass-dep/libc/pthread-sync.rs index 1427526212..293ed3be0e 100644 --- a/tests/pass-dep/libc/pthread-sync.rs +++ b/tests/pass-dep/libc/pthread-sync.rs @@ -1,4 +1,5 @@ -//@ignore-target-windows: No pthreads on Windows +// No pthreads on Windows +//@ignore-target: windows // We use `yield` to test specific interleavings, so disable automatic preemption. //@compile-flags: -Zmiri-preemption-rate=0 #![feature(sync_unsafe_cell)] diff --git a/tests/pass-dep/libc/pthread-threadname.rs b/tests/pass-dep/libc/pthread-threadname.rs index d66cd3bbb0..9dad1d68ac 100644 --- a/tests/pass-dep/libc/pthread-threadname.rs +++ b/tests/pass-dep/libc/pthread-threadname.rs @@ -1,4 +1,5 @@ -//@ignore-target-windows: No pthreads on Windows +// No pthreads on Windows +//@ignore-target: windows use std::ffi::CStr; #[cfg(not(target_os = "freebsd"))] use std::ffi::CString; diff --git a/tests/pass-dep/tempfile.rs b/tests/pass-dep/tempfile.rs index c4583ca3f4..5c8f3aa54e 100644 --- a/tests/pass-dep/tempfile.rs +++ b/tests/pass-dep/tempfile.rs @@ -1,5 +1,7 @@ -//@ignore-target-windows: File handling is not implemented yet -//@ignore-host-windows: Only supported for UNIX hosts +// File handling is not implemented yet +//@ignore-target: windows +// Only supported for UNIX hosts +//@ignore-host: windows //@compile-flags: -Zmiri-disable-isolation #[path = "../utils/mod.rs"] diff --git a/tests/pass-dep/tokio/file-io.rs b/tests/pass-dep/tokio/file-io.rs index d14af299cd..485957282f 100644 --- a/tests/pass-dep/tokio/file-io.rs +++ b/tests/pass-dep/tokio/file-io.rs @@ -1,5 +1,6 @@ //@compile-flags: -Zmiri-disable-isolation -//@only-target-linux: We only support tokio on Linux +// We only support tokio on Linux +//@only-target: linux use std::fs::remove_file; use tokio::fs::{File, OpenOptions}; diff --git a/tests/pass-dep/tokio/mpsc-await.rs b/tests/pass-dep/tokio/mpsc-await.rs index 7dea07c6e7..cf8ff6f302 100644 --- a/tests/pass-dep/tokio/mpsc-await.rs +++ b/tests/pass-dep/tokio/mpsc-await.rs @@ -1,4 +1,5 @@ -//@only-target-linux: We only support tokio on Linux +// We only support tokio on Linux +//@only-target: linux use tokio::sync::mpsc; #[tokio::main] diff --git a/tests/pass-dep/tokio/sleep.rs b/tests/pass-dep/tokio/sleep.rs index 5e63037c8a..adca7b46d8 100644 --- a/tests/pass-dep/tokio/sleep.rs +++ b/tests/pass-dep/tokio/sleep.rs @@ -1,4 +1,5 @@ -//@only-target-linux: We only support tokio on Linux +// We only support tokio on Linux +//@only-target: linux use tokio::time::{sleep, Duration, Instant}; diff --git a/tests/pass/alloc-access-tracking.rs b/tests/pass/alloc-access-tracking.rs index 40b8e23a33..ac07fb36a0 100644 --- a/tests/pass/alloc-access-tracking.rs +++ b/tests/pass/alloc-access-tracking.rs @@ -2,7 +2,8 @@ #![no_std] //@compile-flags: -Zmiri-track-alloc-id=21 -Zmiri-track-alloc-accesses -Cpanic=abort //@normalize-stderr-test: "id 21" -> "id $$ALLOC" -//@only-target-linux: alloc IDs differ between OSes (due to extern static allocations) +// alloc IDs differ between OSes (due to extern static allocations) +//@only-target: linux extern "Rust" { fn miri_alloc(size: usize, align: usize) -> *mut u8; diff --git a/tests/pass/alloc-access-tracking.stderr b/tests/pass/alloc-access-tracking.stderr index 0af6cde833..451f5de25d 100644 --- a/tests/pass/alloc-access-tracking.stderr +++ b/tests/pass/alloc-access-tracking.stderr @@ -1,23 +1,23 @@ note: tracking was triggered - --> $DIR/alloc-access-tracking.rs:LL:CC + --> tests/pass/alloc-access-tracking.rs:LL:CC | LL | let ptr = miri_alloc(123, 1); | ^^^^^^^^^^^^^^^^^^ created Miri bare-metal heap allocation of 123 bytes (alignment ALIGN bytes) with id $ALLOC | = note: BACKTRACE: - = note: inside `start` at $DIR/alloc-access-tracking.rs:LL:CC + = note: inside `start` at tests/pass/alloc-access-tracking.rs:LL:CC note: tracking was triggered - --> $DIR/alloc-access-tracking.rs:LL:CC + --> tests/pass/alloc-access-tracking.rs:LL:CC | LL | *ptr = 42; // Crucially, only a write is printed here, no read! | ^^^^^^^^^ write access to allocation with id $ALLOC | = note: BACKTRACE: - = note: inside `start` at $DIR/alloc-access-tracking.rs:LL:CC + = note: inside `start` at tests/pass/alloc-access-tracking.rs:LL:CC note: tracking was triggered - --> $DIR/alloc-access-tracking.rs:LL:CC + --> tests/pass/alloc-access-tracking.rs:LL:CC | LL | assert_eq!(*ptr, 42); | ^^^^^^^^^^^^^^^^^^^^ read access to allocation with id $ALLOC @@ -27,11 +27,11 @@ LL | assert_eq!(*ptr, 42); = note: this note originates in the macro `assert_eq` (in Nightly builds, run with -Z macro-backtrace for more info) note: tracking was triggered - --> $DIR/alloc-access-tracking.rs:LL:CC + --> tests/pass/alloc-access-tracking.rs:LL:CC | LL | miri_dealloc(ptr, 123, 1); | ^^^^^^^^^^^^^^^^^^^^^^^^^ freed allocation with id $ALLOC | = note: BACKTRACE: - = note: inside `start` at $DIR/alloc-access-tracking.rs:LL:CC + = note: inside `start` at tests/pass/alloc-access-tracking.rs:LL:CC diff --git a/tests/pass/backtrace/backtrace-api-v0.stderr b/tests/pass/backtrace/backtrace-api-v0.stderr index c05950ebdc..b87063431a 100644 --- a/tests/pass/backtrace/backtrace-api-v0.stderr +++ b/tests/pass/backtrace/backtrace-api-v0.stderr @@ -1,8 +1,8 @@ -$DIR/backtrace-api-v0.rs:LL:CC (func_d) -$DIR/backtrace-api-v0.rs:LL:CC (func_c) -$DIR/backtrace-api-v0.rs:LL:CC (func_b) -$DIR/backtrace-api-v0.rs:LL:CC (func_a) -$DIR/backtrace-api-v0.rs:LL:CC (main) +tests/pass/backtrace/backtrace-api-v0.rs:LL:CC (func_d) +tests/pass/backtrace/backtrace-api-v0.rs:LL:CC (func_c) +tests/pass/backtrace/backtrace-api-v0.rs:LL:CC (func_b) +tests/pass/backtrace/backtrace-api-v0.rs:LL:CC (func_a) +tests/pass/backtrace/backtrace-api-v0.rs:LL:CC (main) RUSTLIB/core/src/ops/function.rs:LL:CC (>::call_once - shim(fn())) RUSTLIB/std/src/sys/backtrace.rs:LL:CC (std::sys::backtrace::__rust_begin_short_backtrace) RUSTLIB/std/src/rt.rs:LL:CC (std::rt::lang_start::{closure#0}) diff --git a/tests/pass/backtrace/backtrace-api-v0.stdout b/tests/pass/backtrace/backtrace-api-v0.stdout index e6644b4453..8c1bc5c353 100644 --- a/tests/pass/backtrace/backtrace-api-v0.stdout +++ b/tests/pass/backtrace/backtrace-api-v0.stdout @@ -1,5 +1,5 @@ -$DIR/backtrace-api-v0.rs:24:14 (func_d) -$DIR/backtrace-api-v0.rs:14:9 (func_c) -$DIR/backtrace-api-v0.rs:9:5 (func_b::) -$DIR/backtrace-api-v0.rs:5:5 (func_a) -$DIR/backtrace-api-v0.rs:29:18 (main) +tests/pass/backtrace/backtrace-api-v0.rs:24:14 (func_d) +tests/pass/backtrace/backtrace-api-v0.rs:14:9 (func_c) +tests/pass/backtrace/backtrace-api-v0.rs:9:5 (func_b::) +tests/pass/backtrace/backtrace-api-v0.rs:5:5 (func_a) +tests/pass/backtrace/backtrace-api-v0.rs:29:18 (main) diff --git a/tests/pass/backtrace/backtrace-api-v1.stderr b/tests/pass/backtrace/backtrace-api-v1.stderr index b56d983d42..2c729c49ee 100644 --- a/tests/pass/backtrace/backtrace-api-v1.stderr +++ b/tests/pass/backtrace/backtrace-api-v1.stderr @@ -1,8 +1,8 @@ -$DIR/backtrace-api-v1.rs:LL:CC (func_d) -$DIR/backtrace-api-v1.rs:LL:CC (func_c) -$DIR/backtrace-api-v1.rs:LL:CC (func_b) -$DIR/backtrace-api-v1.rs:LL:CC (func_a) -$DIR/backtrace-api-v1.rs:LL:CC (main) +tests/pass/backtrace/backtrace-api-v1.rs:LL:CC (func_d) +tests/pass/backtrace/backtrace-api-v1.rs:LL:CC (func_c) +tests/pass/backtrace/backtrace-api-v1.rs:LL:CC (func_b) +tests/pass/backtrace/backtrace-api-v1.rs:LL:CC (func_a) +tests/pass/backtrace/backtrace-api-v1.rs:LL:CC (main) RUSTLIB/core/src/ops/function.rs:LL:CC (>::call_once - shim(fn())) RUSTLIB/std/src/sys/backtrace.rs:LL:CC (std::sys::backtrace::__rust_begin_short_backtrace) RUSTLIB/std/src/rt.rs:LL:CC (std::rt::lang_start::{closure#0}) diff --git a/tests/pass/backtrace/backtrace-api-v1.stdout b/tests/pass/backtrace/backtrace-api-v1.stdout index 11efd2f075..5c2995e132 100644 --- a/tests/pass/backtrace/backtrace-api-v1.stdout +++ b/tests/pass/backtrace/backtrace-api-v1.stdout @@ -1,5 +1,5 @@ -$DIR/backtrace-api-v1.rs:27:9 (func_d) -$DIR/backtrace-api-v1.rs:14:9 (func_c) -$DIR/backtrace-api-v1.rs:9:5 (func_b::) -$DIR/backtrace-api-v1.rs:5:5 (func_a) -$DIR/backtrace-api-v1.rs:34:18 (main) +tests/pass/backtrace/backtrace-api-v1.rs:27:9 (func_d) +tests/pass/backtrace/backtrace-api-v1.rs:14:9 (func_c) +tests/pass/backtrace/backtrace-api-v1.rs:9:5 (func_b::) +tests/pass/backtrace/backtrace-api-v1.rs:5:5 (func_a) +tests/pass/backtrace/backtrace-api-v1.rs:34:18 (main) diff --git a/tests/pass/backtrace/backtrace-global-alloc.stderr b/tests/pass/backtrace/backtrace-global-alloc.stderr index b06dd1da3c..d9414aa651 100644 --- a/tests/pass/backtrace/backtrace-global-alloc.stderr +++ b/tests/pass/backtrace/backtrace-global-alloc.stderr @@ -1,5 +1,5 @@ 0: main - at $DIR/backtrace-global-alloc.rs:LL:CC + at tests/pass/backtrace/backtrace-global-alloc.rs:LL:CC 1: >::call_once - shim(fn()) at RUSTLIB/core/src/ops/function.rs:LL:CC 2: std::sys::backtrace::__rust_begin_short_backtrace diff --git a/tests/pass/backtrace/backtrace-std.stderr b/tests/pass/backtrace/backtrace-std.stderr index 84bdda59fc..d6d69ee837 100644 --- a/tests/pass/backtrace/backtrace-std.stderr +++ b/tests/pass/backtrace/backtrace-std.stderr @@ -1,13 +1,13 @@ 0: func_d - at $DIR/backtrace-std.rs:LL:CC + at tests/pass/backtrace/backtrace-std.rs:LL:CC 1: func_c - at $DIR/backtrace-std.rs:LL:CC + at tests/pass/backtrace/backtrace-std.rs:LL:CC 2: func_b - at $DIR/backtrace-std.rs:LL:CC + at tests/pass/backtrace/backtrace-std.rs:LL:CC 3: func_a - at $DIR/backtrace-std.rs:LL:CC + at tests/pass/backtrace/backtrace-std.rs:LL:CC 4: main - at $DIR/backtrace-std.rs:LL:CC + at tests/pass/backtrace/backtrace-std.rs:LL:CC 5: >::call_once - shim(fn()) at RUSTLIB/core/src/ops/function.rs:LL:CC 6: std::sys::backtrace::__rust_begin_short_backtrace diff --git a/tests/pass/concurrency/thread_park_isolated.rs b/tests/pass/concurrency/thread_park_isolated.rs index 7852d495e2..09b6cd6eba 100644 --- a/tests/pass/concurrency/thread_park_isolated.rs +++ b/tests/pass/concurrency/thread_park_isolated.rs @@ -1,4 +1,5 @@ -//@ignore-target-apple: park_timeout on macOS uses the system clock +// park_timeout on macOS uses the system clock +//@ignore-target: apple use std::thread; use std::time::{Duration, Instant}; diff --git a/tests/pass/extern_types.stack.stderr b/tests/pass/extern_types.stack.stderr index 2c9fc0192a..898c19d514 100644 --- a/tests/pass/extern_types.stack.stderr +++ b/tests/pass/extern_types.stack.stderr @@ -1,5 +1,5 @@ warning: reborrow of reference to `extern type` - --> $DIR/extern_types.rs:LL:CC + --> tests/pass/extern_types.rs:LL:CC | LL | let x: &Foo = unsafe { &*(ptr::without_provenance::<()>(16) as *const Foo) }; | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ reborrow of a reference to `extern type` is not properly supported @@ -7,5 +7,5 @@ LL | let x: &Foo = unsafe { &*(ptr::without_provenance::<()>(16) as *const F = help: `extern type` are not compatible with the Stacked Borrows aliasing model implemented by Miri; Miri may miss bugs in this code = help: try running with `MIRIFLAGS=-Zmiri-tree-borrows` to use the more permissive but also even more experimental Tree Borrows aliasing checks instead = note: BACKTRACE: - = note: inside `main` at $DIR/extern_types.rs:LL:CC + = note: inside `main` at tests/pass/extern_types.rs:LL:CC diff --git a/tests/pass/function_calls/target_feature.rs b/tests/pass/function_calls/target_feature.rs index 0be86ba373..9dc9c07425 100644 --- a/tests/pass/function_calls/target_feature.rs +++ b/tests/pass/function_calls/target_feature.rs @@ -1,4 +1,5 @@ -//@only-target-x86_64: uses x86 target features +// uses x86 target features +//@only-target: x86_64 //@compile-flags: -C target-feature=+ssse3 fn main() { diff --git a/tests/pass/issues/issue-miri-3680.rs b/tests/pass/issues/issue-miri-3680.rs index 55b896c91a..241ae800c9 100644 --- a/tests/pass/issues/issue-miri-3680.rs +++ b/tests/pass/issues/issue-miri-3680.rs @@ -1,4 +1,6 @@ -//@ignore-target-windows: File handling is not implemented yet +// File handling is not implemented yet +//@ignore-target: windows + //@compile-flags: -Zmiri-disable-isolation use std::fs::remove_file; diff --git a/tests/pass/miri-alloc.rs b/tests/pass/miri-alloc.rs index 8f17247541..6203feefd5 100644 --- a/tests/pass/miri-alloc.rs +++ b/tests/pass/miri-alloc.rs @@ -4,7 +4,8 @@ // windows tls dtors go through libstd right now, thus this test // cannot pass. When windows tls dtors go through the special magic // windows linker section, we can run this test on windows again. -//@ignore-target-windows: no-std not supported on Windows +// no-std not supported on Windows +//@ignore-target: windows extern "Rust" { fn miri_alloc(size: usize, align: usize) -> *mut u8; diff --git a/tests/pass/panic/catch_panic.stderr b/tests/pass/panic/catch_panic.stderr index f61b39493e..cb74312a83 100644 --- a/tests/pass/panic/catch_panic.stderr +++ b/tests/pass/panic/catch_panic.stderr @@ -1,36 +1,36 @@ -thread 'main' panicked at $DIR/catch_panic.rs:LL:CC: +thread 'main' panicked at tests/pass/panic/catch_panic.rs:LL:CC: Hello from std::panic 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 Caught panic message (&str): Hello from std::panic -thread 'main' panicked at $DIR/catch_panic.rs:LL:CC: +thread 'main' panicked at tests/pass/panic/catch_panic.rs:LL:CC: Hello from std::panic: 1 Caught panic message (String): Hello from std::panic: 1 -thread 'main' panicked at $DIR/catch_panic.rs:LL:CC: +thread 'main' panicked at tests/pass/panic/catch_panic.rs:LL:CC: Hello from std::panic_any: 2 Caught panic message (String): Hello from std::panic_any: 2 -thread 'main' panicked at $DIR/catch_panic.rs:LL:CC: +thread 'main' panicked at tests/pass/panic/catch_panic.rs:LL:CC: Box Failed to get caught panic message. -thread 'main' panicked at $DIR/catch_panic.rs:LL:CC: +thread 'main' panicked at tests/pass/panic/catch_panic.rs:LL:CC: Hello from core::panic Caught panic message (&str): Hello from core::panic -thread 'main' panicked at $DIR/catch_panic.rs:LL:CC: +thread 'main' panicked at tests/pass/panic/catch_panic.rs:LL:CC: Hello from core::panic: 5 Caught panic message (String): Hello from core::panic: 5 -thread 'main' panicked at $DIR/catch_panic.rs:LL:CC: +thread 'main' panicked at tests/pass/panic/catch_panic.rs:LL:CC: index out of bounds: the len is 3 but the index is 4 Caught panic message (String): index out of bounds: the len is 3 but the index is 4 -thread 'main' panicked at $DIR/catch_panic.rs:LL:CC: +thread 'main' panicked at tests/pass/panic/catch_panic.rs:LL:CC: attempt to divide by zero Caught panic message (&str): attempt to divide by zero thread 'main' panicked at RUSTLIB/core/src/ptr/const_ptr.rs:LL:CC: align_offset: align is not a power-of-two Caught panic message (&str): align_offset: align is not a power-of-two -thread 'main' panicked at $DIR/catch_panic.rs:LL:CC: +thread 'main' panicked at tests/pass/panic/catch_panic.rs:LL:CC: assertion failed: false Caught panic message (&str): assertion failed: false -thread 'main' panicked at $DIR/catch_panic.rs:LL:CC: +thread 'main' panicked at tests/pass/panic/catch_panic.rs:LL:CC: assertion failed: false Caught panic message (&str): assertion failed: false Success! diff --git a/tests/pass/panic/concurrent-panic.stderr b/tests/pass/panic/concurrent-panic.stderr index fe0d16ca78..9c87489e8d 100644 --- a/tests/pass/panic/concurrent-panic.stderr +++ b/tests/pass/panic/concurrent-panic.stderr @@ -1,13 +1,13 @@ Thread 1 starting, will block on mutex Thread 1 reported it has started -thread '' panicked at $DIR/concurrent-panic.rs:LL:CC: +thread '' panicked at tests/pass/panic/concurrent-panic.rs:LL:CC: panic in thread 2 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 2 blocking on thread 1 Thread 2 reported it has started Unlocking mutex -thread '' panicked at $DIR/concurrent-panic.rs:LL:CC: +thread '' panicked at tests/pass/panic/concurrent-panic.rs:LL:CC: panic in thread 1 Thread 1 has exited Thread 2 has exited diff --git a/tests/pass/panic/nested_panic_caught.stderr b/tests/pass/panic/nested_panic_caught.stderr index a346d31f64..e066f7dfce 100644 --- a/tests/pass/panic/nested_panic_caught.stderr +++ b/tests/pass/panic/nested_panic_caught.stderr @@ -1,7 +1,7 @@ -thread 'main' panicked at $DIR/nested_panic_caught.rs:LL:CC: +thread 'main' panicked at tests/pass/panic/nested_panic_caught.rs:LL:CC: once 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 'main' panicked at $DIR/nested_panic_caught.rs:LL:CC: +thread 'main' panicked at tests/pass/panic/nested_panic_caught.rs:LL:CC: twice stack backtrace: diff --git a/tests/pass/panic/thread_panic.stderr b/tests/pass/panic/thread_panic.stderr index 0fde5922c1..9464e76b6c 100644 --- a/tests/pass/panic/thread_panic.stderr +++ b/tests/pass/panic/thread_panic.stderr @@ -1,6 +1,6 @@ -thread '' panicked at $DIR/thread_panic.rs:LL:CC: +thread '' panicked at tests/pass/panic/thread_panic.rs:LL:CC: Hello! 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 'childthread' panicked at $DIR/thread_panic.rs:LL:CC: +thread 'childthread' panicked at tests/pass/panic/thread_panic.rs:LL:CC: Hello, world! diff --git a/tests/pass/panic/unwind_dwarf.rs b/tests/pass/panic/unwind_dwarf.rs index f690be471b..0a3d0c906f 100644 --- a/tests/pass/panic/unwind_dwarf.rs +++ b/tests/pass/panic/unwind_dwarf.rs @@ -1,4 +1,5 @@ -//@ignore-target-windows: Windows uses a different unwinding mechanism +//Windows uses a different unwinding mechanism +//@ignore-target: windows #![feature(core_intrinsics, panic_unwind, rustc_attrs)] #![allow(internal_features)] diff --git a/tests/pass/ptr_int_casts.tree.stderr b/tests/pass/ptr_int_casts.tree.stderr index a34474ee0d..21c5b2b0df 100644 --- a/tests/pass/ptr_int_casts.tree.stderr +++ b/tests/pass/ptr_int_casts.tree.stderr @@ -1,5 +1,5 @@ warning: integer-to-pointer cast - --> $DIR/ptr_int_casts.rs:LL:CC + --> tests/pass/ptr_int_casts.rs:LL:CC | LL | assert_eq!(1 as *const i32 as usize, 1); | ^^^^^^^^^^^^^^^ integer-to-pointer cast @@ -10,79 +10,79 @@ LL | assert_eq!(1 as *const i32 as usize, 1); = help: you can then set `MIRIFLAGS=-Zmiri-strict-provenance` to ensure you are not relying on `with_exposed_provenance` semantics = help: Tree Borrows does not support integer-to-pointer casts, so the program is likely to go wrong when this pointer gets used = note: BACKTRACE: - = note: inside `ptr_int_casts` at $DIR/ptr_int_casts.rs:LL:CC + = note: inside `ptr_int_casts` at tests/pass/ptr_int_casts.rs:LL:CC note: inside `main` - --> $DIR/ptr_int_casts.rs:LL:CC + --> tests/pass/ptr_int_casts.rs:LL:CC | LL | ptr_int_casts(); | ^^^^^^^^^^^^^^^ warning: integer-to-pointer cast - --> $DIR/ptr_int_casts.rs:LL:CC + --> tests/pass/ptr_int_casts.rs:LL:CC | LL | assert_eq!((1 as *const i32).wrapping_offset(4) as usize, 1 + 4 * 4); | ^^^^^^^^^^^^^^^^^ integer-to-pointer cast | = note: BACKTRACE: - = note: inside `ptr_int_casts` at $DIR/ptr_int_casts.rs:LL:CC + = note: inside `ptr_int_casts` at tests/pass/ptr_int_casts.rs:LL:CC note: inside `main` - --> $DIR/ptr_int_casts.rs:LL:CC + --> tests/pass/ptr_int_casts.rs:LL:CC | LL | ptr_int_casts(); | ^^^^^^^^^^^^^^^ warning: integer-to-pointer cast - --> $DIR/ptr_int_casts.rs:LL:CC + --> tests/pass/ptr_int_casts.rs:LL:CC | LL | *val = (1 as *const u8).wrapping_offset(-4); | ^^^^^^^^^^^^^^^^ integer-to-pointer cast | = note: BACKTRACE: - = note: inside `ptr_int_casts` at $DIR/ptr_int_casts.rs:LL:CC + = note: inside `ptr_int_casts` at tests/pass/ptr_int_casts.rs:LL:CC note: inside `main` - --> $DIR/ptr_int_casts.rs:LL:CC + --> tests/pass/ptr_int_casts.rs:LL:CC | LL | ptr_int_casts(); | ^^^^^^^^^^^^^^^ warning: integer-to-pointer cast - --> $DIR/ptr_int_casts.rs:LL:CC + --> tests/pass/ptr_int_casts.rs:LL:CC | LL | let y = y as *const _; | ^^^^^^^^^^^^^ integer-to-pointer cast | = note: BACKTRACE: - = note: inside `ptr_int_casts` at $DIR/ptr_int_casts.rs:LL:CC + = note: inside `ptr_int_casts` at tests/pass/ptr_int_casts.rs:LL:CC note: inside `main` - --> $DIR/ptr_int_casts.rs:LL:CC + --> tests/pass/ptr_int_casts.rs:LL:CC | LL | ptr_int_casts(); | ^^^^^^^^^^^^^^^ warning: integer-to-pointer cast - --> $DIR/ptr_int_casts.rs:LL:CC + --> tests/pass/ptr_int_casts.rs:LL:CC | LL | let x: fn() -> i32 = unsafe { mem::transmute(y as *mut u8) }; | ^^^^^^^^^^^^ integer-to-pointer cast | = note: BACKTRACE: - = note: inside `ptr_int_casts` at $DIR/ptr_int_casts.rs:LL:CC + = note: inside `ptr_int_casts` at tests/pass/ptr_int_casts.rs:LL:CC note: inside `main` - --> $DIR/ptr_int_casts.rs:LL:CC + --> tests/pass/ptr_int_casts.rs:LL:CC | LL | ptr_int_casts(); | ^^^^^^^^^^^^^^^ warning: integer-to-pointer cast - --> $DIR/ptr_int_casts.rs:LL:CC + --> tests/pass/ptr_int_casts.rs:LL:CC | LL | assert_eq!((-1i32) as usize as *const i32 as usize, (-1i32) as usize); | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ integer-to-pointer cast | = note: BACKTRACE: - = note: inside `ptr_int_casts` at $DIR/ptr_int_casts.rs:LL:CC + = note: inside `ptr_int_casts` at tests/pass/ptr_int_casts.rs:LL:CC note: inside `main` - --> $DIR/ptr_int_casts.rs:LL:CC + --> tests/pass/ptr_int_casts.rs:LL:CC | LL | ptr_int_casts(); | ^^^^^^^^^^^^^^^ diff --git a/tests/pass/ptr_int_from_exposed.tree.stderr b/tests/pass/ptr_int_from_exposed.tree.stderr index 614b0d26a6..aac6d0f48d 100644 --- a/tests/pass/ptr_int_from_exposed.tree.stderr +++ b/tests/pass/ptr_int_from_exposed.tree.stderr @@ -1,5 +1,5 @@ warning: integer-to-pointer cast - --> $DIR/ptr_int_from_exposed.rs:LL:CC + --> tests/pass/ptr_int_from_exposed.rs:LL:CC | LL | let ptr = ptr::with_exposed_provenance::(x_usize).wrapping_offset(-128); | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ integer-to-pointer cast @@ -10,9 +10,9 @@ LL | let ptr = ptr::with_exposed_provenance::(x_usize).wrapping_offset( = help: you can then set `MIRIFLAGS=-Zmiri-strict-provenance` to ensure you are not relying on `with_exposed_provenance` semantics = help: Tree Borrows does not support integer-to-pointer casts, so the program is likely to go wrong when this pointer gets used = note: BACKTRACE: - = note: inside `ptr_roundtrip_out_of_bounds` at $DIR/ptr_int_from_exposed.rs:LL:CC + = note: inside `ptr_roundtrip_out_of_bounds` at tests/pass/ptr_int_from_exposed.rs:LL:CC note: inside `main` - --> $DIR/ptr_int_from_exposed.rs:LL:CC + --> tests/pass/ptr_int_from_exposed.rs:LL:CC | LL | ptr_roundtrip_out_of_bounds(); | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ diff --git a/tests/pass/shims/fs-symlink.rs b/tests/pass/shims/fs-symlink.rs index 4d5103b24c..4294a49a9d 100644 --- a/tests/pass/shims/fs-symlink.rs +++ b/tests/pass/shims/fs-symlink.rs @@ -1,6 +1,6 @@ // Symlink tests are separate since they don't in general work on a Windows host. -//@ignore-host-windows: creating symlinks requires admin permissions on Windows -//@ignore-target-windows: File handling is not implemented yet +//@ignore-host: windows +//@ignore-target: windows //@compile-flags: -Zmiri-disable-isolation use std::fs::{read_link, remove_file, File}; diff --git a/tests/pass/shims/fs-with-isolation.rs b/tests/pass/shims/fs-with-isolation.rs index 8fa683085b..5ae1788802 100644 --- a/tests/pass/shims/fs-with-isolation.rs +++ b/tests/pass/shims/fs-with-isolation.rs @@ -1,4 +1,6 @@ -//@ignore-target-windows: File handling is not implemented yet +// File handling is not implemented yet +//@ignore-target: windows + //@compile-flags: -Zmiri-isolation-error=warn-nobacktrace //@normalize-stderr-test: "(stat(x)?)" -> "$$STAT" diff --git a/tests/pass/shims/fs.rs b/tests/pass/shims/fs.rs index 70e375b098..d4aa284ee8 100644 --- a/tests/pass/shims/fs.rs +++ b/tests/pass/shims/fs.rs @@ -1,4 +1,6 @@ -//@ignore-target-windows: File handling is not implemented yet +// File handling is not implemented yet +//@ignore-target: windows + //@compile-flags: -Zmiri-disable-isolation #![feature(io_error_more)] diff --git a/tests/pass/shims/windows-rand.rs b/tests/pass/shims/windows-rand.rs index cfbc1d278a..ac310affd9 100644 --- a/tests/pass/shims/windows-rand.rs +++ b/tests/pass/shims/windows-rand.rs @@ -1,4 +1,5 @@ -//@only-target-windows: this directly tests windows-only functions +// this directly tests windows-only functions +//@only-target: windows use core::ffi::c_void; use core::mem::size_of_val; use core::ptr::null_mut; diff --git a/tests/pass/shims/windows-threadname.rs b/tests/pass/shims/windows-threadname.rs index c863ac670b..36c4995053 100644 --- a/tests/pass/shims/windows-threadname.rs +++ b/tests/pass/shims/windows-threadname.rs @@ -1,4 +1,5 @@ -//@only-target-windows: this directly tests windows-only functions +// this directly tests windows-only functions +//@only-target: windows use std::ffi::OsStr; use std::os::windows::ffi::OsStrExt; diff --git a/tests/pass/shims/x86/intrinsics-sha.rs b/tests/pass/shims/x86/intrinsics-sha.rs index 79ac4432df..da3528a32f 100644 --- a/tests/pass/shims/x86/intrinsics-sha.rs +++ b/tests/pass/shims/x86/intrinsics-sha.rs @@ -1,12 +1,7 @@ // Ignore everything except x86 and x86_64 // Any new targets that are added to CI should be ignored here. // (We cannot use `cfg`-based tricks here since the `target-feature` flags below only work on x86.) -//@ignore-target-aarch64 -//@ignore-target-arm -//@ignore-target-avr -//@ignore-target-s390x -//@ignore-target-thumbv7em -//@ignore-target-wasm +//@ignore-target: aarch64 arm avr s390x thumbv7em wasm //@compile-flags: -C target-feature=+sha,+sse2,+ssse3,+sse4.1 #[cfg(target_arch = "x86")] diff --git a/tests/pass/shims/x86/intrinsics-x86-adx.rs b/tests/pass/shims/x86/intrinsics-x86-adx.rs index 0fd4b7c091..4ee09ed0f8 100644 --- a/tests/pass/shims/x86/intrinsics-x86-adx.rs +++ b/tests/pass/shims/x86/intrinsics-x86-adx.rs @@ -1,12 +1,7 @@ // Ignore everything except x86 and x86_64 // Any new targets that are added to CI should be ignored here. // (We cannot use `cfg`-based tricks here since the `target-feature` flags below only work on x86.) -//@ignore-target-aarch64 -//@ignore-target-arm -//@ignore-target-avr -//@ignore-target-s390x -//@ignore-target-thumbv7em -//@ignore-target-wasm +//@ignore-target: aarch64 arm avr s390x thumbv7em wasm //@compile-flags: -C target-feature=+adx #[cfg(any(target_arch = "x86", target_arch = "x86_64"))] diff --git a/tests/pass/shims/x86/intrinsics-x86-aes-vaes.rs b/tests/pass/shims/x86/intrinsics-x86-aes-vaes.rs index d4d1b6180a..ddca02ba7b 100644 --- a/tests/pass/shims/x86/intrinsics-x86-aes-vaes.rs +++ b/tests/pass/shims/x86/intrinsics-x86-aes-vaes.rs @@ -1,12 +1,7 @@ // Ignore everything except x86 and x86_64 // Any new targets that are added to CI should be ignored here. // (We cannot use `cfg`-based tricks here since the `target-feature` flags below only work on x86.) -//@ignore-target-aarch64 -//@ignore-target-arm -//@ignore-target-avr -//@ignore-target-s390x -//@ignore-target-thumbv7em -//@ignore-target-wasm +//@ignore-target: aarch64 arm avr s390x thumbv7em wasm //@compile-flags: -C target-feature=+aes,+vaes,+avx512f #![feature(avx512_target_feature, stdarch_x86_avx512)] diff --git a/tests/pass/shims/x86/intrinsics-x86-avx.rs b/tests/pass/shims/x86/intrinsics-x86-avx.rs index 3847a80be9..f47cf30bec 100644 --- a/tests/pass/shims/x86/intrinsics-x86-avx.rs +++ b/tests/pass/shims/x86/intrinsics-x86-avx.rs @@ -1,12 +1,7 @@ // Ignore everything except x86 and x86_64 // Any new targets that are added to CI should be ignored here. // (We cannot use `cfg`-based tricks here since the `target-feature` flags below only work on x86.) -//@ignore-target-aarch64 -//@ignore-target-arm -//@ignore-target-avr -//@ignore-target-s390x -//@ignore-target-thumbv7em -//@ignore-target-wasm +//@ignore-target: aarch64 arm avr s390x thumbv7em wasm //@compile-flags: -C target-feature=+avx #[cfg(target_arch = "x86")] diff --git a/tests/pass/shims/x86/intrinsics-x86-avx2.rs b/tests/pass/shims/x86/intrinsics-x86-avx2.rs index 8b8d8880e3..cf71d324cb 100644 --- a/tests/pass/shims/x86/intrinsics-x86-avx2.rs +++ b/tests/pass/shims/x86/intrinsics-x86-avx2.rs @@ -1,12 +1,7 @@ // Ignore everything except x86 and x86_64 // Any new targets that are added to CI should be ignored here. // (We cannot use `cfg`-based tricks here since the `target-feature` flags below only work on x86.) -//@ignore-target-aarch64 -//@ignore-target-arm -//@ignore-target-avr -//@ignore-target-s390x -//@ignore-target-thumbv7em -//@ignore-target-wasm +//@ignore-target: aarch64 arm avr s390x thumbv7em wasm //@compile-flags: -C target-feature=+avx2 #[cfg(target_arch = "x86")] diff --git a/tests/pass/shims/x86/intrinsics-x86-avx512.rs b/tests/pass/shims/x86/intrinsics-x86-avx512.rs index a40eddde97..e185b372ea 100644 --- a/tests/pass/shims/x86/intrinsics-x86-avx512.rs +++ b/tests/pass/shims/x86/intrinsics-x86-avx512.rs @@ -1,12 +1,7 @@ // Ignore everything except x86 and x86_64 // Any new targets that are added to CI should be ignored here. // (We cannot use `cfg`-based tricks here since the `target-feature` flags below only work on x86.) -//@ignore-target-aarch64 -//@ignore-target-arm -//@ignore-target-avr -//@ignore-target-s390x -//@ignore-target-thumbv7em -//@ignore-target-wasm +//@ignore-target: aarch64 arm avr s390x thumbv7em wasm //@compile-flags: -C target-feature=+avx512f,+avx512vl,+avx512bitalg,+avx512vpopcntdq #![feature(avx512_target_feature)] diff --git a/tests/pass/shims/x86/intrinsics-x86-bmi.rs b/tests/pass/shims/x86/intrinsics-x86-bmi.rs index 02f57f4b45..84b1cecaf0 100644 --- a/tests/pass/shims/x86/intrinsics-x86-bmi.rs +++ b/tests/pass/shims/x86/intrinsics-x86-bmi.rs @@ -1,12 +1,7 @@ // Ignore everything except x86 and x86_64 // Any new targets that are added to CI should be ignored here. // (We cannot use `cfg`-based tricks here since the `target-feature` flags below only work on x86.) -//@ignore-target-aarch64 -//@ignore-target-arm -//@ignore-target-avr -//@ignore-target-s390x -//@ignore-target-thumbv7em -//@ignore-target-wasm +//@ignore-target: aarch64 arm avr s390x thumbv7em wasm //@compile-flags: -C target-feature=+bmi1,+bmi2 #[cfg(target_arch = "x86")] diff --git a/tests/pass/shims/x86/intrinsics-x86-pause-without-sse2.rs b/tests/pass/shims/x86/intrinsics-x86-pause-without-sse2.rs index 60da88df04..397868f51b 100644 --- a/tests/pass/shims/x86/intrinsics-x86-pause-without-sse2.rs +++ b/tests/pass/shims/x86/intrinsics-x86-pause-without-sse2.rs @@ -1,12 +1,7 @@ // Ignore everything except x86 and x86_64 // Any new targets that are added to CI should be ignored here. // (We cannot use `cfg`-based tricks here since the `target-feature` flags below only work on x86.) -//@ignore-target-aarch64 -//@ignore-target-arm -//@ignore-target-avr -//@ignore-target-s390x -//@ignore-target-thumbv7em -//@ignore-target-wasm +//@ignore-target: aarch64 arm avr s390x thumbv7em wasm //@compile-flags: -C target-feature=-sse2 #[cfg(target_arch = "x86")] diff --git a/tests/pass/shims/x86/intrinsics-x86-pclmulqdq.rs b/tests/pass/shims/x86/intrinsics-x86-pclmulqdq.rs index 86ac5835a1..73ee0339ea 100644 --- a/tests/pass/shims/x86/intrinsics-x86-pclmulqdq.rs +++ b/tests/pass/shims/x86/intrinsics-x86-pclmulqdq.rs @@ -1,12 +1,7 @@ // Ignore everything except x86 and x86_64 // Any new targets that are added to CI should be ignored here. // (We cannot use `cfg`-based tricks here since the `target-feature` flags below only work on x86.) -//@ignore-target-aarch64 -//@ignore-target-arm -//@ignore-target-avr -//@ignore-target-s390x -//@ignore-target-thumbv7em -//@ignore-target-wasm +//@ignore-target: aarch64 arm avr s390x thumbv7em wasm //@compile-flags: -C target-feature=+pclmulqdq #[cfg(target_arch = "x86")] diff --git a/tests/pass/shims/x86/intrinsics-x86-sse3-ssse3.rs b/tests/pass/shims/x86/intrinsics-x86-sse3-ssse3.rs index 0b3be7f3cb..fe236c2158 100644 --- a/tests/pass/shims/x86/intrinsics-x86-sse3-ssse3.rs +++ b/tests/pass/shims/x86/intrinsics-x86-sse3-ssse3.rs @@ -1,12 +1,7 @@ // Ignore everything except x86 and x86_64 // Any new targets that are added to CI should be ignored here. // (We cannot use `cfg`-based tricks here since the `target-feature` flags below only work on x86.) -//@ignore-target-aarch64 -//@ignore-target-arm -//@ignore-target-avr -//@ignore-target-s390x -//@ignore-target-thumbv7em -//@ignore-target-wasm +//@ignore-target: aarch64 arm avr s390x thumbv7em wasm // SSSE3 implicitly enables SSE3 //@compile-flags: -C target-feature=+ssse3 diff --git a/tests/pass/shims/x86/intrinsics-x86-sse41.rs b/tests/pass/shims/x86/intrinsics-x86-sse41.rs index 8cd4e6308e..b9e84e264a 100644 --- a/tests/pass/shims/x86/intrinsics-x86-sse41.rs +++ b/tests/pass/shims/x86/intrinsics-x86-sse41.rs @@ -1,12 +1,7 @@ // Ignore everything except x86 and x86_64 // Any new targets that are added to CI should be ignored here. // (We cannot use `cfg`-based tricks here since the `target-feature` flags below only work on x86.) -//@ignore-target-aarch64 -//@ignore-target-arm -//@ignore-target-avr -//@ignore-target-s390x -//@ignore-target-thumbv7em -//@ignore-target-wasm +//@ignore-target: aarch64 arm avr s390x thumbv7em wasm //@compile-flags: -C target-feature=+sse4.1 #[cfg(target_arch = "x86")] diff --git a/tests/pass/shims/x86/intrinsics-x86-sse42.rs b/tests/pass/shims/x86/intrinsics-x86-sse42.rs index c87eb51877..1e24c226f9 100644 --- a/tests/pass/shims/x86/intrinsics-x86-sse42.rs +++ b/tests/pass/shims/x86/intrinsics-x86-sse42.rs @@ -1,12 +1,7 @@ // Ignore everything except x86 and x86_64 // Any new targets that are added to CI should be ignored here. // (We cannot use `cfg`-based tricks here since the `target-feature` flags below only work on x86.) -//@ignore-target-aarch64 -//@ignore-target-arm -//@ignore-target-avr -//@ignore-target-s390x -//@ignore-target-thumbv7em -//@ignore-target-wasm +//@ignore-target: aarch64 arm avr s390x thumbv7em wasm //@compile-flags: -C target-feature=+sse4.2 #[cfg(target_arch = "x86")] diff --git a/tests/pass/stacked-borrows/issue-miri-2389.stderr b/tests/pass/stacked-borrows/issue-miri-2389.stderr index 216bb6c76b..bcb7a65e90 100644 --- a/tests/pass/stacked-borrows/issue-miri-2389.stderr +++ b/tests/pass/stacked-borrows/issue-miri-2389.stderr @@ -1,5 +1,5 @@ warning: integer-to-pointer cast - --> $DIR/issue-miri-2389.rs:LL:CC + --> tests/pass/stacked-borrows/issue-miri-2389.rs:LL:CC | LL | let wildcard = &root0 as *const Cell as usize as *const Cell; | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ integer-to-pointer cast @@ -10,5 +10,5 @@ LL | let wildcard = &root0 as *const Cell as usize as *const Cell PathBuf { PathBuf::from(env::var("MIRI").unwrap_or_else(|_| env!("CARGO_BIN_EXE_miri").into())) @@ -77,32 +88,57 @@ fn miri_config(target: &str, path: &str, mode: Mode, with_dependencies: bool) -> let mut config = Config { target: Some(target.to_owned()), - stderr_filters: stderr_filters().into(), - stdout_filters: stdout_filters().into(), - mode, program, out_dir: PathBuf::from(std::env::var_os("CARGO_TARGET_DIR").unwrap()).join("miri_ui"), - edition: Some("2021".into()), // keep in sync with `./miri run` threads: std::env::var("MIRI_TEST_THREADS") .ok() .map(|threads| NonZero::new(threads.parse().unwrap()).unwrap()), ..Config::rustc(path) }; + config.comment_defaults.base().exit_status = match mode { + Mode::Pass => Some(0_i32), + Mode::Fail => Some(1), + Mode::Yolo => None, + Mode::Panic => Some(101), + } + .map(Spanned::dummy) + .into(); + + config.comment_defaults.base().require_annotations = Spanned::dummy(match mode { + Mode::Pass => false, + Mode::Fail => true, + Mode::Yolo => false, + Mode::Panic => false, + }) + .into(); + + config.comment_defaults.base().normalize_stderr = + stderr_filters().iter().map(|(m, p)| (m.clone(), p.to_vec())).collect(); + config.comment_defaults.base().normalize_stdout = + stdout_filters().iter().map(|(m, p)| (m.clone(), p.to_vec())).collect(); + + // keep in sync with `./miri run` + config.comment_defaults.base().add_custom("edition", Edition("2021".into())); + if with_dependencies { // Set the `cargo-miri` binary, which we expect to be in the same folder as the `miri` binary. // (It's a separate crate, so we don't get an env var from cargo.) - config.dependency_builder.program = { + let mut program = CommandBuilder::cargo(); + program.program = { let mut prog = miri_path(); prog.set_file_name(format!("cargo-miri{}", env::consts::EXE_SUFFIX)); prog }; let builder_args = ["miri", "run"]; // There is no `cargo miri build` so we just use `cargo miri run`. - config.dependency_builder.args = builder_args.into_iter().map(Into::into).collect(); - config.dependencies_crate_manifest_path = - Some(Path::new("test_dependencies").join("Cargo.toml")); + program.args = builder_args.into_iter().map(Into::into).collect(); + let crate_manifest_path = Path::new("test_dependencies").join("Cargo.toml"); // Reset `RUSTFLAGS` to work around . - config.dependency_builder.envs.push(("RUSTFLAGS".into(), None)); + program.envs.push(("RUSTFLAGS".into(), None)); + config.comment_defaults.base().set_custom( + "dependencies", + DependencyBuilder { program, crate_manifest_path, build_std: None }, + ); } config } @@ -140,8 +176,6 @@ fn run_tests( } } config.program.args.push("-Zui-testing".into()); - config.program.args.push("--target".into()); - config.program.args.push(target.into()); // If we're testing the native-lib functionality, then build the shared object file for testing // external C function calls and push the relevant compiler flag. @@ -155,10 +189,9 @@ fn run_tests( // Handle command-line arguments. let args = ui_test::Args::test()?; let default_bless = env::var_os("RUSTC_BLESS").is_some_and(|v| v != "0"); - config.with_args(&args, default_bless); - if let OutputConflictHandling::Error(msg) = &mut config.output_conflict_handling { - *msg = "./miri test --bless".into(); - } + config.with_args(&args); + config.bless_command = Some("./miri test --bless".into()); + if env::var_os("MIRI_SKIP_UI_CHECKS").is_some() { assert!(!default_bless, "cannot use RUSTC_BLESS and MIRI_SKIP_UI_CHECKS at the same time"); config.output_conflict_handling = OutputConflictHandling::Ignore; @@ -171,7 +204,7 @@ fn run_tests( // The files we're actually interested in (all `.rs` files). ui_test::default_file_filter, // This could be used to overwrite the `Config` on a per-test basis. - |_, _, _| {}, + |_, _| {}, ( match args.format { Format::Terse => status_emitter::Text::quiet(), @@ -287,47 +320,28 @@ fn main() -> Result<()> { ui(Mode::Pass, "tests/pass", &target, WithoutDependencies, tmpdir.path())?; ui(Mode::Pass, "tests/pass-dep", &target, WithDependencies, tmpdir.path())?; ui(Mode::Panic, "tests/panic", &target, WithDependencies, tmpdir.path())?; - ui( - Mode::Fail { require_patterns: true, rustfix: RustfixMode::Disabled }, - "tests/fail", - &target, - WithoutDependencies, - tmpdir.path(), - )?; - ui( - Mode::Fail { require_patterns: true, rustfix: RustfixMode::Disabled }, - "tests/fail-dep", - &target, - WithDependencies, - tmpdir.path(), - )?; + ui(Mode::Fail, "tests/fail", &target, WithoutDependencies, tmpdir.path())?; + ui(Mode::Fail, "tests/fail-dep", &target, WithDependencies, tmpdir.path())?; if cfg!(unix) { ui(Mode::Pass, "tests/native-lib/pass", &target, WithoutDependencies, tmpdir.path())?; - ui( - Mode::Fail { require_patterns: true, rustfix: RustfixMode::Disabled }, - "tests/native-lib/fail", - &target, - WithoutDependencies, - tmpdir.path(), - )?; + ui(Mode::Fail, "tests/native-lib/fail", &target, WithoutDependencies, tmpdir.path())?; } Ok(()) } fn run_dep_mode(target: String, args: impl Iterator) -> Result<()> { - let mut config = miri_config( - &target, - "", - Mode::Yolo { rustfix: RustfixMode::Disabled }, - /* with dependencies */ true, - ); - config.program.args.clear(); // remove the `--error-format` that ui_test adds by default - let dep_args = config.build_dependencies()?; + let mut config = miri_config(&target, "", Mode::Yolo, /* with dependencies */ true); + config.comment_defaults.base().custom.remove("edition"); + config.fill_host_and_target()?; + config.program.args = args.collect(); + + let test_config = TestConfig::one_off_runner(config.clone(), PathBuf::new()); - let mut cmd = config.program.build(&config.out_dir); - cmd.args(dep_args); + let build_manager = BuildManager::new(config, bounded(1).0); + let mut cmd = test_config.config.program.build(&test_config.config.out_dir); + // Build dependencies + test_config.apply_custom(&mut cmd, &build_manager).unwrap(); - cmd.args(args); if cmd.spawn()?.wait()?.success() { Ok(()) } else { std::process::exit(1) } }