mirror of
https://github.com/rust-lang/rust.git
synced 2025-02-19 10:24:16 +00:00
Bump ui test
This commit is contained in:
parent
157dd83b63
commit
9f9f19810f
@ -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",
|
||||
@ -737,11 +734,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 +862,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 +959,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 +1072,9 @@ checksum = "42ff0bf0c66b8238c6f3b578df37d0b7848e55df8577b3f74f92a69acceeb825"
|
||||
|
||||
[[package]]
|
||||
name = "ui_test"
|
||||
version = "0.21.2"
|
||||
version = "0.26.5"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "aaf4bf7c184b8dfc7a4d3b90df789b1eb992ee42811cd115f32a7a1eb781058d"
|
||||
checksum = "32ee4c40e5a5f9fa6864ff976473e5d6a6e9884b6ce68b40690d9f87e1994c83"
|
||||
dependencies = [
|
||||
"annotate-snippets",
|
||||
"anyhow",
|
||||
@ -1079,7 +1086,6 @@ dependencies = [
|
||||
"comma",
|
||||
"crossbeam-channel",
|
||||
"indicatif",
|
||||
"lazy_static",
|
||||
"levenshtein",
|
||||
"prettydiff",
|
||||
"regex",
|
||||
@ -1087,7 +1093,7 @@ dependencies = [
|
||||
"rustfix",
|
||||
"serde",
|
||||
"serde_json",
|
||||
"tempfile",
|
||||
"spanned",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
@ -1120,28 +1126,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 +1265,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"
|
||||
|
@ -49,7 +49,7 @@ windows-sys = { version = "0.52", features = [
|
||||
|
||||
[dev-dependencies]
|
||||
colored = "2"
|
||||
ui_test = "0.21.1"
|
||||
ui_test = "0.26.5"
|
||||
rustc_version = "0.4"
|
||||
regex = "1.5.5"
|
||||
tempfile = "3"
|
||||
|
@ -1,4 +1,4 @@
|
||||
//@ only-target-darwin
|
||||
//@only-target: darwin
|
||||
|
||||
use std::cell::UnsafeCell;
|
||||
|
||||
|
@ -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
|
||||
|
||||
|
@ -1,4 +1,4 @@
|
||||
//@ only-target-darwin
|
||||
//@only-target: darwin
|
||||
|
||||
use std::cell::UnsafeCell;
|
||||
|
||||
|
@ -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
|
||||
|
||||
|
@ -1,4 +1,4 @@
|
||||
//@ only-target-darwin
|
||||
//@only-target: darwin
|
||||
|
||||
use std::cell::UnsafeCell;
|
||||
|
||||
|
@ -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
|
||||
|
||||
|
@ -1,4 +1,4 @@
|
||||
//@ only-target-darwin
|
||||
//@only-target: darwin
|
||||
|
||||
use std::cell::UnsafeCell;
|
||||
|
||||
|
@ -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
|
||||
|
||||
|
@ -1,4 +1,4 @@
|
||||
//@ignore-target-windows: No pthreads on Windows
|
||||
//@ignore-target: windows # No pthreads on Windows
|
||||
|
||||
/// Test that destroying a pthread_cond twice fails, even without a check for number validity
|
||||
|
||||
|
@ -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
|
||||
|
||||
|
@ -1,5 +1,5 @@
|
||||
error: Undefined Behavior: pthread_cond_t can't be moved after first use
|
||||
--> $DIR/libc_pthread_cond_move.rs:LL:CC
|
||||
--> tests/fail-dep/concurrency/libc_pthread_cond_move.rs:LL:CC
|
||||
|
|
||||
LL | libc::pthread_cond_destroy(cond2.as_mut_ptr());
|
||||
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ pthread_cond_t can't be moved after first use
|
||||
@ -7,9 +7,9 @@ LL | libc::pthread_cond_destroy(cond2.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 `check` at $DIR/libc_pthread_cond_move.rs:LL:CC
|
||||
= note: inside `check` at tests/fail-dep/concurrency/libc_pthread_cond_move.rs:LL:CC
|
||||
note: inside `main`
|
||||
--> $DIR/libc_pthread_cond_move.rs:LL:CC
|
||||
--> tests/fail-dep/concurrency/libc_pthread_cond_move.rs:LL:CC
|
||||
|
|
||||
LL | check()
|
||||
| ^^^^^^^
|
||||
|
@ -1,5 +1,5 @@
|
||||
//@revisions: static_initializer init
|
||||
//@ignore-target-windows: No pthreads on Windows
|
||||
//@ignore-target: windows # No pthreads on Windows
|
||||
|
||||
/// Test that moving a pthread_cond between uses fails.
|
||||
|
||||
|
@ -1,5 +1,5 @@
|
||||
error: Undefined Behavior: pthread_cond_t can't be moved after first use
|
||||
--> $DIR/libc_pthread_cond_move.rs:LL:CC
|
||||
--> tests/fail-dep/concurrency/libc_pthread_cond_move.rs:LL:CC
|
||||
|
|
||||
LL | libc::pthread_cond_destroy(&mut cond2 as *mut _);
|
||||
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ pthread_cond_t can't be moved after first use
|
||||
@ -7,9 +7,9 @@ LL | libc::pthread_cond_destroy(&mut cond2 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_cond_move.rs:LL:CC
|
||||
= note: inside `check` at tests/fail-dep/concurrency/libc_pthread_cond_move.rs:LL:CC
|
||||
note: inside `main`
|
||||
--> $DIR/libc_pthread_cond_move.rs:LL:CC
|
||||
--> tests/fail-dep/concurrency/libc_pthread_cond_move.rs:LL:CC
|
||||
|
|
||||
LL | check()
|
||||
| ^^^^^^^
|
||||
|
@ -1,5 +1,5 @@
|
||||
//@ignore-target-windows: No pthreads on Windows
|
||||
//@ignore-target-apple: Our macOS condattr don't have any fields so we do not notice this.
|
||||
//@ignore-target: windows # No pthreads on Windows
|
||||
//@ignore-target: apple # Our macOS condattr don't have any fields so we do not notice this.
|
||||
|
||||
/// Test that destroying a pthread_condattr twice fails, even without a check for number validity
|
||||
|
||||
|
@ -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
|
||||
|
||||
|
@ -1,4 +1,4 @@
|
||||
//@ignore-target-windows: No pthreads on Windows
|
||||
//@ignore-target: windows # No pthreads on 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.
|
||||
|
@ -1,4 +1,4 @@
|
||||
//@ignore-target-windows: No pthreads on Windows
|
||||
//@ignore-target: windows # No pthreads on Windows
|
||||
//~^ERROR: calling a function with more arguments than it expected
|
||||
|
||||
//! The thread function must have exactly one argument.
|
||||
|
@ -1,4 +1,4 @@
|
||||
//@ignore-target-windows: No pthreads on Windows
|
||||
//@ignore-target: windows # No pthreads on Windows
|
||||
//~^ERROR: calling a function with fewer arguments than it requires
|
||||
|
||||
//! The thread function must have exactly one argument.
|
||||
|
@ -1,4 +1,4 @@
|
||||
//@ignore-target-windows: No pthreads on Windows
|
||||
//@ignore-target: windows # No pthreads on Windows
|
||||
|
||||
// Joining a detached thread is undefined behavior.
|
||||
|
||||
|
@ -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
|
||||
|
||||
|
@ -1,4 +1,4 @@
|
||||
//@ignore-target-windows: No pthreads on Windows
|
||||
//@ignore-target: windows # No pthreads on Windows
|
||||
|
||||
// Joining an already joined thread is undefined behavior.
|
||||
|
||||
|
@ -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
|
||||
|
||||
|
@ -1,4 +1,4 @@
|
||||
//@ignore-target-windows: No pthreads on Windows
|
||||
//@ignore-target: windows # No pthreads on Windows
|
||||
|
||||
// Joining the main thread is undefined behavior.
|
||||
|
||||
|
@ -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
|
||||
|
||||
|
@ -1,4 +1,4 @@
|
||||
//@ignore-target-windows: No pthreads on Windows
|
||||
//@ignore-target: windows # No pthreads on Windows
|
||||
|
||||
// Joining the same thread from multiple threads is undefined behavior.
|
||||
|
||||
|
@ -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
|
||||
|
||||
|
@ -1,4 +1,4 @@
|
||||
//@ignore-target-windows: No pthreads on Windows
|
||||
//@ignore-target: windows # No pthreads on Windows
|
||||
// We are making scheduler assumptions here.
|
||||
//@compile-flags: -Zmiri-preemption-rate=0
|
||||
|
||||
|
@ -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
|
||||
|
||||
|
@ -1,4 +1,4 @@
|
||||
//@ignore-target-windows: No pthreads on Windows
|
||||
//@ignore-target: windows # No pthreads on Windows
|
||||
//
|
||||
// Check that if we pass NULL attribute, then we get the default mutex type.
|
||||
|
||||
|
@ -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
|
||||
|
||||
|
@ -1,4 +1,4 @@
|
||||
//@ignore-target-windows: No pthreads on Windows
|
||||
//@ignore-target: windows # No pthreads on Windows
|
||||
//@error-in-other-file: deadlock
|
||||
|
||||
use std::cell::UnsafeCell;
|
||||
|
@ -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);
|
||||
|
@ -1,4 +1,4 @@
|
||||
//@ignore-target-windows: No pthreads on Windows
|
||||
//@ignore-target: windows # No pthreads on Windows
|
||||
//
|
||||
// Check that if we do not set the mutex type, it is the default.
|
||||
|
||||
|
@ -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
|
||||
|
||||
|
@ -1,4 +1,4 @@
|
||||
//@ignore-target-windows: No pthreads on Windows
|
||||
//@ignore-target: windows # No pthreads on Windows
|
||||
|
||||
fn main() {
|
||||
unsafe {
|
||||
|
@ -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
|
||||
|
||||
|
@ -1,4 +1,4 @@
|
||||
//@ignore-target-windows: No pthreads on Windows
|
||||
//@ignore-target: windows # No pthreads on Windows
|
||||
|
||||
/// Test that destroying a pthread_mutex twice fails, even without a check for number validity
|
||||
|
||||
|
@ -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
|
||||
|
||||
|
@ -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();
|
||||
| ^^^^^^^
|
||||
|
@ -1,4 +1,4 @@
|
||||
//@ignore-target-windows: No pthreads on Windows
|
||||
//@ignore-target: windows # No pthreads on Windows
|
||||
//@revisions: static_initializer init
|
||||
|
||||
fn main() {
|
||||
|
@ -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();
|
||||
| ^^^^^^^
|
||||
|
@ -1,4 +1,4 @@
|
||||
//@ignore-target-windows: No pthreads on Windows
|
||||
//@ignore-target: windows # No pthreads on Windows
|
||||
|
||||
fn main() {
|
||||
unsafe {
|
||||
|
@ -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
|
||||
|
||||
|
@ -1,4 +1,4 @@
|
||||
//@ignore-target-windows: No pthreads on Windows
|
||||
//@ignore-target: windows # No pthreads on Windows
|
||||
|
||||
fn main() {
|
||||
unsafe {
|
||||
|
@ -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
|
||||
|
||||
|
@ -1,4 +1,4 @@
|
||||
//@ignore-target-windows: No pthreads on Windows
|
||||
//@ignore-target: windows # No pthreads on Windows
|
||||
|
||||
use std::cell::UnsafeCell;
|
||||
use std::sync::Arc;
|
||||
|
@ -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
|
||||
|
||||
|
@ -1,4 +1,4 @@
|
||||
//@ignore-target-windows: No pthreads on Windows
|
||||
//@ignore-target: windows # No pthreads on Windows
|
||||
|
||||
/// Test that destroying a pthread_mutexattr twice fails, even without a check for number validity
|
||||
|
||||
|
@ -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
|
||||
|
||||
|
@ -1,4 +1,4 @@
|
||||
//@ignore-target-windows: No pthreads on Windows
|
||||
//@ignore-target: windows # No pthreads on Windows
|
||||
|
||||
fn main() {
|
||||
let rw = std::cell::UnsafeCell::new(libc::PTHREAD_RWLOCK_INITIALIZER);
|
||||
|
@ -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
|
||||
|
||||
|
@ -1,4 +1,4 @@
|
||||
//@ignore-target-windows: No pthreads on Windows
|
||||
//@ignore-target: windows # No pthreads on Windows
|
||||
|
||||
fn main() {
|
||||
let rw = std::cell::UnsafeCell::new(libc::PTHREAD_RWLOCK_INITIALIZER);
|
||||
|
@ -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
|
||||
|
||||
|
@ -1,4 +1,4 @@
|
||||
//@ignore-target-windows: No pthreads on Windows
|
||||
//@ignore-target: windows # No pthreads on Windows
|
||||
|
||||
/// Test that destroying a pthread_rwlock twice fails, even without a check for number validity
|
||||
|
||||
|
@ -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
|
||||
|
||||
|
@ -1,4 +1,4 @@
|
||||
//@ignore-target-windows: No pthreads on Windows
|
||||
//@ignore-target: windows # No pthreads on Windows
|
||||
|
||||
fn main() {
|
||||
let rw = std::cell::UnsafeCell::new(libc::PTHREAD_RWLOCK_INITIALIZER);
|
||||
|
@ -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
|
||||
|
||||
|
@ -1,4 +1,4 @@
|
||||
//@ignore-target-windows: No pthreads on Windows
|
||||
//@ignore-target: windows # No pthreads on Windows
|
||||
|
||||
use std::cell::UnsafeCell;
|
||||
use std::sync::Arc;
|
||||
|
@ -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
|
||||
|
||||
|
@ -1,4 +1,4 @@
|
||||
//@ignore-target-windows: No pthreads on Windows
|
||||
//@ignore-target: windows # No pthreads on Windows
|
||||
|
||||
fn main() {
|
||||
let rw = std::cell::UnsafeCell::new(libc::PTHREAD_RWLOCK_INITIALIZER);
|
||||
|
@ -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
|
||||
|
||||
|
@ -1,4 +1,4 @@
|
||||
//@ignore-target-windows: No pthreads on Windows
|
||||
//@ignore-target: windows # No pthreads on Windows
|
||||
//@error-in-other-file: deadlock
|
||||
|
||||
use std::cell::UnsafeCell;
|
||||
|
@ -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);
|
||||
|
@ -1,4 +1,4 @@
|
||||
//@ignore-target-windows: No pthreads on Windows
|
||||
//@ignore-target: windows # No pthreads on Windows
|
||||
|
||||
fn main() {
|
||||
let rw = std::cell::UnsafeCell::new(libc::PTHREAD_RWLOCK_INITIALIZER);
|
||||
|
@ -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
|
||||
|
||||
|
@ -1,4 +1,4 @@
|
||||
//@ignore-target-windows: No pthreads on Windows
|
||||
//@ignore-target: windows # No pthreads on Windows
|
||||
//@error-in-other-file: deadlock
|
||||
|
||||
use std::cell::UnsafeCell;
|
||||
|
@ -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);
|
||||
|
@ -1,4 +1,4 @@
|
||||
//@ignore-target-windows: No pthreads on Windows
|
||||
//@ignore-target: windows # No pthreads on Windows
|
||||
|
||||
fn main() {
|
||||
let rw = std::cell::UnsafeCell::new(libc::PTHREAD_RWLOCK_INITIALIZER);
|
||||
|
@ -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
|
||||
|
||||
|
@ -1,4 +1,4 @@
|
||||
//@ignore-target-windows: No pthreads on Windows
|
||||
//@ignore-target: windows # No pthreads on Windows
|
||||
|
||||
use std::cell::UnsafeCell;
|
||||
use std::sync::Arc;
|
||||
|
@ -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
|
||||
|
||||
|
@ -1,4 +1,4 @@
|
||||
//@ignore-target-windows: No pthreads on Windows
|
||||
//@ignore-target: windows # No pthreads on Windows
|
||||
|
||||
fn main() {
|
||||
unsafe {
|
||||
|
@ -1,5 +1,5 @@
|
||||
error: Undefined Behavior: pthread_rwlock_t can't be moved after first use
|
||||
--> $DIR/libx_pthread_rwlock_moved.rs:LL:CC
|
||||
--> tests/fail-dep/concurrency/libx_pthread_rwlock_moved.rs:LL:CC
|
||||
|
|
||||
LL | libc::pthread_rwlock_unlock(&mut rw2 as *mut _);
|
||||
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ pthread_rwlock_t can't be moved after first use
|
||||
@ -7,7 +7,7 @@ LL | libc::pthread_rwlock_unlock(&mut rw2 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/libx_pthread_rwlock_moved.rs:LL:CC
|
||||
= note: inside `main` at tests/fail-dep/concurrency/libx_pthread_rwlock_moved.rs:LL:CC
|
||||
|
||||
note: some details are omitted, run with `MIRIFLAGS=-Zmiri-backtrace=full` for a verbose backtrace
|
||||
|
||||
|
@ -1,4 +1,4 @@
|
||||
//@only-target-windows: Uses win32 api functions
|
||||
//@only-target: windows # Uses win32 api functions
|
||||
//@error-in-other-file: Undefined Behavior: trying to join a detached thread
|
||||
|
||||
// Joining a detached thread is undefined behavior.
|
||||
|
@ -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();
|
||||
| ^^^^^^^^^^^^^
|
||||
|
@ -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
|
||||
//@error-in-other-file: deadlock
|
||||
|
@ -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 {
|
||||
|
@ -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
|
||||
//@error-in-other-file: deadlock
|
||||
|
@ -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 {
|
||||
|
@ -1,5 +1,5 @@
|
||||
//@ignore-target-windows: only very limited libc on Windows
|
||||
//@ignore-target-apple: `sched_setaffinity` is not supported on macOS
|
||||
//@ignore-target: windows # only very limited libc on Windows
|
||||
//@ignore-target: apple # `sched_setaffinity` is not supported on macOS
|
||||
//@compile-flags: -Zmiri-disable-isolation -Zmiri-num-cpus=4
|
||||
|
||||
fn main() {
|
||||
|
@ -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::<cpu_set_t>() + 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::<cpu_set_t>() + 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
|
||||
|
||||
|
@ -1,4 +1,4 @@
|
||||
//@ignore-target-windows: Windows does not support the standard C11 aligned_alloc.
|
||||
//@ignore-target: windows # Windows does not support the standard C11 aligned_alloc.
|
||||
|
||||
fn main() {
|
||||
// libc doesn't have this function (https://github.com/rust-lang/libc/issues/3689),
|
||||
|
@ -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
|
||||
|
||||
|
@ -1,5 +1,5 @@
|
||||
//@compile-flags: -Zmiri-disable-isolation -Zmiri-preemption-rate=0
|
||||
//@ignore-target-windows: No libc env support on Windows
|
||||
//@ignore-target: windows # No libc env support on Windows
|
||||
|
||||
use std::env;
|
||||
use std::thread;
|
||||
|
@ -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
|
||||
|
||||
|
@ -1,4 +1,4 @@
|
||||
//@ignore-target-windows: No libc IO on Windows
|
||||
//@ignore-target: windows # No libc IO on Windows
|
||||
//@compile-flags: -Zmiri-disable-isolation
|
||||
|
||||
// FIXME: standard handles cannot be closed (https://github.com/rust-lang/rust/issues/40032)
|
||||
|
@ -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
|
||||
|
||||
|
@ -1,4 +1,4 @@
|
||||
//@ignore-target-windows: No libc IO on Windows
|
||||
//@ignore-target: windows # No libc IO on Windows
|
||||
|
||||
fn main() -> std::io::Result<()> {
|
||||
let mut bytes = [0u8; 512];
|
||||
|
@ -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
|
||||
|
||||
|
@ -1,4 +1,4 @@
|
||||
//@ignore-target-windows: No mkstemp on Windows
|
||||
//@ignore-target: windows # No mkstemp on Windows
|
||||
//@compile-flags: -Zmiri-disable-isolation
|
||||
|
||||
fn main() {
|
||||
|
@ -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();
|
||||
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||
|
@ -1,5 +1,5 @@
|
||||
//@compile-flags: -Zmiri-disable-isolation
|
||||
//@ignore-target-windows: No libc IO on Windows
|
||||
//@ignore-target: windows # No libc IO on Windows
|
||||
|
||||
fn main() -> std::io::Result<()> {
|
||||
let mut bytes = [0u8; 512];
|
||||
|
@ -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
|
||||
|
||||
|
@ -1,4 +1,4 @@
|
||||
//@ignore-target-windows: No libc IO on Windows
|
||||
//@ignore-target: windows # No libc IO on Windows
|
||||
//@compile-flags: -Zmiri-disable-isolation
|
||||
|
||||
fn main() {
|
||||
|
@ -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();
|
||||
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||
|
@ -1,4 +1,4 @@
|
||||
//@ignore-target-windows: No libc IO on Windows
|
||||
//@ignore-target: windows # No libc IO on Windows
|
||||
|
||||
fn main() -> std::io::Result<()> {
|
||||
let bytes = b"hello";
|
||||
|
@ -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
|
||||
|
||||
|
@ -1,6 +1,6 @@
|
||||
//! 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
|
||||
//@ignore-target: windows # no file system support on Windows
|
||||
//@compile-flags: -Zmiri-disable-isolation
|
||||
|
||||
use std::ffi::CString;
|
||||
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue
Block a user