repo
stringlengths
6
65
file_url
stringlengths
81
311
file_path
stringlengths
6
227
content
stringlengths
0
32.8k
language
stringclasses
1 value
license
stringclasses
7 values
commit_sha
stringlengths
40
40
retrieved_at
stringdate
2026-01-04 15:31:58
2026-01-04 20:25:31
truncated
bool
2 classes
rust-lang/rust
https://github.com/rust-lang/rust/blob/f8b1d59a81c700cb7aa25cf69e3032b3ce333150/src/tools/miri/tests/fail/tree_borrows/reserved/cell-protected-write.rs
src/tools/miri/tests/fail/tree_borrows/reserved/cell-protected-write.rs
// We disable the GC for this test because it would change what is printed. //@compile-flags: -Zmiri-tree-borrows -Zmiri-provenance-gc=0 // Check how a Reserved with interior mutability // responds to a Foreign Write under a Protector #[path = "../../../utils/mod.rs"] #[macro_use] mod utils; use std::cell::UnsafeCell...
rust
Apache-2.0
f8b1d59a81c700cb7aa25cf69e3032b3ce333150
2026-01-04T15:31:58.503980Z
false
rust-lang/rust
https://github.com/rust-lang/rust/blob/f8b1d59a81c700cb7aa25cf69e3032b3ce333150/src/tools/miri/tests/fail/function_pointers/cast_box_int_to_fn_ptr.rs
src/tools/miri/tests/fail/function_pointers/cast_box_int_to_fn_ptr.rs
// Validation makes this fail in the wrong place //@compile-flags: -Zmiri-disable-validation fn main() { let b = Box::new(42); let g = unsafe { std::mem::transmute::<&Box<usize>, &fn(i32)>(&b) }; (*g)(42) //~ ERROR: it does not point to a function }
rust
Apache-2.0
f8b1d59a81c700cb7aa25cf69e3032b3ce333150
2026-01-04T15:31:58.503980Z
false
rust-lang/rust
https://github.com/rust-lang/rust/blob/f8b1d59a81c700cb7aa25cf69e3032b3ce333150/src/tools/miri/tests/fail/function_pointers/abi_mismatch_array_vs_struct.rs
src/tools/miri/tests/fail/function_pointers/abi_mismatch_array_vs_struct.rs
#![feature(portable_simd)] // Some targets treat arrays and structs very differently. We would probably catch that on those // targets since we check the `PassMode`; here we ensure that we catch it on *all* targets // (in particular, on x86-64 the pass mode is `Indirect` for both of these). struct S( #[allow(dead_...
rust
Apache-2.0
f8b1d59a81c700cb7aa25cf69e3032b3ce333150
2026-01-04T15:31:58.503980Z
false
rust-lang/rust
https://github.com/rust-lang/rust/blob/f8b1d59a81c700cb7aa25cf69e3032b3ce333150/src/tools/miri/tests/fail/function_pointers/abi_mismatch_vector.rs
src/tools/miri/tests/fail/function_pointers/abi_mismatch_vector.rs
#![feature(portable_simd)] use std::simd; fn main() { fn f(_: simd::u32x8) {} // These two vector types have the same size but are still not compatible. let g = unsafe { std::mem::transmute::<fn(simd::u32x8), fn(simd::u64x4)>(f) }; g(Default::default()) //~ ERROR: type std::simd::Simd<u32, 8> passing...
rust
Apache-2.0
f8b1d59a81c700cb7aa25cf69e3032b3ce333150
2026-01-04T15:31:58.503980Z
false
rust-lang/rust
https://github.com/rust-lang/rust/blob/f8b1d59a81c700cb7aa25cf69e3032b3ce333150/src/tools/miri/tests/fail/function_pointers/abi_mismatch_too_few_args.rs
src/tools/miri/tests/fail/function_pointers/abi_mismatch_too_few_args.rs
fn main() { fn f(_: (i32, i32)) {} let g = unsafe { std::mem::transmute::<fn((i32, i32)), fn()>(f) }; g() //~ ERROR: calling a function with fewer arguments than it requires }
rust
Apache-2.0
f8b1d59a81c700cb7aa25cf69e3032b3ce333150
2026-01-04T15:31:58.503980Z
false
rust-lang/rust
https://github.com/rust-lang/rust/blob/f8b1d59a81c700cb7aa25cf69e3032b3ce333150/src/tools/miri/tests/fail/function_pointers/abi_mismatch_int_vs_float.rs
src/tools/miri/tests/fail/function_pointers/abi_mismatch_int_vs_float.rs
fn main() { fn f(_: f32) {} let g = unsafe { std::mem::transmute::<fn(f32), fn(i32)>(f) }; g(42) //~ ERROR: type f32 passing argument of type i32 }
rust
Apache-2.0
f8b1d59a81c700cb7aa25cf69e3032b3ce333150
2026-01-04T15:31:58.503980Z
false
rust-lang/rust
https://github.com/rust-lang/rust/blob/f8b1d59a81c700cb7aa25cf69e3032b3ce333150/src/tools/miri/tests/fail/function_pointers/abi_mismatch_raw_pointer.rs
src/tools/miri/tests/fail/function_pointers/abi_mismatch_raw_pointer.rs
fn main() { fn f(_: *const [i32]) {} let g = unsafe { std::mem::transmute::<fn(*const [i32]), fn(*const i32)>(f) }; g(&42 as *const i32) //~ ERROR: type *const [i32] passing argument of type *const i32 }
rust
Apache-2.0
f8b1d59a81c700cb7aa25cf69e3032b3ce333150
2026-01-04T15:31:58.503980Z
false
rust-lang/rust
https://github.com/rust-lang/rust/blob/f8b1d59a81c700cb7aa25cf69e3032b3ce333150/src/tools/miri/tests/fail/function_pointers/deref_fn_ptr.rs
src/tools/miri/tests/fail/function_pointers/deref_fn_ptr.rs
fn f() {} fn main() { let x: u8 = unsafe { *std::mem::transmute::<fn(), *const u8>(f) //~ ERROR: contains a function }; panic!("this should never print: {}", x); }
rust
Apache-2.0
f8b1d59a81c700cb7aa25cf69e3032b3ce333150
2026-01-04T15:31:58.503980Z
false
rust-lang/rust
https://github.com/rust-lang/rust/blob/f8b1d59a81c700cb7aa25cf69e3032b3ce333150/src/tools/miri/tests/fail/function_pointers/execute_memory.rs
src/tools/miri/tests/fail/function_pointers/execute_memory.rs
// Validation makes this fail in the wrong place //@compile-flags: -Zmiri-disable-validation fn main() { let x = Box::new(42); unsafe { let f = std::mem::transmute::<Box<i32>, fn()>(x); f() //~ ERROR: function pointer but it does not point to a function } }
rust
Apache-2.0
f8b1d59a81c700cb7aa25cf69e3032b3ce333150
2026-01-04T15:31:58.503980Z
false
rust-lang/rust
https://github.com/rust-lang/rust/blob/f8b1d59a81c700cb7aa25cf69e3032b3ce333150/src/tools/miri/tests/fail/function_pointers/fn_ptr_offset.rs
src/tools/miri/tests/fail/function_pointers/fn_ptr_offset.rs
// Validation makes this fail in the wrong place //@compile-flags: -Zmiri-disable-validation use std::mem; fn f() {} fn main() { let x: fn() = f; let y: *mut u8 = unsafe { mem::transmute(x) }; let y = y.wrapping_offset(1); let x: fn() = unsafe { mem::transmute(y) }; x(); //~ ERROR: function point...
rust
Apache-2.0
f8b1d59a81c700cb7aa25cf69e3032b3ce333150
2026-01-04T15:31:58.503980Z
false
rust-lang/rust
https://github.com/rust-lang/rust/blob/f8b1d59a81c700cb7aa25cf69e3032b3ce333150/src/tools/miri/tests/fail/function_pointers/abi_mismatch_repr_C.rs
src/tools/miri/tests/fail/function_pointers/abi_mismatch_repr_C.rs
use std::num::NonZero; #[repr(C)] struct S1(NonZero<i32>); #[repr(C)] struct S2(i32); fn callee(_s: S2) {} fn main() { let fnptr: fn(S2) = callee; let fnptr: fn(S1) = unsafe { std::mem::transmute(fnptr) }; fnptr(S1(NonZero::new(1).unwrap())); //~^ ERROR: type S2 passing argument of type S1 }
rust
Apache-2.0
f8b1d59a81c700cb7aa25cf69e3032b3ce333150
2026-01-04T15:31:58.503980Z
false
rust-lang/rust
https://github.com/rust-lang/rust/blob/f8b1d59a81c700cb7aa25cf69e3032b3ce333150/src/tools/miri/tests/fail/function_pointers/abi_mismatch_too_many_args.rs
src/tools/miri/tests/fail/function_pointers/abi_mismatch_too_many_args.rs
fn main() { fn f() {} let g = unsafe { std::mem::transmute::<fn(), fn(i32)>(f) }; g(42) //~ ERROR: calling a function with more arguments than it expected }
rust
Apache-2.0
f8b1d59a81c700cb7aa25cf69e3032b3ce333150
2026-01-04T15:31:58.503980Z
false
rust-lang/rust
https://github.com/rust-lang/rust/blob/f8b1d59a81c700cb7aa25cf69e3032b3ce333150/src/tools/miri/tests/fail/function_pointers/cast_int_to_fn_ptr.rs
src/tools/miri/tests/fail/function_pointers/cast_int_to_fn_ptr.rs
// Validation makes this fail in the wrong place //@compile-flags: -Zmiri-disable-validation fn main() { let g = unsafe { std::mem::transmute::<usize, fn(i32)>(42) }; g(42) //~ ERROR: is a dangling pointer }
rust
Apache-2.0
f8b1d59a81c700cb7aa25cf69e3032b3ce333150
2026-01-04T15:31:58.503980Z
false
rust-lang/rust
https://github.com/rust-lang/rust/blob/f8b1d59a81c700cb7aa25cf69e3032b3ce333150/src/tools/miri/tests/fail/function_pointers/abi_mismatch_return_type.rs
src/tools/miri/tests/fail/function_pointers/abi_mismatch_return_type.rs
fn main() { fn f() -> u32 { 42 } let g = unsafe { std::mem::transmute::<fn() -> u32, fn()>(f) }; g() //~ ERROR: type u32 passing return place of type () }
rust
Apache-2.0
f8b1d59a81c700cb7aa25cf69e3032b3ce333150
2026-01-04T15:31:58.503980Z
false
rust-lang/rust
https://github.com/rust-lang/rust/blob/f8b1d59a81c700cb7aa25cf69e3032b3ce333150/src/tools/miri/tests/fail/function_pointers/abi_mismatch_simple.rs
src/tools/miri/tests/fail/function_pointers/abi_mismatch_simple.rs
fn main() { fn f(_: (i32, i32)) {} let g = unsafe { std::mem::transmute::<fn((i32, i32)), fn(i32)>(f) }; g(42) //~ ERROR: type (i32, i32) passing argument of type i32 }
rust
Apache-2.0
f8b1d59a81c700cb7aa25cf69e3032b3ce333150
2026-01-04T15:31:58.503980Z
false
rust-lang/rust
https://github.com/rust-lang/rust/blob/f8b1d59a81c700cb7aa25cf69e3032b3ce333150/src/tools/miri/tests/fail/data_race/local_variable_alloc_race.rs
src/tools/miri/tests/fail/data_race/local_variable_alloc_race.rs
//@compile-flags:-Zmiri-deterministic-concurrency #![feature(core_intrinsics)] #![feature(custom_mir)] use std::intrinsics::mir::*; use std::sync::atomic::Ordering::*; use std::sync::atomic::*; use std::thread::JoinHandle; static P: AtomicPtr<u8> = AtomicPtr::new(core::ptr::null_mut()); fn spawn_thread() -> JoinHand...
rust
Apache-2.0
f8b1d59a81c700cb7aa25cf69e3032b3ce333150
2026-01-04T15:31:58.503980Z
false
rust-lang/rust
https://github.com/rust-lang/rust/blob/f8b1d59a81c700cb7aa25cf69e3032b3ce333150/src/tools/miri/tests/fail/data_race/alloc_write_race.rs
src/tools/miri/tests/fail/data_race/alloc_write_race.rs
// We want to control preemption here. Stacked borrows interferes by having its own accesses. //@compile-flags: -Zmiri-deterministic-concurrency -Zmiri-disable-stacked-borrows use std::ptr::null_mut; use std::sync::atomic::{AtomicPtr, Ordering}; use std::thread::spawn; #[derive(Copy, Clone)] struct EvilSend<T>(pub T)...
rust
Apache-2.0
f8b1d59a81c700cb7aa25cf69e3032b3ce333150
2026-01-04T15:31:58.503980Z
false
rust-lang/rust
https://github.com/rust-lang/rust/blob/f8b1d59a81c700cb7aa25cf69e3032b3ce333150/src/tools/miri/tests/fail/data_race/read_write_race_stack.rs
src/tools/miri/tests/fail/data_race/read_write_race_stack.rs
// We want to control preemption here. Stacked borrows interferes by having its own accesses. //@compile-flags: -Zmiri-deterministic-concurrency -Zmiri-disable-stacked-borrows use std::ptr::null_mut; use std::sync::atomic::{AtomicPtr, Ordering}; use std::thread::{sleep, spawn}; use std::time::Duration; #[derive(Copy,...
rust
Apache-2.0
f8b1d59a81c700cb7aa25cf69e3032b3ce333150
2026-01-04T15:31:58.503980Z
false
rust-lang/rust
https://github.com/rust-lang/rust/blob/f8b1d59a81c700cb7aa25cf69e3032b3ce333150/src/tools/miri/tests/fail/data_race/release_seq_race.rs
src/tools/miri/tests/fail/data_race/release_seq_race.rs
// We want to control preemption here. Stacked borrows interferes by having its own accesses. //@compile-flags: -Zmiri-deterministic-concurrency -Zmiri-disable-stacked-borrows use std::sync::atomic::{AtomicUsize, Ordering}; use std::thread::{sleep, spawn}; use std::time::Duration; #[derive(Copy, Clone)] struct EvilSe...
rust
Apache-2.0
f8b1d59a81c700cb7aa25cf69e3032b3ce333150
2026-01-04T15:31:58.503980Z
false
rust-lang/rust
https://github.com/rust-lang/rust/blob/f8b1d59a81c700cb7aa25cf69e3032b3ce333150/src/tools/miri/tests/fail/data_race/rmw_race.rs
src/tools/miri/tests/fail/data_race/rmw_race.rs
// We want to control preemption here. Stacked borrows interferes by having its own accesses. //@compile-flags: -Zmiri-deterministic-concurrency -Zmiri-disable-stacked-borrows use std::sync::atomic::{AtomicUsize, Ordering}; use std::thread::spawn; #[derive(Copy, Clone)] struct EvilSend<T>(pub T); unsafe impl<T> Send...
rust
Apache-2.0
f8b1d59a81c700cb7aa25cf69e3032b3ce333150
2026-01-04T15:31:58.503980Z
false
rust-lang/rust
https://github.com/rust-lang/rust/blob/f8b1d59a81c700cb7aa25cf69e3032b3ce333150/src/tools/miri/tests/fail/data_race/atomic_read_na_write_race1.rs
src/tools/miri/tests/fail/data_race/atomic_read_na_write_race1.rs
// We want to control preemption here. Stacked borrows interferes by having its own accesses. //@compile-flags: -Zmiri-deterministic-concurrency -Zmiri-disable-stacked-borrows use std::sync::atomic::{AtomicUsize, Ordering}; use std::thread::spawn; #[derive(Copy, Clone)] struct EvilSend<T>(pub T); unsafe impl<T> Send...
rust
Apache-2.0
f8b1d59a81c700cb7aa25cf69e3032b3ce333150
2026-01-04T15:31:58.503980Z
false
rust-lang/rust
https://github.com/rust-lang/rust/blob/f8b1d59a81c700cb7aa25cf69e3032b3ce333150/src/tools/miri/tests/fail/data_race/write_write_race_stack.rs
src/tools/miri/tests/fail/data_race/write_write_race_stack.rs
// We want to control preemption here. Stacked borrows interferes by having its own accesses. //@compile-flags: -Zmiri-deterministic-concurrency -Zmiri-disable-stacked-borrows use std::ptr::null_mut; use std::sync::atomic::{AtomicPtr, Ordering}; use std::thread::{sleep, spawn}; use std::time::Duration; #[derive(Copy,...
rust
Apache-2.0
f8b1d59a81c700cb7aa25cf69e3032b3ce333150
2026-01-04T15:31:58.503980Z
false
rust-lang/rust
https://github.com/rust-lang/rust/blob/f8b1d59a81c700cb7aa25cf69e3032b3ce333150/src/tools/miri/tests/fail/data_race/atomic_write_na_write_race1.rs
src/tools/miri/tests/fail/data_race/atomic_write_na_write_race1.rs
// We want to control preemption here. Stacked borrows interferes by having its own accesses. //@compile-flags: -Zmiri-deterministic-concurrency -Zmiri-disable-stacked-borrows use std::sync::atomic::{AtomicUsize, Ordering}; use std::thread::spawn; #[derive(Copy, Clone)] struct EvilSend<T>(pub T); unsafe impl<T> Send...
rust
Apache-2.0
f8b1d59a81c700cb7aa25cf69e3032b3ce333150
2026-01-04T15:31:58.503980Z
false
rust-lang/rust
https://github.com/rust-lang/rust/blob/f8b1d59a81c700cb7aa25cf69e3032b3ce333150/src/tools/miri/tests/fail/data_race/release_seq_race_same_thread.rs
src/tools/miri/tests/fail/data_race/release_seq_race_same_thread.rs
// We want to control preemption here. Stacked borrows interferes by having its own accesses. //@compile-flags: -Zmiri-deterministic-concurrency -Zmiri-disable-stacked-borrows use std::sync::atomic::{AtomicUsize, Ordering}; use std::thread::spawn; #[derive(Copy, Clone)] struct EvilSend<T>(pub T); unsafe impl<T> Send...
rust
Apache-2.0
f8b1d59a81c700cb7aa25cf69e3032b3ce333150
2026-01-04T15:31:58.503980Z
false
rust-lang/rust
https://github.com/rust-lang/rust/blob/f8b1d59a81c700cb7aa25cf69e3032b3ce333150/src/tools/miri/tests/fail/data_race/atomic_write_na_write_race2.rs
src/tools/miri/tests/fail/data_race/atomic_write_na_write_race2.rs
// We want to control preemption here. Stacked borrows interferes by having its own accesses. //@compile-flags: -Zmiri-deterministic-concurrency -Zmiri-disable-stacked-borrows use std::sync::atomic::{AtomicUsize, Ordering}; use std::thread::spawn; #[derive(Copy, Clone)] struct EvilSend<T>(pub T); unsafe impl<T> Send...
rust
Apache-2.0
f8b1d59a81c700cb7aa25cf69e3032b3ce333150
2026-01-04T15:31:58.503980Z
false
rust-lang/rust
https://github.com/rust-lang/rust/blob/f8b1d59a81c700cb7aa25cf69e3032b3ce333150/src/tools/miri/tests/fail/data_race/mixed_size_write_write.rs
src/tools/miri/tests/fail/data_race/mixed_size_write_write.rs
//@compile-flags:-Zmiri-deterministic-concurrency //@revisions: fst snd use std::sync::atomic::{AtomicU8, AtomicU16, Ordering}; use std::thread; fn convert(a: &AtomicU16) -> &[AtomicU8; 2] { unsafe { std::mem::transmute(a) } } // We can't allow mixed-size accesses; they are not possible in C++ and even // Intel ...
rust
Apache-2.0
f8b1d59a81c700cb7aa25cf69e3032b3ce333150
2026-01-04T15:31:58.503980Z
false
rust-lang/rust
https://github.com/rust-lang/rust/blob/f8b1d59a81c700cb7aa25cf69e3032b3ce333150/src/tools/miri/tests/fail/data_race/dealloc_read_race2.rs
src/tools/miri/tests/fail/data_race/dealloc_read_race2.rs
// We want to control preemption here. Stacked borrows interferes by having its own accesses. //@compile-flags: -Zmiri-deterministic-concurrency -Zmiri-disable-stacked-borrows #![feature(rustc_attrs)] use std::thread::spawn; #[derive(Copy, Clone)] struct EvilSend<T>(pub T); unsafe impl<T> Send for EvilSend<T> {} un...
rust
Apache-2.0
f8b1d59a81c700cb7aa25cf69e3032b3ce333150
2026-01-04T15:31:58.503980Z
false
rust-lang/rust
https://github.com/rust-lang/rust/blob/f8b1d59a81c700cb7aa25cf69e3032b3ce333150/src/tools/miri/tests/fail/data_race/write_write_race.rs
src/tools/miri/tests/fail/data_race/write_write_race.rs
// We want to control preemption here. Stacked borrows interferes by having its own accesses. //@compile-flags: -Zmiri-deterministic-concurrency -Zmiri-disable-stacked-borrows use std::thread::spawn; #[derive(Copy, Clone)] struct EvilSend<T>(pub T); unsafe impl<T> Send for EvilSend<T> {} unsafe impl<T> Sync for Evil...
rust
Apache-2.0
f8b1d59a81c700cb7aa25cf69e3032b3ce333150
2026-01-04T15:31:58.503980Z
false
rust-lang/rust
https://github.com/rust-lang/rust/blob/f8b1d59a81c700cb7aa25cf69e3032b3ce333150/src/tools/miri/tests/fail/data_race/dangling_thread_race.rs
src/tools/miri/tests/fail/data_race/dangling_thread_race.rs
// We want to control preemption here. Stacked borrows interferes by having its own accesses. //@compile-flags: -Zmiri-deterministic-concurrency -Zmiri-disable-stacked-borrows use std::mem; use std::thread::{sleep, spawn}; use std::time::Duration; #[derive(Copy, Clone)] struct EvilSend<T>(pub T); unsafe impl<T> Send...
rust
Apache-2.0
f8b1d59a81c700cb7aa25cf69e3032b3ce333150
2026-01-04T15:31:58.503980Z
false
rust-lang/rust
https://github.com/rust-lang/rust/blob/f8b1d59a81c700cb7aa25cf69e3032b3ce333150/src/tools/miri/tests/fail/data_race/local_variable_read_race.rs
src/tools/miri/tests/fail/data_race/local_variable_read_race.rs
//@compile-flags:-Zmiri-deterministic-concurrency use std::sync::atomic::Ordering::*; use std::sync::atomic::*; static P: AtomicPtr<u8> = AtomicPtr::new(core::ptr::null_mut()); fn main() { // Create the local variable, and initialize it. let mut val: u8 = 0; let t1 = std::thread::spawn(|| { while...
rust
Apache-2.0
f8b1d59a81c700cb7aa25cf69e3032b3ce333150
2026-01-04T15:31:58.503980Z
false
rust-lang/rust
https://github.com/rust-lang/rust/blob/f8b1d59a81c700cb7aa25cf69e3032b3ce333150/src/tools/miri/tests/fail/data_race/read_write_race.rs
src/tools/miri/tests/fail/data_race/read_write_race.rs
// We want to control preemption here. Stacked borrows interferes by having its own accesses. //@compile-flags: -Zmiri-deterministic-concurrency -Zmiri-disable-stacked-borrows use std::thread::spawn; #[derive(Copy, Clone)] struct EvilSend<T>(pub T); unsafe impl<T> Send for EvilSend<T> {} unsafe impl<T> Sync for Evil...
rust
Apache-2.0
f8b1d59a81c700cb7aa25cf69e3032b3ce333150
2026-01-04T15:31:58.503980Z
false
rust-lang/rust
https://github.com/rust-lang/rust/blob/f8b1d59a81c700cb7aa25cf69e3032b3ce333150/src/tools/miri/tests/fail/data_race/dealloc_write_race2.rs
src/tools/miri/tests/fail/data_race/dealloc_write_race2.rs
// We want to control preemption here. Stacked borrows interferes by having its own accesses. //@compile-flags: -Zmiri-deterministic-concurrency -Zmiri-disable-stacked-borrows #![feature(rustc_attrs)] use std::thread::spawn; #[derive(Copy, Clone)] struct EvilSend<T>(pub T); unsafe impl<T> Send for EvilSend<T> {} un...
rust
Apache-2.0
f8b1d59a81c700cb7aa25cf69e3032b3ce333150
2026-01-04T15:31:58.503980Z
false
rust-lang/rust
https://github.com/rust-lang/rust/blob/f8b1d59a81c700cb7aa25cf69e3032b3ce333150/src/tools/miri/tests/fail/data_race/atomic_write_na_read_race2.rs
src/tools/miri/tests/fail/data_race/atomic_write_na_read_race2.rs
// We want to control preemption here. Stacked borrows interferes by having its own accesses. //@compile-flags: -Zmiri-deterministic-concurrency -Zmiri-disable-stacked-borrows use std::sync::atomic::{AtomicUsize, Ordering}; use std::thread::spawn; #[derive(Copy, Clone)] struct EvilSend<T>(pub T); unsafe impl<T> Send...
rust
Apache-2.0
f8b1d59a81c700cb7aa25cf69e3032b3ce333150
2026-01-04T15:31:58.503980Z
false
rust-lang/rust
https://github.com/rust-lang/rust/blob/f8b1d59a81c700cb7aa25cf69e3032b3ce333150/src/tools/miri/tests/fail/data_race/enable_after_join_to_main.rs
src/tools/miri/tests/fail/data_race/enable_after_join_to_main.rs
// We want to control preemption here. Stacked borrows interferes by having its own accesses. //@compile-flags: -Zmiri-deterministic-concurrency -Zmiri-disable-stacked-borrows use std::thread::spawn; #[derive(Copy, Clone)] struct EvilSend<T>(pub T); unsafe impl<T> Send for EvilSend<T> {} unsafe impl<T> Sync for Evil...
rust
Apache-2.0
f8b1d59a81c700cb7aa25cf69e3032b3ce333150
2026-01-04T15:31:58.503980Z
false
rust-lang/rust
https://github.com/rust-lang/rust/blob/f8b1d59a81c700cb7aa25cf69e3032b3ce333150/src/tools/miri/tests/fail/data_race/relax_acquire_race.rs
src/tools/miri/tests/fail/data_race/relax_acquire_race.rs
// We want to control preemption here. Stacked borrows interferes by having its own accesses. //@compile-flags: -Zmiri-deterministic-concurrency -Zmiri-disable-stacked-borrows use std::sync::atomic::{AtomicUsize, Ordering}; use std::thread::spawn; #[derive(Copy, Clone)] struct EvilSend<T>(pub T); unsafe impl<T> Send...
rust
Apache-2.0
f8b1d59a81c700cb7aa25cf69e3032b3ce333150
2026-01-04T15:31:58.503980Z
false
rust-lang/rust
https://github.com/rust-lang/rust/blob/f8b1d59a81c700cb7aa25cf69e3032b3ce333150/src/tools/miri/tests/fail/data_race/local_variable_write_race.rs
src/tools/miri/tests/fail/data_race/local_variable_write_race.rs
//@compile-flags:-Zmiri-deterministic-concurrency use std::sync::atomic::Ordering::*; use std::sync::atomic::*; static P: AtomicPtr<u8> = AtomicPtr::new(core::ptr::null_mut()); fn main() { let t1 = std::thread::spawn(|| { while P.load(Relaxed).is_null() { std::hint::spin_loop(); } ...
rust
Apache-2.0
f8b1d59a81c700cb7aa25cf69e3032b3ce333150
2026-01-04T15:31:58.503980Z
false
rust-lang/rust
https://github.com/rust-lang/rust/blob/f8b1d59a81c700cb7aa25cf69e3032b3ce333150/src/tools/miri/tests/fail/data_race/mixed_size_read_write_read.rs
src/tools/miri/tests/fail/data_race/mixed_size_read_write_read.rs
//@compile-flags: -Zmiri-deterministic-concurrency // A case that is not covered by `mixed_size_read_write`. #![feature(ptr_as_ref_unchecked)] use std::sync::atomic::*; use std::thread; fn main() { let data = AtomicI32::new(0); thread::scope(|s| { s.spawn(|| unsafe { let _val = (&raw cons...
rust
Apache-2.0
f8b1d59a81c700cb7aa25cf69e3032b3ce333150
2026-01-04T15:31:58.503980Z
false
rust-lang/rust
https://github.com/rust-lang/rust/blob/f8b1d59a81c700cb7aa25cf69e3032b3ce333150/src/tools/miri/tests/fail/data_race/fence_after_load.rs
src/tools/miri/tests/fail/data_race/fence_after_load.rs
// We want to control preemption here. Stacked borrows interferes by having its own accesses. //@compile-flags: -Zmiri-deterministic-concurrency -Zmiri-disable-stacked-borrows use std::sync::Arc; use std::sync::atomic::{AtomicUsize, Ordering, fence}; use std::thread; use std::time::Duration; fn main() { static mu...
rust
Apache-2.0
f8b1d59a81c700cb7aa25cf69e3032b3ce333150
2026-01-04T15:31:58.503980Z
false
rust-lang/rust
https://github.com/rust-lang/rust/blob/f8b1d59a81c700cb7aa25cf69e3032b3ce333150/src/tools/miri/tests/fail/data_race/stack_pop_race.rs
src/tools/miri/tests/fail/data_race/stack_pop_race.rs
// We want to control preemption here. Stacked borrows interferes by having its own accesses. //@compile-flags: -Zmiri-deterministic-concurrency -Zmiri-disable-stacked-borrows use std::thread; #[derive(Copy, Clone)] struct MakeSend(*const i32); unsafe impl Send for MakeSend {} fn main() { race(0); //~ERROR: Data...
rust
Apache-2.0
f8b1d59a81c700cb7aa25cf69e3032b3ce333150
2026-01-04T15:31:58.503980Z
false
rust-lang/rust
https://github.com/rust-lang/rust/blob/f8b1d59a81c700cb7aa25cf69e3032b3ce333150/src/tools/miri/tests/fail/data_race/dealloc_write_race1.rs
src/tools/miri/tests/fail/data_race/dealloc_write_race1.rs
// We want to control preemption here. Stacked borrows interferes by having its own accesses. //@compile-flags: -Zmiri-deterministic-concurrency -Zmiri-disable-stacked-borrows #![feature(rustc_attrs)] use std::thread::spawn; #[derive(Copy, Clone)] struct EvilSend<T>(pub T); unsafe impl<T> Send for EvilSend<T> {} un...
rust
Apache-2.0
f8b1d59a81c700cb7aa25cf69e3032b3ce333150
2026-01-04T15:31:58.503980Z
false
rust-lang/rust
https://github.com/rust-lang/rust/blob/f8b1d59a81c700cb7aa25cf69e3032b3ce333150/src/tools/miri/tests/fail/data_race/dealloc_write_race_stack.rs
src/tools/miri/tests/fail/data_race/dealloc_write_race_stack.rs
// We want to control preemption here. Stacked borrows interferes by having its own accesses. //@compile-flags: -Zmiri-deterministic-concurrency -Zmiri-disable-stacked-borrows use std::ptr::null_mut; use std::sync::atomic::{AtomicPtr, Ordering}; use std::thread::{sleep, spawn}; use std::time::Duration; #[derive(Copy,...
rust
Apache-2.0
f8b1d59a81c700cb7aa25cf69e3032b3ce333150
2026-01-04T15:31:58.503980Z
false
rust-lang/rust
https://github.com/rust-lang/rust/blob/f8b1d59a81c700cb7aa25cf69e3032b3ce333150/src/tools/miri/tests/fail/data_race/alloc_read_race.rs
src/tools/miri/tests/fail/data_race/alloc_read_race.rs
// We want to control preemption here. Stacked borrows interferes by having its own accesses. //@compile-flags: -Zmiri-deterministic-concurrency -Zmiri-disable-stacked-borrows use std::mem::MaybeUninit; use std::ptr::null_mut; use std::sync::atomic::{AtomicPtr, Ordering}; use std::thread::spawn; #[derive(Copy, Clone)...
rust
Apache-2.0
f8b1d59a81c700cb7aa25cf69e3032b3ce333150
2026-01-04T15:31:58.503980Z
false
rust-lang/rust
https://github.com/rust-lang/rust/blob/f8b1d59a81c700cb7aa25cf69e3032b3ce333150/src/tools/miri/tests/fail/data_race/dangling_thread_async_race.rs
src/tools/miri/tests/fail/data_race/dangling_thread_async_race.rs
// We want to control preemption here. Stacked borrows interferes by having its own accesses. //@compile-flags: -Zmiri-deterministic-concurrency -Zmiri-disable-stacked-borrows use std::mem; use std::thread::{sleep, spawn}; use std::time::Duration; #[derive(Copy, Clone)] struct EvilSend<T>(pub T); unsafe impl<T> Send...
rust
Apache-2.0
f8b1d59a81c700cb7aa25cf69e3032b3ce333150
2026-01-04T15:31:58.503980Z
false
rust-lang/rust
https://github.com/rust-lang/rust/blob/f8b1d59a81c700cb7aa25cf69e3032b3ce333150/src/tools/miri/tests/fail/data_race/mixed_size_read_read_write.rs
src/tools/miri/tests/fail/data_race/mixed_size_read_read_write.rs
//@compile-flags:-Zmiri-deterministic-concurrency // Two variants: the atomic store matches the size of the first or second atomic load. //@revisions: match_first_load match_second_load use std::sync::atomic::{AtomicU8, AtomicU16, Ordering}; use std::thread; fn convert(a: &AtomicU16) -> &[AtomicU8; 2] { unsafe { ...
rust
Apache-2.0
f8b1d59a81c700cb7aa25cf69e3032b3ce333150
2026-01-04T15:31:58.503980Z
false
rust-lang/rust
https://github.com/rust-lang/rust/blob/f8b1d59a81c700cb7aa25cf69e3032b3ce333150/src/tools/miri/tests/fail/data_race/mixed_size_read_write.rs
src/tools/miri/tests/fail/data_race/mixed_size_read_write.rs
//@compile-flags:-Zmiri-deterministic-concurrency // Two revisions, depending on which access goes first. //@revisions: read_write write_read use std::sync::atomic::{AtomicU8, AtomicU16, Ordering}; use std::thread; fn convert(a: &AtomicU16) -> &[AtomicU8; 2] { unsafe { std::mem::transmute(a) } } // We can't allo...
rust
Apache-2.0
f8b1d59a81c700cb7aa25cf69e3032b3ce333150
2026-01-04T15:31:58.503980Z
false
rust-lang/rust
https://github.com/rust-lang/rust/blob/f8b1d59a81c700cb7aa25cf69e3032b3ce333150/src/tools/miri/tests/fail/data_race/dealloc_read_race1.rs
src/tools/miri/tests/fail/data_race/dealloc_read_race1.rs
// We want to control preemption here. Stacked borrows interferes by having its own accesses. //@compile-flags: -Zmiri-deterministic-concurrency -Zmiri-disable-stacked-borrows #![feature(rustc_attrs)] use std::thread::spawn; #[derive(Copy, Clone)] struct EvilSend<T>(pub T); unsafe impl<T> Send for EvilSend<T> {} un...
rust
Apache-2.0
f8b1d59a81c700cb7aa25cf69e3032b3ce333150
2026-01-04T15:31:58.503980Z
false
rust-lang/rust
https://github.com/rust-lang/rust/blob/f8b1d59a81c700cb7aa25cf69e3032b3ce333150/src/tools/miri/tests/fail/data_race/atomic_write_na_read_race1.rs
src/tools/miri/tests/fail/data_race/atomic_write_na_read_race1.rs
// We want to control preemption here. Stacked borrows interferes by having its own accesses. //@compile-flags: -Zmiri-deterministic-concurrency -Zmiri-disable-stacked-borrows use std::sync::atomic::{AtomicUsize, Ordering}; use std::thread::spawn; #[derive(Copy, Clone)] struct EvilSend<T>(pub T); unsafe impl<T> Send...
rust
Apache-2.0
f8b1d59a81c700cb7aa25cf69e3032b3ce333150
2026-01-04T15:31:58.503980Z
false
rust-lang/rust
https://github.com/rust-lang/rust/blob/f8b1d59a81c700cb7aa25cf69e3032b3ce333150/src/tools/miri/tests/fail/data_race/atomic_read_na_write_race2.rs
src/tools/miri/tests/fail/data_race/atomic_read_na_write_race2.rs
// We want to control preemption here. Stacked borrows interferes by having its own accesses. //@compile-flags: -Zmiri-deterministic-concurrency -Zmiri-disable-stacked-borrows use std::sync::atomic::{AtomicUsize, Ordering}; use std::thread::spawn; #[derive(Copy, Clone)] struct EvilSend<T>(pub T); unsafe impl<T> Send...
rust
Apache-2.0
f8b1d59a81c700cb7aa25cf69e3032b3ce333150
2026-01-04T15:31:58.503980Z
false
rust-lang/rust
https://github.com/rust-lang/rust/blob/f8b1d59a81c700cb7aa25cf69e3032b3ce333150/src/tools/miri/tests/fail/data_race/dealloc_read_race_stack.rs
src/tools/miri/tests/fail/data_race/dealloc_read_race_stack.rs
// We want to control preemption here. Stacked borrows interferes by having its own accesses. //@compile-flags: -Zmiri-deterministic-concurrency -Zmiri-disable-stacked-borrows use std::ptr::null_mut; use std::sync::atomic::{AtomicPtr, Ordering}; use std::thread::{sleep, spawn}; use std::time::Duration; #[derive(Copy,...
rust
Apache-2.0
f8b1d59a81c700cb7aa25cf69e3032b3ce333150
2026-01-04T15:31:58.503980Z
false
rust-lang/rust
https://github.com/rust-lang/rust/blob/f8b1d59a81c700cb7aa25cf69e3032b3ce333150/src/tools/miri/tests/genmc/fail/atomics/atomic_ptr_double_free.rs
src/tools/miri/tests/genmc/fail/atomics/atomic_ptr_double_free.rs
//@compile-flags: -Zmiri-genmc -Zmiri-disable-stacked-borrows // Test that we can detect a double-free bug across two threads, which only shows up if the second thread reads an atomic pointer at a very specific moment. // GenMC can detect this error consistently, without having to run the buggy code with multiple RNG ...
rust
Apache-2.0
f8b1d59a81c700cb7aa25cf69e3032b3ce333150
2026-01-04T15:31:58.503980Z
false
rust-lang/rust
https://github.com/rust-lang/rust/blob/f8b1d59a81c700cb7aa25cf69e3032b3ce333150/src/tools/miri/tests/genmc/fail/atomics/atomic_ptr_invalid_provenance.rs
src/tools/miri/tests/genmc/fail/atomics/atomic_ptr_invalid_provenance.rs
//@revisions: send make //@compile-flags: -Zmiri-genmc -Zmiri-disable-stacked-borrows // Test that we can distinguish two pointers with the same address, but different provenance, after they are sent to GenMC and back. // We have two variants, one where we send such a pointer to GenMC, and one where we make it on the ...
rust
Apache-2.0
f8b1d59a81c700cb7aa25cf69e3032b3ce333150
2026-01-04T15:31:58.503980Z
false
rust-lang/rust
https://github.com/rust-lang/rust/blob/f8b1d59a81c700cb7aa25cf69e3032b3ce333150/src/tools/miri/tests/genmc/fail/shims/mutex_double_unlock.rs
src/tools/miri/tests/genmc/fail/shims/mutex_double_unlock.rs
//@compile-flags: -Zmiri-genmc -Zmiri-disable-stacked-borrows //@error-in-other-file: Undefined Behavior // Test that GenMC can detect a double unlock of a mutex. // This test will cause an error even if the program actually would work entirely fine despite the double-unlock // because GenMC always assumes a `pthread`...
rust
Apache-2.0
f8b1d59a81c700cb7aa25cf69e3032b3ce333150
2026-01-04T15:31:58.503980Z
false
rust-lang/rust
https://github.com/rust-lang/rust/blob/f8b1d59a81c700cb7aa25cf69e3032b3ce333150/src/tools/miri/tests/genmc/fail/shims/exit.rs
src/tools/miri/tests/genmc/fail/shims/exit.rs
//@ compile-flags: -Zmiri-genmc -Zmiri-disable-stacked-borrows fn main() { std::thread::spawn(|| { unsafe { std::hint::unreachable_unchecked() }; //~ERROR: entering unreachable code }); // If we exit immediately, we might entirely miss the UB in the other thread. std::process::exit(0); }
rust
Apache-2.0
f8b1d59a81c700cb7aa25cf69e3032b3ce333150
2026-01-04T15:31:58.503980Z
false
rust-lang/rust
https://github.com/rust-lang/rust/blob/f8b1d59a81c700cb7aa25cf69e3032b3ce333150/src/tools/miri/tests/genmc/fail/shims/mutex_diff_thread_unlock.rs
src/tools/miri/tests/genmc/fail/shims/mutex_diff_thread_unlock.rs
//@compile-flags: -Zmiri-genmc -Zmiri-disable-stacked-borrows //@error-in-other-file: Undefined Behavior // Test that GenMC throws an error if a `std::sync::Mutex` is unlocked from a different thread than the one that locked it. // // This test will cause an error on all targets, even mutexes on that targets allow for...
rust
Apache-2.0
f8b1d59a81c700cb7aa25cf69e3032b3ce333150
2026-01-04T15:31:58.503980Z
false
rust-lang/rust
https://github.com/rust-lang/rust/blob/f8b1d59a81c700cb7aa25cf69e3032b3ce333150/src/tools/miri/tests/genmc/fail/simple/2w2w_weak.rs
src/tools/miri/tests/genmc/fail/simple/2w2w_weak.rs
//@compile-flags: -Zmiri-genmc -Zmiri-disable-stacked-borrows //@revisions: sc3_rel1 release4 relaxed4 // The pass tests "2w2w_3sc_1rel.rs", "2w2w_4rel" and "2w2w_4sc" and the fail test "2w2w_weak.rs" are related. // // This test has multiple variants using different memory orderings. // When using any combination of ...
rust
Apache-2.0
f8b1d59a81c700cb7aa25cf69e3032b3ce333150
2026-01-04T15:31:58.503980Z
false
rust-lang/rust
https://github.com/rust-lang/rust/blob/f8b1d59a81c700cb7aa25cf69e3032b3ce333150/src/tools/miri/tests/genmc/fail/simple/alloc_large.rs
src/tools/miri/tests/genmc/fail/simple/alloc_large.rs
//@revisions: single multiple //@compile-flags: -Zmiri-genmc -Zmiri-disable-stacked-borrows //@error-in-other-file: resource exhaustion // Ensure that we emit a proper error if GenMC fails to fulfill an allocation. // Two variants: one for a single large allocation, one for multiple ones // that are individually below...
rust
Apache-2.0
f8b1d59a81c700cb7aa25cf69e3032b3ce333150
2026-01-04T15:31:58.503980Z
false
rust-lang/rust
https://github.com/rust-lang/rust/blob/f8b1d59a81c700cb7aa25cf69e3032b3ce333150/src/tools/miri/tests/genmc/fail/loom/buggy_inc.rs
src/tools/miri/tests/genmc/fail/loom/buggy_inc.rs
//@compile-flags: -Zmiri-genmc -Zmiri-disable-stacked-borrows // SPDX-License-Identifier: MIT // SPDX-FileCopyrightText: Copyright (c) 2019 Carl Lerche // This is the test `checks_fail` from loom/test/smoke.rs adapted for Miri-GenMC. // https://github.com/tokio-rs/loom/blob/dbf32b04bae821c64be44405a0bb72ca08741558/te...
rust
Apache-2.0
f8b1d59a81c700cb7aa25cf69e3032b3ce333150
2026-01-04T15:31:58.503980Z
false
rust-lang/rust
https://github.com/rust-lang/rust/blob/f8b1d59a81c700cb7aa25cf69e3032b3ce333150/src/tools/miri/tests/genmc/fail/loom/store_buffering.rs
src/tools/miri/tests/genmc/fail/loom/store_buffering.rs
//@ revisions: non_genmc genmc //@[genmc] compile-flags: -Zmiri-genmc -Zmiri-disable-stacked-borrows // SPDX-License-Identifier: MIT // SPDX-FileCopyrightText: Copyright (c) 2019 Carl Lerche // This is the test `store_buffering` from `loom/test/litmus.rs`, adapted for Miri-GenMC. // https://github.com/tokio-rs/loom/b...
rust
Apache-2.0
f8b1d59a81c700cb7aa25cf69e3032b3ce333150
2026-01-04T15:31:58.503980Z
false
rust-lang/rust
https://github.com/rust-lang/rust/blob/f8b1d59a81c700cb7aa25cf69e3032b3ce333150/src/tools/miri/tests/genmc/fail/data_race/weak_orderings.rs
src/tools/miri/tests/genmc/fail/data_race/weak_orderings.rs
//@compile-flags: -Zmiri-genmc -Zmiri-disable-stacked-borrows //@revisions: rlx_rlx rlx_acq rel_rlx // Translated from GenMC's test `wrong/racy/MP+rel+rlx`, `MP+rlx+acq` and `MP+rlx+rlx`. // Test if Miri with GenMC can detect the data race on `X`. // Relaxed orderings on an atomic store-load pair should not synchroniz...
rust
Apache-2.0
f8b1d59a81c700cb7aa25cf69e3032b3ce333150
2026-01-04T15:31:58.503980Z
false
rust-lang/rust
https://github.com/rust-lang/rust/blob/f8b1d59a81c700cb7aa25cf69e3032b3ce333150/src/tools/miri/tests/genmc/fail/data_race/mpu2_rels_rlx.rs
src/tools/miri/tests/genmc/fail/data_race/mpu2_rels_rlx.rs
//@compile-flags: -Zmiri-genmc -Zmiri-disable-stacked-borrows // Translated from GenMC's test `wrong/racy/MPU2+rels+rlx`. // Test if Miri with GenMC can detect the data race on `X`. // The data race only occurs if thread 1 finishes, then threads 3 and 4 run, then thread 2. // // This data race is hard to detect for Mi...
rust
Apache-2.0
f8b1d59a81c700cb7aa25cf69e3032b3ce333150
2026-01-04T15:31:58.503980Z
false
rust-lang/rust
https://github.com/rust-lang/rust/blob/f8b1d59a81c700cb7aa25cf69e3032b3ce333150/src/tools/miri/tests/genmc/fail/data_race/atomic_ptr_dealloc_write_race.rs
src/tools/miri/tests/genmc/fail/data_race/atomic_ptr_dealloc_write_race.rs
//@compile-flags: -Zmiri-genmc -Zmiri-disable-stacked-borrows // Test that use-after-free bugs involving atomic pointers are detected in GenMC mode. #![no_main] #[path = "../../../utils/genmc.rs"] mod genmc; #[path = "../../../utils/mod.rs"] mod utils; use std::sync::atomic::AtomicPtr; use std::sync::atomic::Orderi...
rust
Apache-2.0
f8b1d59a81c700cb7aa25cf69e3032b3ce333150
2026-01-04T15:31:58.503980Z
false
rust-lang/rust
https://github.com/rust-lang/rust/blob/f8b1d59a81c700cb7aa25cf69e3032b3ce333150/src/tools/miri/tests/genmc/fail/data_race/atomic_ptr_write_dealloc_race.rs
src/tools/miri/tests/genmc/fail/data_race/atomic_ptr_write_dealloc_race.rs
//@compile-flags: -Zmiri-genmc -Zmiri-disable-stacked-borrows // Test that use-after-free bugs involving atomic pointers are detected in GenMC mode. // Compared to `atomic_ptr_dealloc_write_race.rs`, this variant checks that the data race is still detected, even if the write happens before the free. // // FIXME(genmc)...
rust
Apache-2.0
f8b1d59a81c700cb7aa25cf69e3032b3ce333150
2026-01-04T15:31:58.503980Z
false
rust-lang/rust
https://github.com/rust-lang/rust/blob/f8b1d59a81c700cb7aa25cf69e3032b3ce333150/src/tools/miri/tests/genmc/fail/data_race/atomic_ptr_alloc_race.rs
src/tools/miri/tests/genmc/fail/data_race/atomic_ptr_alloc_race.rs
//@revisions: write dealloc //@compile-flags: -Zmiri-genmc -Zmiri-disable-stacked-borrows -Zmiri-ignore-leaks // Test that we can detect data races between an allocation and an unsynchronized action in another thread. // We have two variants, an alloc-dealloc race and an alloc-write race. // // We never deallocate the...
rust
Apache-2.0
f8b1d59a81c700cb7aa25cf69e3032b3ce333150
2026-01-04T15:31:58.503980Z
false
rust-lang/rust
https://github.com/rust-lang/rust/blob/f8b1d59a81c700cb7aa25cf69e3032b3ce333150/src/tools/miri/tests/genmc/pass/atomics/read_initial_value.rs
src/tools/miri/tests/genmc/pass/atomics/read_initial_value.rs
//@compile-flags: -Zmiri-genmc -Zmiri-disable-stacked-borrows // Test that we can read the initial value of global, heap and stack allocations in GenMC mode. #![no_main] use std::sync::atomic::AtomicU64; use std::sync::atomic::Ordering::*; static X: AtomicU64 = AtomicU64::new(1234); #[unsafe(no_mangle)] fn miri_st...
rust
Apache-2.0
f8b1d59a81c700cb7aa25cf69e3032b3ce333150
2026-01-04T15:31:58.503980Z
false
rust-lang/rust
https://github.com/rust-lang/rust/blob/f8b1d59a81c700cb7aa25cf69e3032b3ce333150/src/tools/miri/tests/genmc/pass/atomics/cas_simple.rs
src/tools/miri/tests/genmc/pass/atomics/cas_simple.rs
//@compile-flags: -Zmiri-genmc -Zmiri-disable-stacked-borrows // Test the basic functionality of compare_exchange. #![no_main] use std::sync::atomic::AtomicUsize; use std::sync::atomic::Ordering::*; static VALUE: AtomicUsize = AtomicUsize::new(0); #[unsafe(no_mangle)] fn miri_start(_argc: isize, _argv: *const *con...
rust
Apache-2.0
f8b1d59a81c700cb7aa25cf69e3032b3ce333150
2026-01-04T15:31:58.503980Z
false
rust-lang/rust
https://github.com/rust-lang/rust/blob/f8b1d59a81c700cb7aa25cf69e3032b3ce333150/src/tools/miri/tests/genmc/pass/atomics/atomic_ptr_roundtrip.rs
src/tools/miri/tests/genmc/pass/atomics/atomic_ptr_roundtrip.rs
//@compile-flags: -Zmiri-genmc -Zmiri-disable-stacked-borrows // Test that we can send pointers with any alignment to GenMC and back, even across threads. // After a round-trip, the pointers should still work properly (no missing provenance). #![no_main] #![allow(static_mut_refs)] #[path = "../../../utils/genmc.rs"]...
rust
Apache-2.0
f8b1d59a81c700cb7aa25cf69e3032b3ce333150
2026-01-04T15:31:58.503980Z
false
rust-lang/rust
https://github.com/rust-lang/rust/blob/f8b1d59a81c700cb7aa25cf69e3032b3ce333150/src/tools/miri/tests/genmc/pass/atomics/atomic_ptr_ops.rs
src/tools/miri/tests/genmc/pass/atomics/atomic_ptr_ops.rs
//@compile-flags: -Zmiri-genmc -Zmiri-disable-stacked-borrows // Test several operations on atomic pointers. #![no_main] #[path = "../../../utils/mod.rs"] mod utils; use std::fmt::{Debug, Write}; use std::sync::atomic::AtomicPtr; use std::sync::atomic::Ordering::*; use crate::utils::*; static mut X: u64 = 0; stat...
rust
Apache-2.0
f8b1d59a81c700cb7aa25cf69e3032b3ce333150
2026-01-04T15:31:58.503980Z
false
rust-lang/rust
https://github.com/rust-lang/rust/blob/f8b1d59a81c700cb7aa25cf69e3032b3ce333150/src/tools/miri/tests/genmc/pass/atomics/rmw_ops.rs
src/tools/miri/tests/genmc/pass/atomics/rmw_ops.rs
//@compile-flags: -Zmiri-genmc -Zmiri-disable-stacked-borrows // This test check for correct handling of atomic read-modify-write operations for all integer sizes. // Atomic max and min should return the previous value, and store the result in the atomic. // Atomic addition and subtraction should have wrapping semanti...
rust
Apache-2.0
f8b1d59a81c700cb7aa25cf69e3032b3ce333150
2026-01-04T15:31:58.503980Z
false
rust-lang/rust
https://github.com/rust-lang/rust/blob/f8b1d59a81c700cb7aa25cf69e3032b3ce333150/src/tools/miri/tests/genmc/pass/atomics/mixed_atomic_non_atomic.rs
src/tools/miri/tests/genmc/pass/atomics/mixed_atomic_non_atomic.rs
//@compile-flags: -Zmiri-genmc -Zmiri-disable-stacked-borrows // Test that we can read the value of a non-atomic store atomically and an of an atomic value non-atomically. #![no_main] use std::sync::atomic::Ordering::*; use std::sync::atomic::{AtomicI8, AtomicU64}; static X: AtomicU64 = AtomicU64::new(1234); static...
rust
Apache-2.0
f8b1d59a81c700cb7aa25cf69e3032b3ce333150
2026-01-04T15:31:58.503980Z
false
rust-lang/rust
https://github.com/rust-lang/rust/blob/f8b1d59a81c700cb7aa25cf69e3032b3ce333150/src/tools/miri/tests/genmc/pass/atomics/cas_failure_ord_racy_key_init.rs
src/tools/miri/tests/genmc/pass/atomics/cas_failure_ord_racy_key_init.rs
//@compile-flags: -Zmiri-genmc -Zmiri-disable-stacked-borrows -Zmiri-ignore-leaks // Adapted from: `impl LazyKey`, `fn lazy_init`: rust/library/std/src/sys/thread_local/key/racy.rs // Two threads race to initialize a key, which is just an index into an array in this test. // The (Acquire, Release) orderings on the com...
rust
Apache-2.0
f8b1d59a81c700cb7aa25cf69e3032b3ce333150
2026-01-04T15:31:58.503980Z
false
rust-lang/rust
https://github.com/rust-lang/rust/blob/f8b1d59a81c700cb7aa25cf69e3032b3ce333150/src/tools/miri/tests/genmc/pass/data-structures/ms_queue_dynamic.rs
src/tools/miri/tests/genmc/pass/data-structures/ms_queue_dynamic.rs
//@ revisions: default_R1W1 default_R1W2 spinloop_assume_R1W1 spinloop_assume_R1W2 //@compile-flags: -Zmiri-ignore-leaks -Zmiri-genmc -Zmiri-disable-stacked-borrows -Zmiri-genmc-verbose //@normalize-stderr-test: "Verification took .*s" -> "Verification took [TIME]s" // This test is a translations of the GenMC test `ms...
rust
Apache-2.0
f8b1d59a81c700cb7aa25cf69e3032b3ce333150
2026-01-04T15:31:58.503980Z
false
rust-lang/rust
https://github.com/rust-lang/rust/blob/f8b1d59a81c700cb7aa25cf69e3032b3ce333150/src/tools/miri/tests/genmc/pass/data-structures/treiber_stack_dynamic.rs
src/tools/miri/tests/genmc/pass/data-structures/treiber_stack_dynamic.rs
//@ revisions: default_R1W1 default_R1W2 default_R1W3 spinloop_assume_R1W1 spinloop_assume_R1W2 spinloop_assume_R1W3 //@compile-flags: -Zmiri-ignore-leaks -Zmiri-genmc -Zmiri-disable-stacked-borrows -Zmiri-genmc-verbose //@normalize-stderr-test: "Verification took .*s" -> "Verification took [TIME]s" // This test is a ...
rust
Apache-2.0
f8b1d59a81c700cb7aa25cf69e3032b3ce333150
2026-01-04T15:31:58.503980Z
false
rust-lang/rust
https://github.com/rust-lang/rust/blob/f8b1d59a81c700cb7aa25cf69e3032b3ce333150/src/tools/miri/tests/genmc/pass/shims/mutex_deadlock.rs
src/tools/miri/tests/genmc/pass/shims/mutex_deadlock.rs
//@compile-flags: -Zmiri-genmc -Zmiri-disable-stacked-borrows -Zmiri-genmc-verbose //@normalize-stderr-test: "Verification took .*s" -> "Verification took [TIME]s" // Test that we can detect a deadlock involving `std::sync::Mutex` in GenMC mode. // FIXME(genmc): We cannot detect the deadlock currently. Instead, the de...
rust
Apache-2.0
f8b1d59a81c700cb7aa25cf69e3032b3ce333150
2026-01-04T15:31:58.503980Z
false
rust-lang/rust
https://github.com/rust-lang/rust/blob/f8b1d59a81c700cb7aa25cf69e3032b3ce333150/src/tools/miri/tests/genmc/pass/shims/spinloop_assume.rs
src/tools/miri/tests/genmc/pass/shims/spinloop_assume.rs
//@ revisions: bounded123 bounded321 replaced123 replaced321 //@compile-flags: -Zmiri-genmc -Zmiri-disable-stacked-borrows -Zmiri-genmc-verbose //@normalize-stderr-test: "Verification took .*s" -> "Verification took [TIME]s" // This test uses GenMC assume statements to bound or replace spinloops. // Three threads pass...
rust
Apache-2.0
f8b1d59a81c700cb7aa25cf69e3032b3ce333150
2026-01-04T15:31:58.503980Z
false
rust-lang/rust
https://github.com/rust-lang/rust/blob/f8b1d59a81c700cb7aa25cf69e3032b3ce333150/src/tools/miri/tests/genmc/pass/shims/mutex_simple.rs
src/tools/miri/tests/genmc/pass/shims/mutex_simple.rs
//@compile-flags: -Zmiri-genmc -Zmiri-disable-stacked-borrows -Zmiri-genmc-verbose //@normalize-stderr-test: "Verification took .*s" -> "Verification took [TIME]s" // Test various features of the `std::sync::Mutex` API with GenMC. // Miri running with GenMC intercepts the Mutex functions `lock`, `try_lock` and `unlock...
rust
Apache-2.0
f8b1d59a81c700cb7aa25cf69e3032b3ce333150
2026-01-04T15:31:58.503980Z
false
rust-lang/rust
https://github.com/rust-lang/rust/blob/f8b1d59a81c700cb7aa25cf69e3032b3ce333150/src/tools/miri/tests/genmc/pass/litmus/SB_2sc_scf.rs
src/tools/miri/tests/genmc/pass/litmus/SB_2sc_scf.rs
//@compile-flags: -Zmiri-genmc -Zmiri-disable-stacked-borrows // Translated from GenMC's "litmus/SB+2sc+scf" test. #![no_main] #[path = "../../../utils/genmc.rs"] mod genmc; use std::sync::atomic::AtomicU64; use std::sync::atomic::Ordering::*; use crate::genmc::*; static X: AtomicU64 = AtomicU64::new(0); static Y...
rust
Apache-2.0
f8b1d59a81c700cb7aa25cf69e3032b3ce333150
2026-01-04T15:31:58.503980Z
false
rust-lang/rust
https://github.com/rust-lang/rust/blob/f8b1d59a81c700cb7aa25cf69e3032b3ce333150/src/tools/miri/tests/genmc/pass/litmus/LB_incMPs.rs
src/tools/miri/tests/genmc/pass/litmus/LB_incMPs.rs
//@compile-flags: -Zmiri-genmc -Zmiri-disable-stacked-borrows // Translated from GenMC's "litmus/LB+incMPs" test. #![no_main] #[path = "../../../utils/genmc.rs"] mod genmc; use std::sync::atomic::AtomicU64; use std::sync::atomic::Ordering::*; use crate::genmc::*; static X: AtomicU64 = AtomicU64::new(0); static Y:...
rust
Apache-2.0
f8b1d59a81c700cb7aa25cf69e3032b3ce333150
2026-01-04T15:31:58.503980Z
false
rust-lang/rust
https://github.com/rust-lang/rust/blob/f8b1d59a81c700cb7aa25cf69e3032b3ce333150/src/tools/miri/tests/genmc/pass/litmus/cowr.rs
src/tools/miri/tests/genmc/pass/litmus/cowr.rs
//@compile-flags: -Zmiri-genmc -Zmiri-disable-stacked-borrows // Translated from GenMC's "CoWR" test. #![no_main] #[path = "../../../utils/genmc.rs"] mod genmc; use std::sync::atomic::AtomicU64; use std::sync::atomic::Ordering::*; use crate::genmc::*; static X: AtomicU64 = AtomicU64::new(0); #[unsafe(no_mangle)]...
rust
Apache-2.0
f8b1d59a81c700cb7aa25cf69e3032b3ce333150
2026-01-04T15:31:58.503980Z
false
rust-lang/rust
https://github.com/rust-lang/rust/blob/f8b1d59a81c700cb7aa25cf69e3032b3ce333150/src/tools/miri/tests/genmc/pass/litmus/viktor-relseq.rs
src/tools/miri/tests/genmc/pass/litmus/viktor-relseq.rs
//@compile-flags: -Zmiri-genmc -Zmiri-disable-stacked-borrows -Zmiri-genmc-estimate // Translated from GenMC's "litmus/viktor-relseq" test. // // This test also checks that we can run the GenMC estimation mode. #![no_main] #[path = "../../../utils/genmc.rs"] mod genmc; use std::sync::atomic::AtomicU64; use std::syn...
rust
Apache-2.0
f8b1d59a81c700cb7aa25cf69e3032b3ce333150
2026-01-04T15:31:58.503980Z
false
rust-lang/rust
https://github.com/rust-lang/rust/blob/f8b1d59a81c700cb7aa25cf69e3032b3ce333150/src/tools/miri/tests/genmc/pass/litmus/2cowr.rs
src/tools/miri/tests/genmc/pass/litmus/2cowr.rs
//@compile-flags: -Zmiri-genmc -Zmiri-disable-stacked-borrows // Translated from GenMC's test "2CoWR". #![no_main] #[path = "../../../utils/genmc.rs"] mod genmc; use std::sync::atomic::AtomicU64; use std::sync::atomic::Ordering::*; use crate::genmc::*; static X: AtomicU64 = AtomicU64::new(0); static Y: AtomicU64 ...
rust
Apache-2.0
f8b1d59a81c700cb7aa25cf69e3032b3ce333150
2026-01-04T15:31:58.503980Z
false
rust-lang/rust
https://github.com/rust-lang/rust/blob/f8b1d59a81c700cb7aa25cf69e3032b3ce333150/src/tools/miri/tests/genmc/pass/litmus/corr0.rs
src/tools/miri/tests/genmc/pass/litmus/corr0.rs
//@compile-flags: -Zmiri-genmc -Zmiri-disable-stacked-borrows // Translated from GenMC's "CoRR0" test. #![no_main] #[path = "../../../utils/genmc.rs"] mod genmc; use std::sync::atomic::AtomicU64; use std::sync::atomic::Ordering::*; use crate::genmc::*; static X: AtomicU64 = AtomicU64::new(0); #[unsafe(no_mangle)...
rust
Apache-2.0
f8b1d59a81c700cb7aa25cf69e3032b3ce333150
2026-01-04T15:31:58.503980Z
false
rust-lang/rust
https://github.com/rust-lang/rust/blob/f8b1d59a81c700cb7aa25cf69e3032b3ce333150/src/tools/miri/tests/genmc/pass/litmus/casdep.rs
src/tools/miri/tests/genmc/pass/litmus/casdep.rs
//@compile-flags: -Zmiri-genmc -Zmiri-disable-stacked-borrows // Translated from GenMC's test "litmus/casdep". #![no_main] #[path = "../../../utils/genmc.rs"] mod genmc; use std::sync::atomic::AtomicU64; use std::sync::atomic::Ordering::*; use crate::genmc::*; static X: AtomicU64 = AtomicU64::new(0); static Y: At...
rust
Apache-2.0
f8b1d59a81c700cb7aa25cf69e3032b3ce333150
2026-01-04T15:31:58.503980Z
false
rust-lang/rust
https://github.com/rust-lang/rust/blob/f8b1d59a81c700cb7aa25cf69e3032b3ce333150/src/tools/miri/tests/genmc/pass/litmus/corr1.rs
src/tools/miri/tests/genmc/pass/litmus/corr1.rs
//@compile-flags: -Zmiri-genmc -Zmiri-disable-stacked-borrows // Translated from GenMC's "CoRR1" test. #![no_main] #[path = "../../../utils/genmc.rs"] mod genmc; use std::sync::atomic::AtomicU64; use std::sync::atomic::Ordering::*; use crate::genmc::*; static X: AtomicU64 = AtomicU64::new(0); #[unsafe(no_mangle)...
rust
Apache-2.0
f8b1d59a81c700cb7aa25cf69e3032b3ce333150
2026-01-04T15:31:58.503980Z
false
rust-lang/rust
https://github.com/rust-lang/rust/blob/f8b1d59a81c700cb7aa25cf69e3032b3ce333150/src/tools/miri/tests/genmc/pass/litmus/LB.rs
src/tools/miri/tests/genmc/pass/litmus/LB.rs
//@compile-flags: -Zmiri-genmc -Zmiri-disable-stacked-borrows // Translated from GenMC's "litmus/LB" test. #![no_main] #[path = "../../../utils/genmc.rs"] mod genmc; use std::sync::atomic::AtomicU64; use std::sync::atomic::Ordering::*; use crate::genmc::*; static X: AtomicU64 = AtomicU64::new(0); static Y: Atomic...
rust
Apache-2.0
f8b1d59a81c700cb7aa25cf69e3032b3ce333150
2026-01-04T15:31:58.503980Z
false
rust-lang/rust
https://github.com/rust-lang/rust/blob/f8b1d59a81c700cb7aa25cf69e3032b3ce333150/src/tools/miri/tests/genmc/pass/litmus/2w2w_4rel.rs
src/tools/miri/tests/genmc/pass/litmus/2w2w_4rel.rs
//@revisions: weak sc //@compile-flags: -Zmiri-genmc -Zmiri-disable-stacked-borrows //@[sc]compile-flags: -Zmiri-disable-weak-memory-emulation // Translated from GenMC's test "2+2W". // // The pass tests "2w2w_3sc_1rel.rs", "2w2w_4rel" and "2w2w_4sc" and the fail test "2w2w_weak.rs" are related. // Check "2w2w_weak.rs...
rust
Apache-2.0
f8b1d59a81c700cb7aa25cf69e3032b3ce333150
2026-01-04T15:31:58.503980Z
false
rust-lang/rust
https://github.com/rust-lang/rust/blob/f8b1d59a81c700cb7aa25cf69e3032b3ce333150/src/tools/miri/tests/genmc/pass/litmus/MP.rs
src/tools/miri/tests/genmc/pass/litmus/MP.rs
//@compile-flags: -Zmiri-genmc -Zmiri-disable-stacked-borrows // Translated from GenMC's "litmus/MP" test. #![no_main] #[path = "../../../utils/genmc.rs"] mod genmc; use std::sync::atomic::AtomicU64; use std::sync::atomic::Ordering::*; use crate::genmc::*; static X: AtomicU64 = AtomicU64::new(0); static Y: Atomic...
rust
Apache-2.0
f8b1d59a81c700cb7aa25cf69e3032b3ce333150
2026-01-04T15:31:58.503980Z
false
rust-lang/rust
https://github.com/rust-lang/rust/blob/f8b1d59a81c700cb7aa25cf69e3032b3ce333150/src/tools/miri/tests/genmc/pass/litmus/atomicpo.rs
src/tools/miri/tests/genmc/pass/litmus/atomicpo.rs
//@compile-flags: -Zmiri-genmc -Zmiri-disable-stacked-borrows // Translated from GenMC's test "litmus/atomicpo". #![no_main] #[path = "../../../utils/genmc.rs"] mod genmc; use std::sync::atomic::AtomicU64; use std::sync::atomic::Ordering::*; use crate::genmc::*; static X: AtomicU64 = AtomicU64::new(0); static Y: ...
rust
Apache-2.0
f8b1d59a81c700cb7aa25cf69e3032b3ce333150
2026-01-04T15:31:58.503980Z
false
rust-lang/rust
https://github.com/rust-lang/rust/blob/f8b1d59a81c700cb7aa25cf69e3032b3ce333150/src/tools/miri/tests/genmc/pass/litmus/corr2.rs
src/tools/miri/tests/genmc/pass/litmus/corr2.rs
//@compile-flags: -Zmiri-genmc -Zmiri-disable-stacked-borrows // Translated from GenMC's "CoRR2" test. #![no_main] #[path = "../../../utils/genmc.rs"] mod genmc; use std::sync::atomic::AtomicU64; use std::sync::atomic::Ordering::*; use crate::genmc::*; static X: AtomicU64 = AtomicU64::new(0); #[unsafe(no_mangle)...
rust
Apache-2.0
f8b1d59a81c700cb7aa25cf69e3032b3ce333150
2026-01-04T15:31:58.503980Z
false
rust-lang/rust
https://github.com/rust-lang/rust/blob/f8b1d59a81c700cb7aa25cf69e3032b3ce333150/src/tools/miri/tests/genmc/pass/litmus/IRIWish.rs
src/tools/miri/tests/genmc/pass/litmus/IRIWish.rs
//@compile-flags: -Zmiri-genmc -Zmiri-disable-stacked-borrows // Translated from GenMC's "litmus/IRIWish" test. // This test prints the values read by the different threads to check that we get all the values we expect. // NOTE: the order of the lines in the output may change with changes to GenMC. // Before blessing...
rust
Apache-2.0
f8b1d59a81c700cb7aa25cf69e3032b3ce333150
2026-01-04T15:31:58.503980Z
false
rust-lang/rust
https://github.com/rust-lang/rust/blob/f8b1d59a81c700cb7aa25cf69e3032b3ce333150/src/tools/miri/tests/genmc/pass/litmus/default.rs
src/tools/miri/tests/genmc/pass/litmus/default.rs
//@compile-flags: -Zmiri-genmc -Zmiri-disable-stacked-borrows // Translated from GenMC's "litmus/default" test. #![no_main] #[path = "../../../utils/genmc.rs"] mod genmc; use std::sync::atomic::AtomicU64; use std::sync::atomic::Ordering::*; use crate::genmc::*; static X: AtomicU64 = AtomicU64::new(0); #[unsafe(n...
rust
Apache-2.0
f8b1d59a81c700cb7aa25cf69e3032b3ce333150
2026-01-04T15:31:58.503980Z
false
rust-lang/rust
https://github.com/rust-lang/rust/blob/f8b1d59a81c700cb7aa25cf69e3032b3ce333150/src/tools/miri/tests/genmc/pass/litmus/MPU_rels_acq.rs
src/tools/miri/tests/genmc/pass/litmus/MPU_rels_acq.rs
//@compile-flags: -Zmiri-genmc -Zmiri-disable-stacked-borrows // Translated from GenMC's "litmus/MPU+rels+acq" test. #![no_main] #[path = "../../../utils/genmc.rs"] mod genmc; use std::sync::atomic::AtomicU64; use std::sync::atomic::Ordering::*; // Note: the GenMC equivalent of this test (genmc/tests/correct/litmu...
rust
Apache-2.0
f8b1d59a81c700cb7aa25cf69e3032b3ce333150
2026-01-04T15:31:58.503980Z
false
rust-lang/rust
https://github.com/rust-lang/rust/blob/f8b1d59a81c700cb7aa25cf69e3032b3ce333150/src/tools/miri/tests/genmc/pass/litmus/riwi.rs
src/tools/miri/tests/genmc/pass/litmus/riwi.rs
//@compile-flags: -Zmiri-genmc -Zmiri-disable-stacked-borrows // Translated from GenMC's "litmus/riwi" test. #![no_main] #[path = "../../../utils/genmc.rs"] mod genmc; use std::sync::atomic::AtomicU64; use std::sync::atomic::Ordering::*; use crate::genmc::*; static X: AtomicU64 = AtomicU64::new(0); static Y: Atom...
rust
Apache-2.0
f8b1d59a81c700cb7aa25cf69e3032b3ce333150
2026-01-04T15:31:58.503980Z
false
rust-lang/rust
https://github.com/rust-lang/rust/blob/f8b1d59a81c700cb7aa25cf69e3032b3ce333150/src/tools/miri/tests/genmc/pass/litmus/2w2w_2sc_scf.rs
src/tools/miri/tests/genmc/pass/litmus/2w2w_2sc_scf.rs
//@compile-flags: -Zmiri-genmc -Zmiri-disable-stacked-borrows // Translated from GenMC's test "2+2W+2sc+scf". // It tests correct handling of SeqCst fences combined with relaxed accesses. #![no_main] #[path = "../../../utils/genmc.rs"] mod genmc; use std::sync::atomic::AtomicU64; use std::sync::atomic::Ordering::*;...
rust
Apache-2.0
f8b1d59a81c700cb7aa25cf69e3032b3ce333150
2026-01-04T15:31:58.503980Z
false
rust-lang/rust
https://github.com/rust-lang/rust/blob/f8b1d59a81c700cb7aa25cf69e3032b3ce333150/src/tools/miri/tests/genmc/pass/litmus/cumul-release.rs
src/tools/miri/tests/genmc/pass/litmus/cumul-release.rs
//@compile-flags: -Zmiri-genmc -Zmiri-disable-stacked-borrows // Translated from GenMC's test "litmus/cumul-release". #![no_main] #[path = "../../../utils/genmc.rs"] mod genmc; use std::sync::atomic::AtomicU64; use std::sync::atomic::Ordering::*; use crate::genmc::*; static X: AtomicU64 = AtomicU64::new(0); stati...
rust
Apache-2.0
f8b1d59a81c700cb7aa25cf69e3032b3ce333150
2026-01-04T15:31:58.503980Z
false
rust-lang/rust
https://github.com/rust-lang/rust/blob/f8b1d59a81c700cb7aa25cf69e3032b3ce333150/src/tools/miri/tests/genmc/pass/litmus/SB.rs
src/tools/miri/tests/genmc/pass/litmus/SB.rs
//@compile-flags: -Zmiri-genmc -Zmiri-disable-stacked-borrows // Translated from GenMC's "litmus/SB" test. #![no_main] #[path = "../../../utils/genmc.rs"] mod genmc; use std::sync::atomic::AtomicU64; use std::sync::atomic::Ordering::*; use crate::genmc::*; static X: AtomicU64 = AtomicU64::new(0); static Y: Atomic...
rust
Apache-2.0
f8b1d59a81c700cb7aa25cf69e3032b3ce333150
2026-01-04T15:31:58.503980Z
false
rust-lang/rust
https://github.com/rust-lang/rust/blob/f8b1d59a81c700cb7aa25cf69e3032b3ce333150/src/tools/miri/tests/genmc/pass/litmus/fr_w_w_w_reads.rs
src/tools/miri/tests/genmc/pass/litmus/fr_w_w_w_reads.rs
//@compile-flags: -Zmiri-genmc -Zmiri-disable-stacked-borrows // Translated from GenMC's "fr+w+w+w+reads" test. #![no_main] #[path = "../../../utils/genmc.rs"] mod genmc; use std::sync::atomic::AtomicU64; use std::sync::atomic::Ordering::*; use crate::genmc::*; static X: AtomicU64 = AtomicU64::new(0); #[unsafe(n...
rust
Apache-2.0
f8b1d59a81c700cb7aa25cf69e3032b3ce333150
2026-01-04T15:31:58.503980Z
false
rust-lang/rust
https://github.com/rust-lang/rust/blob/f8b1d59a81c700cb7aa25cf69e3032b3ce333150/src/tools/miri/tests/genmc/pass/litmus/corw.rs
src/tools/miri/tests/genmc/pass/litmus/corw.rs
//@compile-flags: -Zmiri-genmc -Zmiri-disable-stacked-borrows // Translated from GenMC's "CoRW" test. #![no_main] #[path = "../../../utils/genmc.rs"] mod genmc; use std::sync::atomic::AtomicU64; use std::sync::atomic::Ordering::*; use crate::genmc::*; static X: AtomicU64 = AtomicU64::new(0); #[unsafe(no_mangle)]...
rust
Apache-2.0
f8b1d59a81c700cb7aa25cf69e3032b3ce333150
2026-01-04T15:31:58.503980Z
false
rust-lang/rust
https://github.com/rust-lang/rust/blob/f8b1d59a81c700cb7aa25cf69e3032b3ce333150/src/tools/miri/tests/genmc/pass/litmus/detour.rs
src/tools/miri/tests/genmc/pass/litmus/detour.rs
//@compile-flags: -Zmiri-genmc -Zmiri-disable-stacked-borrows //@revisions: join no_join // Translated from GenMC's "litmus/detour" test. // This test has two revisitions to test whether we get the same result // independent of whether we join the spawned threads or not. #![no_main] #[path = "../../../utils/genmc.r...
rust
Apache-2.0
f8b1d59a81c700cb7aa25cf69e3032b3ce333150
2026-01-04T15:31:58.503980Z
false
rust-lang/rust
https://github.com/rust-lang/rust/blob/f8b1d59a81c700cb7aa25cf69e3032b3ce333150/src/tools/miri/tests/genmc/pass/litmus/inc2w.rs
src/tools/miri/tests/genmc/pass/litmus/inc2w.rs
//@compile-flags: -Zmiri-genmc -Zmiri-disable-stacked-borrows // Translated from GenMC's test "litmus/inc2w". #![no_main] #[path = "../../../utils/genmc.rs"] mod genmc; use std::sync::atomic::AtomicU64; use std::sync::atomic::Ordering::*; use crate::genmc::*; static X: AtomicU64 = AtomicU64::new(0); #[unsafe(no_...
rust
Apache-2.0
f8b1d59a81c700cb7aa25cf69e3032b3ce333150
2026-01-04T15:31:58.503980Z
false
rust-lang/rust
https://github.com/rust-lang/rust/blob/f8b1d59a81c700cb7aa25cf69e3032b3ce333150/src/tools/miri/tests/genmc/pass/litmus/MP_incMPs.rs
src/tools/miri/tests/genmc/pass/litmus/MP_incMPs.rs
//@compile-flags: -Zmiri-genmc -Zmiri-disable-stacked-borrows // Translated from GenMC's "litmus/MP+incMP" test. #![no_main] #[path = "../../../utils/genmc.rs"] mod genmc; use std::sync::atomic::AtomicU64; use std::sync::atomic::Ordering::*; use crate::genmc::*; static X: AtomicU64 = AtomicU64::new(0); static Y: ...
rust
Apache-2.0
f8b1d59a81c700cb7aa25cf69e3032b3ce333150
2026-01-04T15:31:58.503980Z
false