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/intrinsics/unchecked_mul1.rs
src/tools/miri/tests/fail/intrinsics/unchecked_mul1.rs
fn main() { // MAX overflow let _val = unsafe { 300u16.unchecked_mul(250u16) }; //~ ERROR: arithmetic overflow in `unchecked_mul` }
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/intrinsics/ptr_metadata_uninit_slice_len.rs
src/tools/miri/tests/fail/intrinsics/ptr_metadata_uninit_slice_len.rs
//@compile-flags: -Zmiri-disable-validation //@ normalize-stderr-test: "(\n)ALLOC \(.*\) \{\n(.*\n)*\}(\n)" -> "${1}ALLOC DUMP${3}" //@ normalize-stderr-test: "\[0x[0-9a-z]+..0x[0-9a-z]+\]" -> "[0xX..0xY]" #![feature(core_intrinsics, custom_mir)] use std::intrinsics::mir::*; // This disables validation and uses custo...
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/intrinsics/assume.rs
src/tools/miri/tests/fail/intrinsics/assume.rs
#![feature(core_intrinsics)] fn main() { let x = 5; unsafe { std::intrinsics::assume(x < 10); std::intrinsics::assume(x > 1); std::intrinsics::assume(x > 42); //~ ERROR: `assume` called with `false` } }
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/intrinsics/ptr_offset_overflow.rs
src/tools/miri/tests/fail/intrinsics/ptr_offset_overflow.rs
//@normalize-stderr-test: "\d+ bytes" -> "$$BYTES bytes" fn main() { let v = [0i8; 4]; let x = &v as *const i8; let x = unsafe { x.offset(isize::MIN) }; //~ERROR: in-bounds pointer arithmetic failed 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/intrinsics/simd-select-invalid-bool.rs
src/tools/miri/tests/fail/intrinsics/simd-select-invalid-bool.rs
#![feature(core_intrinsics, repr_simd)] use std::intrinsics::simd::simd_select; #[repr(simd)] #[allow(non_camel_case_types)] #[derive(Copy, Clone)] struct i32x2([i32; 2]); fn main() { unsafe { let x = i32x2([0, 1]); simd_select(x, x, x); //~ERROR: must be all-0-bits or all-1-bits } }
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/intrinsics/float_to_int_64_too_small2.rs
src/tools/miri/tests/fail/intrinsics/float_to_int_64_too_small2.rs
#![feature(core_intrinsics)] // Directly call intrinsic to avoid debug assertions in libstd use std::intrinsics::float_to_int_unchecked; fn main() { unsafe { float_to_int_unchecked::<f64, i64>(-9223372036854777856.0f64); //~ ERROR: cannot be represented in target type `i64` } }
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/intrinsics/ptr_offset_int_plus_int.rs
src/tools/miri/tests/fail/intrinsics/ptr_offset_int_plus_int.rs
//@compile-flags: -Zmiri-permissive-provenance fn main() { // Can't offset an integer pointer by non-zero offset. unsafe { let _val = (1 as *mut u8).offset(1); //~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/intrinsics/fast_math_second.rs
src/tools/miri/tests/fail/intrinsics/fast_math_second.rs
#![feature(core_intrinsics)] fn main() { unsafe { let _x: f32 = core::intrinsics::fmul_fast(3.4f32, f32::INFINITY); //~ ERROR: `fmul_fast` intrinsic called with non-finite value as second parameter } }
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/intrinsics/float_to_int_64_too_big6.rs
src/tools/miri/tests/fail/intrinsics/float_to_int_64_too_big6.rs
#![feature(core_intrinsics)] // Directly call intrinsic to avoid debug assertions in libstd use std::intrinsics::float_to_int_unchecked; fn main() { unsafe { float_to_int_unchecked::<f64, u128>(f64::MAX); //~ ERROR: cannot be represented in target type `u128` } }
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/intrinsics/float_to_int_64_inf1.rs
src/tools/miri/tests/fail/intrinsics/float_to_int_64_inf1.rs
#![feature(core_intrinsics)] // Directly call intrinsic to avoid debug assertions in libstd use std::intrinsics::float_to_int_unchecked; fn main() { unsafe { float_to_int_unchecked::<f64, u128>(f64::INFINITY); //~ ERROR: cannot be represented in target type `u128` } }
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/intrinsics/float_to_int_32_too_small1.rs
src/tools/miri/tests/fail/intrinsics/float_to_int_32_too_small1.rs
#![feature(core_intrinsics)] // Directly call intrinsic to avoid debug assertions in libstd use std::intrinsics::float_to_int_unchecked; fn main() { unsafe { float_to_int_unchecked::<f32, i32>(-2147483904.0f32); //~ ERROR: cannot be represented in target 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/intrinsics/simd-rem-by-zero.rs
src/tools/miri/tests/fail/intrinsics/simd-rem-by-zero.rs
#![feature(core_intrinsics, repr_simd)] use std::intrinsics::simd::simd_rem; #[repr(simd)] #[allow(non_camel_case_types)] struct i32x2([i32; 2]); fn main() { unsafe { let x = i32x2([1, 1]); let y = i32x2([1, 0]); simd_rem(x, y); //~ERROR: Undefined Behavior: calculating the remainder with...
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/intrinsics/ptr_offset_from_unsigned_neg.rs
src/tools/miri/tests/fail/intrinsics/ptr_offset_from_unsigned_neg.rs
//@normalize-stderr-test: "\d+ < \d+" -> "$$ADDR < $$ADDR" fn main() { let arr = [0u8; 8]; let ptr1 = arr.as_ptr(); let ptr2 = ptr1.wrapping_add(4); let _val = unsafe { ptr1.offset_from_unsigned(ptr2) }; //~ERROR: first pointer has smaller address than second }
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/intrinsics/unchecked_shl.rs
src/tools/miri/tests/fail/intrinsics/unchecked_shl.rs
fn main() { unsafe { let _n = 1i8.unchecked_shl(8); //~^ ERROR: overflowing shift by 8 in `unchecked_shl` } }
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/intrinsics/simd-shr-too-far.rs
src/tools/miri/tests/fail/intrinsics/simd-shr-too-far.rs
#![feature(core_intrinsics, repr_simd)] use std::intrinsics::simd::simd_shr; #[repr(simd)] #[allow(non_camel_case_types)] struct i32x2([i32; 2]); fn main() { unsafe { let x = i32x2([1, 1]); let y = i32x2([20, 40]); simd_shr(x, y); //~ERROR: overflowing shift by 40 in `simd_shr` in lane 1 ...
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/intrinsics/simd-reduce-invalid-bool.rs
src/tools/miri/tests/fail/intrinsics/simd-reduce-invalid-bool.rs
#![feature(core_intrinsics, repr_simd)] use std::intrinsics::simd::simd_reduce_any; #[repr(simd)] #[allow(non_camel_case_types)] struct i32x2([i32; 2]); fn main() { unsafe { let x = i32x2([0, 1]); simd_reduce_any(x); //~ERROR: must be all-0-bits or all-1-bits } }
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/intrinsics/float_to_int_32_nan.rs
src/tools/miri/tests/fail/intrinsics/float_to_int_32_nan.rs
#![feature(core_intrinsics)] // Directly call intrinsic to avoid debug assertions in libstd use std::intrinsics::float_to_int_unchecked; fn main() { unsafe { float_to_int_unchecked::<f32, u32>(f32::NAN); //~ ERROR: cannot be represented in target type `u32` } }
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/intrinsics/funnel_shl.rs
src/tools/miri/tests/fail/intrinsics/funnel_shl.rs
#![feature(core_intrinsics, funnel_shifts)] fn main() { unsafe { std::intrinsics::unchecked_funnel_shl(1_u32, 2, 32); //~ ERROR: Undefined Behavior } }
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/intrinsics/disjoint_bitor.rs
src/tools/miri/tests/fail/intrinsics/disjoint_bitor.rs
#![feature(core_intrinsics)] fn main() { // one bit in common unsafe { std::intrinsics::disjoint_bitor(0b01101001_u8, 0b10001110) }; //~ ERROR: Undefined Behavior }
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/intrinsics/ptr_offset_from_different_allocs.rs
src/tools/miri/tests/fail/intrinsics/ptr_offset_from_different_allocs.rs
fn main() { unsafe { (&1_u8 as *const u8).offset_from(&2_u8); //~ERROR: not both derived from the same allocation } }
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/intrinsics/simd-gather.rs
src/tools/miri/tests/fail/intrinsics/simd-gather.rs
#![feature(portable_simd)] use std::simd::*; fn main() { unsafe { let vec: &[i8] = &[10, 11, 12, 13, 14, 15, 16, 17, 18]; let idxs = Simd::from_array([9, 3, 0, 17]); let _result = Simd::gather_select_unchecked(&vec, Mask::splat(true), idxs, Simd::splat(0)); //~^ERROR: attempting to ...
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/intrinsics/simd_masked_load_element_misaligned.rs
src/tools/miri/tests/fail/intrinsics/simd_masked_load_element_misaligned.rs
#![feature(core_intrinsics, portable_simd)] use std::intrinsics::simd::*; use std::simd::*; fn main() { unsafe { let buf = [0u32; 5]; //~v ERROR: accessing memory with alignment simd_masked_load::<_, _, _, { SimdAlign::Element }>( i32x4::splat(-1), // This is not i3...
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/intrinsics/ptr_metadata_uninit_thin.rs
src/tools/miri/tests/fail/intrinsics/ptr_metadata_uninit_thin.rs
//@compile-flags: -Zmiri-disable-validation //@ normalize-stderr-test: "(\n)ALLOC \(.*\) \{\n(.*\n)*\}(\n)" -> "${1}ALLOC DUMP${3}" //@ normalize-stderr-test: "\[0x[0-9a-z]..0x[0-9a-z]\]" -> "[0xX..0xY]" #![feature(core_intrinsics, custom_mir)] use std::intrinsics::mir::*; // This disables validation and uses custom ...
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/intrinsics/ptr_offset_int_plus_ptr.rs
src/tools/miri/tests/fail/intrinsics/ptr_offset_int_plus_ptr.rs
//@compile-flags: -Zmiri-permissive-provenance //@normalize-stderr-test: "\d+ bytes" -> "$$BYTES bytes" fn main() { let ptr = Box::into_raw(Box::new(0u32)); // Can't start with an integer pointer and get to something usable unsafe { let _val = (1 as *mut u8).offset(ptr as isize); //~ERROR: is a dan...
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/intrinsics/simd-scatter.rs
src/tools/miri/tests/fail/intrinsics/simd-scatter.rs
#![feature(portable_simd)] use std::simd::*; fn main() { unsafe { let mut vec: Vec<i8> = vec![10, 11, 12, 13, 14, 15, 16, 17, 18]; let idxs = Simd::from_array([9, 3, 0, 17]); Simd::from_array([-27, 82, -41, 124]).scatter_select_unchecked( //~^ERROR: attempting to access 1 byte ...
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/intrinsics/typed-swap-invalid-scalar.rs
src/tools/miri/tests/fail/intrinsics/typed-swap-invalid-scalar.rs
//@revisions: left right #![feature(core_intrinsics)] #![feature(rustc_attrs)] use std::intrinsics::typed_swap_nonoverlapping; use std::ptr::addr_of_mut; fn invalid_scalar() { // We run the test twice, with either the left or the right side being invalid. let mut a = if cfg!(left) { 2_u8 } else { 1_u8 }; ...
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/panic/panic_abort4.rs
src/tools/miri/tests/fail/panic/panic_abort4.rs
//@error-in-other-file: the program aborted execution //@compile-flags: -C panic=abort fn main() { core::panic!("{}-panicking from libcore", 42); }
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/panic/tls_macro_const_drop_panic.rs
src/tools/miri/tests/fail/panic/tls_macro_const_drop_panic.rs
//@error-in-other-file: aborted execution // Backtraces vary wildly between platforms, we have to normalize away almost the entire thing. // Full backtraces avoid annoying empty line differences. //@compile-flags: -Zmiri-backtrace=full //@normalize-stderr-test: "'main'|'<unnamed>'" -> "$$NAME" //@normalize-stderr-test:...
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/panic/panic_abort3.rs
src/tools/miri/tests/fail/panic/panic_abort3.rs
//@error-in-other-file: the program aborted execution //@compile-flags: -C panic=abort fn main() { core::panic!("panicking from libcore"); }
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/panic/bad_unwind.rs
src/tools/miri/tests/fail/panic/bad_unwind.rs
//! Unwinding when the caller ABI is "C" (without "-unwind") is UB. // The opposite version (callee does not allow unwinding) is impossible to // even write: MIR validation catches functions that have `UnwindContinue` but // are not allowed to unwind. extern "C-unwind" fn unwind() { panic!(); } fn main() { le...
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/panic/no_std.rs
src/tools/miri/tests/fail/panic/no_std.rs
//@compile-flags: -Cpanic=abort #![feature(core_intrinsics)] #![no_std] #![no_main] use core::fmt::Write; #[path = "../../utils/mod.no_std.rs"] mod utils; #[no_mangle] fn miri_start(_argc: isize, _argv: *const *const u8) -> isize { panic!("blarg I am dead") } #[panic_handler] fn panic_handler(panic_info: &core:...
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/panic/abort_unwind.rs
src/tools/miri/tests/fail/panic/abort_unwind.rs
//@error-in-other-file: the program aborted execution //@normalize-stderr-test: "\n +[0-9]+:[^\n]+" -> "" //@normalize-stderr-test: "\n +at [^\n]+" -> "" #![feature(abort_unwind)] fn main() { std::panic::abort_unwind(|| panic!("PANIC!!!")); }
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/panic/panic_abort1.rs
src/tools/miri/tests/fail/panic/panic_abort1.rs
//@error-in-other-file: the program aborted execution //@compile-flags: -C panic=abort fn main() { std::panic!("panicking from libstd"); }
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/panic/double_panic.rs
src/tools/miri/tests/fail/panic/double_panic.rs
//@normalize-stderr-test: "\n +[0-9]+:[^\n]+" -> "" //@normalize-stderr-test: "\n +at [^\n]+" -> "" //@error-in-other-file: aborted execution struct Foo; impl Drop for Foo { fn drop(&mut self) { panic!("second"); } } fn main() { let _foo = Foo; panic!("first"); }
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/panic/unwind_panic_abort.rs
src/tools/miri/tests/fail/panic/unwind_panic_abort.rs
//@compile-flags: -Cpanic=abort //! Unwinding despite `-C panic=abort` is an error. extern "Rust" { fn miri_start_unwind(payload: *mut u8) -> !; } fn main() { unsafe { miri_start_unwind(&mut 0); //~ ERROR: unwinding past a stack frame that does not allow unwinding } }
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/panic/panic_abort2.rs
src/tools/miri/tests/fail/panic/panic_abort2.rs
//@error-in-other-file: the program aborted execution //@compile-flags: -C panic=abort fn main() { std::panic!("{}-panicking from libstd", 42); }
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/panic/tls_macro_drop_panic.rs
src/tools/miri/tests/fail/panic/tls_macro_drop_panic.rs
//@error-in-other-file: aborted execution // Backtraces vary wildly between platforms, we have to normalize away almost the entire thing //@normalize-stderr-test: "'main'|'<unnamed>'" -> "$$NAME" //@normalize-stderr-test: ".*(note|-->|\|).*\n" -> "" //@normalize-stderr-test: "\n *\d+:.*\n *at .*" -> "" pub struct Nois...
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/tail_calls/signature-mismatch-arg.rs
src/tools/miri/tests/fail/tail_calls/signature-mismatch-arg.rs
#![feature(explicit_tail_calls)] #![allow(incomplete_features)] fn main() { // FIXME(explicit_tail_calls): // the error should point to `become g(x)`, // but tail calls mess up the backtrace it seems like... f(0); //~^ error: type i32 passing argument of type u32 } fn f(x: u32) { let g = u...
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/tail_calls/dangling-local-var.rs
src/tools/miri/tests/fail/tail_calls/dangling-local-var.rs
#![feature(explicit_tail_calls)] #![allow(incomplete_features)] fn g(x: *const i32) { let _val = unsafe { *x }; //~ERROR: has been freed, so this pointer is dangling } fn f(_x: *const i32) { let local = 0; let ptr = &local as *const i32; become g(ptr) } fn main() { f(std::ptr::null()); }
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/tail_calls/cc-mismatch.rs
src/tools/miri/tests/fail/tail_calls/cc-mismatch.rs
//@error-in-other-file: Undefined Behavior: calling a function with calling convention "C" using calling convention "Rust" #![feature(explicit_tail_calls)] #![allow(incomplete_features)] fn main() { let f = unsafe { std::mem::transmute::<extern "C" fn(), fn()>(f) }; become f(); } extern "C" fn f() {}
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/alloc/reallocate-dangling.rs
src/tools/miri/tests/fail/alloc/reallocate-dangling.rs
use std::alloc::{Layout, alloc, dealloc, realloc}; fn main() { unsafe { let x = alloc(Layout::from_size_align_unchecked(1, 1)); dealloc(x, Layout::from_size_align_unchecked(1, 1)); let _z = realloc(x, Layout::from_size_align_unchecked(1, 1), 1); //~ERROR: has been freed } }
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/alloc/alloc_error_handler_no_std.rs
src/tools/miri/tests/fail/alloc/alloc_error_handler_no_std.rs
//@compile-flags: -Cpanic=abort #![feature(core_intrinsics)] #![feature(alloc_error_handler)] #![feature(allocator_api)] #![no_std] #![no_main] extern crate alloc; use alloc::alloc::*; use core::fmt::Write; #[path = "../../utils/mod.no_std.rs"] mod utils; // The default no_std alloc_error_handler is a panic. #[pan...
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/alloc/too_large.rs
src/tools/miri/tests/fail/alloc/too_large.rs
#![feature(rustc_attrs)] extern "Rust" { #[rustc_std_internal_symbol] fn __rust_alloc(size: usize, align: usize) -> *mut u8; } fn main() { let bytes = isize::MAX as usize + 1; unsafe { __rust_alloc(bytes, 1); //~ERROR: larger than half the address space } }
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/alloc/deallocate-twice.rs
src/tools/miri/tests/fail/alloc/deallocate-twice.rs
use std::alloc::{Layout, alloc, dealloc}; fn main() { unsafe { let x = alloc(Layout::from_size_align_unchecked(1, 1)); dealloc(x, Layout::from_size_align_unchecked(1, 1)); dealloc(x, Layout::from_size_align_unchecked(1, 1)); //~ERROR: has been freed } }
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/alloc/deallocate-bad-alignment.rs
src/tools/miri/tests/fail/alloc/deallocate-bad-alignment.rs
use std::alloc::{Layout, alloc, dealloc}; fn main() { unsafe { let x = alloc(Layout::from_size_align_unchecked(1, 1)); dealloc(x, Layout::from_size_align_unchecked(1, 2)); //~ERROR: has size 1 and alignment 1, but gave size 1 and alignment 2 } }
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/alloc/alloc_error_handler.rs
src/tools/miri/tests/fail/alloc/alloc_error_handler.rs
//@error-in-other-file: aborted #![feature(allocator_api)] use std::alloc::*; fn main() { handle_alloc_error(Layout::for_value(&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/fail/alloc/unsupported_non_power_two_alignment.rs
src/tools/miri/tests/fail/alloc/unsupported_non_power_two_alignment.rs
// Test non-power-of-two alignment. #![feature(rustc_attrs)] extern "Rust" { #[rustc_std_internal_symbol] fn __rust_alloc(size: usize, align: usize) -> *mut u8; } fn main() { unsafe { __rust_alloc(1, 3); //~^ERROR: creating allocation with non-power-of-two alignment } }
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/alloc/unsupported_big_alignment.rs
src/tools/miri/tests/fail/alloc/unsupported_big_alignment.rs
// Previously, attempting to allocate with an alignment greater than 2^29 would cause miri to ICE // because rustc does not support alignments that large. // https://github.com/rust-lang/miri/issues/3687 #![feature(rustc_attrs)] extern "Rust" { #[rustc_std_internal_symbol] fn __rust_alloc(size: usize, align: ...
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/alloc/reallocate-bad-size.rs
src/tools/miri/tests/fail/alloc/reallocate-bad-size.rs
use std::alloc::{Layout, alloc, realloc}; fn main() { unsafe { let x = alloc(Layout::from_size_align_unchecked(1, 1)); let _y = realloc(x, Layout::from_size_align_unchecked(2, 1), 1); //~ERROR: has size 1 and alignment 1, but gave size 2 and alignment 1 } }
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/alloc/deallocate-bad-size.rs
src/tools/miri/tests/fail/alloc/deallocate-bad-size.rs
use std::alloc::{Layout, alloc, dealloc}; fn main() { unsafe { let x = alloc(Layout::from_size_align_unchecked(1, 1)); dealloc(x, Layout::from_size_align_unchecked(2, 1)); //~ERROR: has size 1 and alignment 1, but gave size 2 and alignment 1 } }
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/alloc/global_system_mixup.rs
src/tools/miri/tests/fail/alloc/global_system_mixup.rs
// Make sure we detect when the `Global` and `System` allocators are mixed // (even when the default `Global` uses `System`). //@error-in-other-file: /deallocating .*, which is Rust heap memory, using .* heap deallocation operation/ //@normalize-stderr-test: "using [A-Za-z]+ heap deallocation operation" -> "using PLAT...
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/alloc/reallocate-change-alloc.rs
src/tools/miri/tests/fail/alloc/reallocate-change-alloc.rs
use std::alloc::{Layout, alloc, realloc}; fn main() { unsafe { let x = alloc(Layout::from_size_align_unchecked(1, 1)); let _y = realloc(x, Layout::from_size_align_unchecked(1, 1), 1); let _z = *x; //~ ERROR: has been freed } }
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/alloc/no_global_allocator.rs
src/tools/miri/tests/fail/alloc/no_global_allocator.rs
//@compile-flags: -Cpanic=abort //@normalize-stderr-test: "OS `.*`" -> "$$OS" // Make sure we pretend the allocation symbols don't exist when there is no allocator #![no_std] #![no_main] extern "Rust" { fn __rust_alloc(size: usize, align: usize) -> *mut u8; } #[no_mangle] fn miri_start(_argc: isize, _argv: *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/alloc/alloc_error_handler_custom.rs
src/tools/miri/tests/fail/alloc/alloc_error_handler_custom.rs
//@compile-flags: -Cpanic=abort #![feature(core_intrinsics)] #![feature(alloc_error_handler)] #![feature(allocator_api)] #![no_std] #![no_main] extern crate alloc; use alloc::alloc::*; use core::fmt::Write; #[path = "../../utils/mod.no_std.rs"] mod utils; #[alloc_error_handler] fn alloc_error_handler(layout: Layout...
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/alloc/stack_free.rs
src/tools/miri/tests/fail/alloc/stack_free.rs
// Validation/SB changes why we fail //@compile-flags: -Zmiri-disable-validation -Zmiri-disable-stacked-borrows //@error-in-other-file: /deallocating .*, which is stack variable memory, using Rust heap deallocation operation/ fn main() { let x = 42; let bad_box = unsafe { std::mem::transmute::<&i32, Box<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/tree_borrows/parent_read_freezes_raw_mut.rs
src/tools/miri/tests/fail/tree_borrows/parent_read_freezes_raw_mut.rs
//@compile-flags: -Zmiri-tree-borrows // Read from local variable kills reborrows *and* raw pointers derived from them. // This test would be accepted under Stacked Borrows. fn main() { unsafe { let mut root = 6u8; let mref = &mut root; let ptr = mref as *mut u8; *ptr = 0; // Write ...
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/tree_borrows/outside-range.rs
src/tools/miri/tests/fail/tree_borrows/outside-range.rs
//@compile-flags: -Zmiri-tree-borrows // Check that in the case of locations outside the range of a pointer, // protectors trigger if and only if the location has already been accessed fn main() { unsafe { let data = &mut [0u8, 1, 2, 3]; let raw = data.as_mut_ptr(); stuff(&mut *raw, raw); ...
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/tree_borrows/error-range.rs
src/tools/miri/tests/fail/tree_borrows/error-range.rs
//@compile-flags: -Zmiri-tree-borrows use core::ptr::addr_of_mut; // Check that the diagnostics correctly report the exact range at fault // and trim irrelevant events. fn main() { unsafe { let data = &mut [0u8; 16]; // Create and activate a few bytes let rmut = &mut *addr_of_mut!(data[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/fail/tree_borrows/strongly-protected.rs
src/tools/miri/tests/fail/tree_borrows/strongly-protected.rs
//@compile-flags: -Zmiri-tree-borrows //@error-in-other-file: /deallocation through .* is forbidden/ fn inner(x: &mut i32, f: fn(*mut i32)) { // `f` may mutate, but it may not deallocate! // `f` takes a raw pointer so that the only protector // is that on `x` f(x) } fn main() { inner(Box::leak(Box...
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/tree_borrows/pass_invalid_mut.rs
src/tools/miri/tests/fail/tree_borrows/pass_invalid_mut.rs
//@compile-flags: -Zmiri-tree-borrows // This test is the TB counterpart to fail/stacked_borrows/pass_invalid_mut, // but the SB version passes TB without error. // An additional write access is inserted so that this test properly fails. // Make sure that we cannot use a `&mut` whose parent got invalidated. // fail/bo...
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/tree_borrows/cell-inside-struct.rs
src/tools/miri/tests/fail/tree_borrows/cell-inside-struct.rs
//! A version of `cell_inside_struct` that dumps the tree so that we can see what is happening. //@compile-flags: -Zmiri-tree-borrows #[path = "../../utils/mod.rs"] #[macro_use] mod utils; use std::cell::Cell; struct Foo { field1: u32, field2: Cell<u32>, } fn main() { let root = Foo { field1: 42, field2:...
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/tree_borrows/spurious_read.rs
src/tools/miri/tests/fail/tree_borrows/spurious_read.rs
// We ensure a deterministic execution. // Note that we are *also* using barriers: the barriers enforce the // specific interleaving of operations that we want, but we need to disable // preemption to ensure that the error message is also deterministic. //@compile-flags: -Zmiri-deterministic-concurrency //@compile-flag...
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/tree_borrows/return_invalid_mut.rs
src/tools/miri/tests/fail/tree_borrows/return_invalid_mut.rs
//@compile-flags: -Zmiri-tree-borrows // This test is the TB counterpart to fail/stacked_borrows/return_invalid_mut, // but the SB version passes TB without error. // An additional write access is inserted so that this test properly fails. // Make sure that we cannot use a returned `&mut` that got already invalidated....
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/tree_borrows/protector-write-lazy.rs
src/tools/miri/tests/fail/tree_borrows/protector-write-lazy.rs
//@compile-flags: -Zmiri-tree-borrows // This test tests that TB's protector end semantics correctly ensure // that protected activated writes can be reordered. fn the_other_function(ref_to_fst_elem: &mut i32, ptr_to_vec: *mut i32) -> *mut i32 { // Activate the reference. Afterwards, we should be able to reorder ar...
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/tree_borrows/write-during-2phase.rs
src/tools/miri/tests/fail/tree_borrows/write-during-2phase.rs
//@compile-flags: -Zmiri-tree-borrows // We invalidate a reference during a 2-phase borrow by doing a Foreign // Write in between the initial reborrow and function entry. UB occurs // on function entry when reborrow from a Disabled fails. // This test would pass under Stacked Borrows, but Tree Borrows // is more stric...
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/tree_borrows/subtree_traversal_skipping_diagnostics.rs
src/tools/miri/tests/fail/tree_borrows/subtree_traversal_skipping_diagnostics.rs
//@compile-flags: -Zmiri-tree-borrows -Zmiri-provenance-gc=0 // Shows the effect of the optimization of #4008. // The diagnostics change, but not the error itself. // When this method is called, the tree will be a single line and look like this, // with other_ptr being the root at the top // other_ptr = root : Unique...
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/tree_borrows/fnentry_invalidation.rs
src/tools/miri/tests/fail/tree_borrows/fnentry_invalidation.rs
//@compile-flags: -Zmiri-tree-borrows // This test is the TB counterpart to fail/stacked_borrows/fnentry_invalidation, // but the SB version passes TB without error. // An additional write access is inserted so that this test properly fails. // Test that spans displayed in diagnostics identify the function call, not 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/tree_borrows/frozen-lazy-write-to-surrounding.rs
src/tools/miri/tests/fail/tree_borrows/frozen-lazy-write-to-surrounding.rs
//@compile-flags: -Zmiri-tree-borrows fn main() { // Since the "inside" part is `!Freeze`, the permission to mutate is gone. let pair = ((), 1); let x = &pair.0; let ptr = (&raw const *x).cast::<i32>().cast_mut(); unsafe { ptr.write(0) }; //~ERROR: /write access .* forbidden/ }
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/tree_borrows/reservedim_spurious_write.rs
src/tools/miri/tests/fail/tree_borrows/reservedim_spurious_write.rs
// Illustrating a problematic interaction between Reserved, interior mutability, // and protectors, that makes spurious writes fail in the previous model of Tree Borrows. // As for all similar tests, we disable preemption so that the error message is deterministic. //@compile-flags: -Zmiri-tree-borrows -Zmiri-determini...
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/tree_borrows/repeated_foreign_read_lazy_conflicted.rs
src/tools/miri/tests/fail/tree_borrows/repeated_foreign_read_lazy_conflicted.rs
//@compile-flags: -Zmiri-tree-borrows use std::ptr::addr_of_mut; fn do_something(_: u8) {} unsafe fn access_after_sub_1(x: &mut u8, orig_ptr: *mut u8) { // causes a second access, which should make the lazy part of `x` be `Reserved {conflicted: true}` do_something(*orig_ptr); // read from the conflicted ...
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/tree_borrows/alternate-read-write.rs
src/tools/miri/tests/fail/tree_borrows/alternate-read-write.rs
//@compile-flags: -Zmiri-tree-borrows // Check that TB properly rejects alternating Reads and Writes, but tolerates // alternating only Reads to Reserved mutable references. fn main() { let x = &mut 0u8; let y = unsafe { &mut *(x as *mut u8) }; // Foreign Read, but this is a no-op from the point of view 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/fail/tree_borrows/wildcard/cross_tree_update_main_invalid_exposed.rs
src/tools/miri/tests/fail/tree_borrows/wildcard/cross_tree_update_main_invalid_exposed.rs
//@compile-flags: -Zmiri-tree-borrows -Zmiri-permissive-provenance /// Checks how accesses from one subtree affect other subtrees. /// This test checks that an access from a subtree performs a /// wildcard access on all earlier trees, and that local /// accesses are treated as access errors for tags that are /// large...
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/tree_borrows/wildcard/multi_exposed_siblings_disable.rs
src/tools/miri/tests/fail/tree_borrows/wildcard/multi_exposed_siblings_disable.rs
//@compile-flags: -Zmiri-tree-borrows -Zmiri-permissive-provenance /// Checks with multiple exposed nodes, that if they are all disabled /// then no wildcard accesses are possible. pub fn main() { let mut x: u32 = 42; let ptr_base = &mut x as *mut u32; let ref1 = unsafe { &mut *ptr_base }; let ref2 = ...
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/tree_borrows/wildcard/dealloc.rs
src/tools/miri/tests/fail/tree_borrows/wildcard/dealloc.rs
//@compile-flags: -Zmiri-tree-borrows -Zmiri-permissive-provenance /// Checks that deallocation through a wildcard ref fails, /// if all exposed references are disabled. pub fn main() { use std::alloc::Layout; let x = unsafe { std::alloc::alloc_zeroed(Layout::new::<u32>()) as *mut u32 }; let ref1 = 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/tree_borrows/wildcard/cross_tree_update_newer_exposed.rs
src/tools/miri/tests/fail/tree_borrows/wildcard/cross_tree_update_newer_exposed.rs
//@compile-flags: -Zmiri-tree-borrows -Zmiri-permissive-provenance /// Checks how accesses from one subtree affect other subtrees. /// This test checks that an access from an earlier created subtree /// is foreign to a later created one. pub fn main() { let mut x: u32 = 42; let ref_base = &mut x; let int...
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/tree_borrows/wildcard/gc.rs
src/tools/miri/tests/fail/tree_borrows/wildcard/gc.rs
//@compile-flags: -Zmiri-tree-borrows -Zmiri-permissive-provenance #[path = "../../../utils/mod.rs"] mod utils; /// Checks that the garbage collector doesn't remove any exposed tags. fn main() { let mut _x: u32 = 4; let int = { let y = &_x; y as *const u32 as usize }; // If y wasn't ex...
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/tree_borrows/wildcard/protector_conflicted.rs
src/tools/miri/tests/fail/tree_borrows/wildcard/protector_conflicted.rs
//@compile-flags: -Zmiri-tree-borrows -Zmiri-permissive-provenance /// Checks that wildcard accesses correctly infers the allowed permissions /// on protected conflicted pointers. pub fn main() { let mut x: u32 = 42; let ptr_base = &mut x as *mut u32; let ref1 = unsafe { &mut *ptr_base }; let ref2 = u...
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/tree_borrows/wildcard/cross_tree_update_newer.rs
src/tools/miri/tests/fail/tree_borrows/wildcard/cross_tree_update_newer.rs
//@compile-flags: -Zmiri-tree-borrows -Zmiri-permissive-provenance /// Checks how accesses from one subtree affect other subtrees. /// This test checks that an access from an earlier created subtree /// is foreign to a later created one. pub fn main() { let mut x: u32 = 42; let ref_base = &mut x; let int...
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/tree_borrows/wildcard/single_exposed_local.rs
src/tools/miri/tests/fail/tree_borrows/wildcard/single_exposed_local.rs
//@compile-flags: -Zmiri-tree-borrows -Zmiri-permissive-provenance /// Checks if a local access gets correctly triggered during wildcard access, /// if we know that the only exposed reference is local to the node. pub fn main() { let mut x: u32 = 0; let ref1 = &mut x; let int = ref1 as *mut u32 as usize;...
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/tree_borrows/wildcard/cross_tree_update_main.rs
src/tools/miri/tests/fail/tree_borrows/wildcard/cross_tree_update_main.rs
//@compile-flags: -Zmiri-tree-borrows -Zmiri-permissive-provenance /// Checks how accesses from one subtree affect other subtrees. /// This tests how main is effected by an access through a subtree. pub fn main() { let mut x: u32 = 42; let ptr_base = &mut x as *mut u32; let ref1 = unsafe { &mut *ptr_base ...
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/tree_borrows/wildcard/multi_exposed_siblings_local.rs
src/tools/miri/tests/fail/tree_borrows/wildcard/multi_exposed_siblings_local.rs
//@compile-flags: -Zmiri-tree-borrows -Zmiri-permissive-provenance /// Checks if a local access gets correctly triggered, if we know that /// all exposed references are local to a node. pub fn main() { let mut x: u32 = 42; let ptr_base = &mut x as *mut u32; let ref1 = unsafe { &mut *ptr_base }; let re...
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/tree_borrows/wildcard/cross_tree_update_older_invalid_exposed.rs
src/tools/miri/tests/fail/tree_borrows/wildcard/cross_tree_update_older_invalid_exposed.rs
//@compile-flags: -Zmiri-tree-borrows -Zmiri-permissive-provenance /// Checks how accesses from one subtree affect other subtrees. /// This test checks that an access from a newer created subtree /// performs a wildcard access on all earlier trees, and that /// either accesses are treated as foreign for tags that are ...
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/tree_borrows/wildcard/multi_exposed_child_unique_writer.rs
src/tools/miri/tests/fail/tree_borrows/wildcard/multi_exposed_child_unique_writer.rs
//@compile-flags: -Zmiri-tree-borrows -Zmiri-permissive-provenance /// Checks if we correctly determine the correct exposed reference a write /// access could happen through, /// if there are also exposed reference through which only a read could happen. pub fn main() { let mut x: u32 = 42; let ref1 = &mut 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/tree_borrows/wildcard/single_exposed_disable.rs
src/tools/miri/tests/fail/tree_borrows/wildcard/single_exposed_disable.rs
//@compile-flags: -Zmiri-tree-borrows -Zmiri-permissive-provenance /// Checks that with only one exposed reference, that if this reference gets /// disabled no wildcard accesses are possible. pub fn main() { let mut x: u32 = 42; let ptr_base = &mut x as *mut u32; let ref1 = unsafe { &mut *ptr_base }; ...
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/tree_borrows/wildcard/protector_release.rs
src/tools/miri/tests/fail/tree_borrows/wildcard/protector_release.rs
//@compile-flags: -Zmiri-tree-borrows -Zmiri-permissive-provenance use std::cell::UnsafeCell; /// This is a variant of the test in `../protector-write-lazy.rs`, but with /// wildcard references. /// Checks that a protector release access correctly determines that certain tags /// cannot be children of the protected ta...
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/tree_borrows/wildcard/protected_wildcard.rs
src/tools/miri/tests/fail/tree_borrows/wildcard/protected_wildcard.rs
//@compile-flags: -Zmiri-tree-borrows -Zmiri-permissive-provenance /// Checks if we pass a reference derived from a wildcard pointer /// that it gets correctly protected. pub fn main() { let mut x: u32 = 32; let ref1 = &mut x; let ref2 = &mut *ref1; let int2 = ref2 as *mut u32 as usize; let wild ...
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/tree_borrows/wildcard/single_exposed_only_ro.rs
src/tools/miri/tests/fail/tree_borrows/wildcard/single_exposed_only_ro.rs
//@compile-flags: -Zmiri-tree-borrows -Zmiri-permissive-provenance /// If we have only exposed read-only pointers, doing a write through a /// wildcard ptr should fail. fn main() { let mut x = 0; let _fool = &mut x as *mut i32; // this would have fooled the old untagged pointer logic let addr = (&x as *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/fail/tree_borrows/wildcard/multi_exposed_siblings_unique_writer.rs
src/tools/miri/tests/fail/tree_borrows/wildcard/multi_exposed_siblings_unique_writer.rs
//@compile-flags: -Zmiri-tree-borrows -Zmiri-permissive-provenance /// Checks if we correctly determine the correct exposed reference a write /// access could happen through, if there are also exposed reference /// through which only a read access could happen. pub fn main() { let mut x: u32 = 42; let ptr_bas...
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/tree_borrows/wildcard/single_exposed_foreign.rs
src/tools/miri/tests/fail/tree_borrows/wildcard/single_exposed_foreign.rs
//@compile-flags: -Zmiri-tree-borrows -Zmiri-permissive-provenance /// Checks that with only one exposed reference, wildcard accesses /// correctly cause foreign accesses. pub fn main() { let mut x: u32 = 42; let ptr_base = &mut x as *mut u32; let ref1 = unsafe { &mut *ptr_base }; let ref2 = 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/tree_borrows/wildcard/cross_tree_from_main.rs
src/tools/miri/tests/fail/tree_borrows/wildcard/cross_tree_from_main.rs
//@compile-flags: -Zmiri-tree-borrows -Zmiri-permissive-provenance /// Checks how accesses from one subtree affect other subtrees. /// This test checks the case where the access is to the main tree. pub fn main() { let mut x: u32 = 42; let ptr_base = &mut x as *mut u32; let ref1 = unsafe { &mut *ptr_base ...
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/tree_borrows/wildcard/cross_tree_update_older.rs
src/tools/miri/tests/fail/tree_borrows/wildcard/cross_tree_update_older.rs
//@compile-flags: -Zmiri-tree-borrows -Zmiri-permissive-provenance /// Checks how accesses from one subtree affect other subtrees. /// This test checks that an access from a newer created subtree /// performs a wildcard access on all earlier trees. pub fn main() { let mut x: u32 = 42; let ref_base = &mut 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/tree_borrows/wildcard/subtree_internal_relatedness.rs
src/tools/miri/tests/fail/tree_borrows/wildcard/subtree_internal_relatedness.rs
//@compile-flags: -Zmiri-tree-borrows -Zmiri-permissive-provenance // Checks if we correctly infer the relatedness of nodes that are // part of the same wildcard root. pub fn main() { let mut x: u32 = 42; let ref_base = &mut x; let int1 = ref_base as *mut u32 as usize; let wild = int1 as *mut u32; ...
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/tree_borrows/wildcard/cross_tree_update_older_invalid_exposed2.rs
src/tools/miri/tests/fail/tree_borrows/wildcard/cross_tree_update_older_invalid_exposed2.rs
//@compile-flags: -Zmiri-tree-borrows -Zmiri-permissive-provenance /// Checks how accesses from one subtree affect other subtrees. /// This test checks that an access from a newer created subtree /// performs a wildcard access on all earlier trees, and that /// either accesses are treated as foreign for tags that are ...
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/tree_borrows/wildcard/multi_exposed_child.rs
src/tools/miri/tests/fail/tree_borrows/wildcard/multi_exposed_child.rs
//@compile-flags: -Zmiri-tree-borrows -Zmiri-permissive-provenance /// Checks that disabling an exposed reference correctly narrows the /// possible locations a wildcard access could happen from. /// Also checks that an access is treated as foreign, if all exposed /// (non-disabled) references are ancestors. pub fn ma...
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/tree_borrows/wildcard/strongly_protected_wildcard.rs
src/tools/miri/tests/fail/tree_borrows/wildcard/strongly_protected_wildcard.rs
//@compile-flags: -Zmiri-tree-borrows -Zmiri-permissive-provenance //@error-in-other-file: /deallocation through .* is forbidden/ fn inner(x: &mut i32, f: fn(usize)) { // `f` may mutate, but it may not deallocate! // `f` takes a raw pointer so that the only protector // is that on `x` f(x as *mut i32 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/fail/tree_borrows/wildcard/multi_exposed_siblings_foreign.rs
src/tools/miri/tests/fail/tree_borrows/wildcard/multi_exposed_siblings_foreign.rs
//@compile-flags: -Zmiri-tree-borrows -Zmiri-permissive-provenance /// Checks that if for a node all exposed references are foreign, /// that a wildcard access gets treated as foreign to it. pub fn main() { let mut x: u32 = 42; let ptr_base = &mut x as *mut u32; let ref1 = unsafe { &mut *ptr_base }; l...
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/tree_borrows/wildcard/cross_tree_update_main_invalid_exposed2.rs
src/tools/miri/tests/fail/tree_borrows/wildcard/cross_tree_update_main_invalid_exposed2.rs
//@compile-flags: -Zmiri-tree-borrows -Zmiri-permissive-provenance use std::cell::Cell; /// Checks how accesses from one subtree affect other subtrees. /// This test checks that an access from a subtree performs a /// wildcard access on all earlier trees, and that local /// accesses are treated as access errors for ta...
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/tree_borrows/wildcard/protector_release2.rs
src/tools/miri/tests/fail/tree_borrows/wildcard/protector_release2.rs
//@compile-flags: -Zmiri-tree-borrows -Zmiri-permissive-provenance use std::cell::UnsafeCell; /// This is a variant of the test in `../protector-write-lazy.rs`, but with /// wildcard references. /// Checks that a protector release access correctly determines that certain tags /// cannot be children of the protected ta...
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/tree_borrows/wildcard/subtree_internal_relatedness_wildcard.rs
src/tools/miri/tests/fail/tree_borrows/wildcard/subtree_internal_relatedness_wildcard.rs
//@compile-flags: -Zmiri-tree-borrows -Zmiri-permissive-provenance // Checks if we correctly infer the relatedness of nodes that are // part of the same wildcard root during a wildcard access. pub fn main() { let mut x: u32 = 42; let ref_base = &mut x; let int = ref_base as *mut u32 as usize; let wil...
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/tree_borrows/reserved/int-protected-write.rs
src/tools/miri/tests/fail/tree_borrows/reserved/int-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 #[path = "../../../utils/mod.rs"] #[macro_use] mod utils; // Check how a Reserved without interior mutability responds to a Foreign // Write when under a protector fn main() { u...
rust
Apache-2.0
f8b1d59a81c700cb7aa25cf69e3032b3ce333150
2026-01-04T15:31:58.503980Z
false