| /third_party/rust/rust/src/tools/miri/tests/fail/validity/ |
| D | dangling_ref3.stderr | 1 error: Undefined Behavior: constructing invalid value: encountered a dangling reference (use-after-… 2 --> $DIR/dangling_ref3.rs:LL:CC 4 LL | let _x: &i32 = unsafe { mem::transmute(dangling()) }; 5 …^^^^^^^^^^^^^^^^^^^^^ constructing invalid value: encountered a dangling reference (use-after-free) 8 …= help: see https://doc.rust-lang.org/nightly/reference/behavior-considered-undefined.html for fur… 12 note: some details are omitted, run with `MIRIFLAGS=-Zmiri-backtrace=full` for a verbose backtrace
|
| D | dangling_ref2.stderr | 1 error: Undefined Behavior: constructing invalid value: encountered a dangling reference (going beyo… 2 --> $DIR/dangling_ref2.rs:LL:CC 5 … ^^^^^^^^^^^^^^^^^^^ constructing invalid value: encountered a dangling reference (going beyon… 8 …= help: see https://doc.rust-lang.org/nightly/reference/behavior-considered-undefined.html for fur… 12 note: some details are omitted, run with `MIRIFLAGS=-Zmiri-backtrace=full` for a verbose backtrace
|
| D | dangling_ref1.stderr | 1 error: Undefined Behavior: constructing invalid value: encountered a dangling reference (0x10[noall… 2 --> $DIR/dangling_ref1.rs:LL:CC 5 … ^^^^^^^^^^^^^^^^^^^^^^^ constructing invalid value: encountered a dangling reference (0x10[noallo… 8 …= help: see https://doc.rust-lang.org/nightly/reference/behavior-considered-undefined.html for fur… 12 note: some details are omitted, run with `MIRIFLAGS=-Zmiri-backtrace=full` for a verbose backtrace
|
| D | dangling_ref3.rs | 2 //@compile-flags: -Zmiri-disable-stacked-borrows 5 fn dangling() -> *const u8 { in dangling() function 11 …let _x: &i32 = unsafe { mem::transmute(dangling()) }; //~ ERROR: dangling reference (use-after-fre… in main()
|
| /third_party/rust/rust/compiler/rustc_const_eval/ |
| D | messages.ftl | 5 `align_offset` called with non-power-of-two align: {$target_align} 29 cannot call non-const closure in {const_eval_const_context}s 34 const_eval_const_context = {$kind -> 44 const_eval_dangling_box_no_provenance = {$front_matter}: encountered a dangling box ({$pointer} has… 45 const_eval_dangling_box_out_of_bounds = {$front_matter}: encountered a dangling box (going beyond t… 46 const_eval_dangling_box_use_after_free = {$front_matter}: encountered a dangling box (use-after-fre… 48 {$bad_pointer_message}: {$pointer} is a dangling pointer (it has no provenance) 50 {$bad_pointer_message}: null pointer is a dangling pointer (it has no provenance) 51 const_eval_dangling_ptr_in_final = encountered dangling pointer in final constant 53 const_eval_dangling_ref_no_provenance = {$front_matter}: encountered a dangling reference ({$pointe… [all …]
|
| /third_party/rust/rust/library/std/src/sys/sgx/waitqueue/ |
| D | unsafe_list.rs | 1 //! A doubly-linked list where callers are in charge of memory allocation 17 fn dummy() -> Self { in dummy() 18 UnsafeListEntry { next: NonNull::dangling(), prev: NonNull::dangling(), value: None } in dummy() 21 pub fn new(value: T) -> Self { in new() 26 // WARNING: self-referential struct! 33 pub const fn new() -> Self { in new() 41 // SAFETY: `head_tail_entry` must be non-null, which it is because we assign it above. in init() 44 // SAFETY: `self.head_tail` must meet all requirements for a mutable reference. in init() 50 pub fn is_empty(&self) -> bool { in is_empty() 54 // ,-------> /---------\ next ---, in is_empty() [all …]
|
| /third_party/rust/rust/src/tools/miri/tests/fail/ |
| D | branchless-select-i128-pointer.stderr | 1 error: Undefined Behavior: constructing invalid value: encountered a dangling reference ($HEX[noall… 2 --> $DIR/branchless-select-i128-pointer.rs:LL:CC 9 …| |_____________^ constructing invalid value: encountered a dangling reference ($HEX[noalloc] has … 12 …= help: see https://doc.rust-lang.org/nightly/reference/behavior-considered-undefined.html for fur… 14 = note: inside `main` at $DIR/branchless-select-i128-pointer.rs:LL:CC 16 note: some details are omitted, run with `MIRIFLAGS=-Zmiri-backtrace=full` for a verbose backtrace
|
| D | reading_half_a_pointer.stderr | 1 error: Undefined Behavior: dereferencing pointer failed: $HEX[noalloc] is a dangling pointer (it ha… 2 --> $DIR/reading_half_a_pointer.rs:LL:CC 5 …| ^^ dereferencing pointer failed: $HEX[noalloc] is a dangling pointer (it has … 8 …= help: see https://doc.rust-lang.org/nightly/reference/behavior-considered-undefined.html for fur… 12 note: some details are omitted, run with `MIRIFLAGS=-Zmiri-backtrace=full` for a verbose backtrace
|
| /third_party/rust/rust/tests/ui/consts/std/ |
| D | cell.rs | 5 // not ok, because this creates a dangling pointer, just like `let x = Cell::new(42).as_ptr()` would 7 //~^ ERROR encountered dangling pointer 9 //~^ ERROR encountered dangling pointer 20 // its memory will get freed before the constant is finished evaluating, thus creating a dangling 23 //~^ ERROR encountered dangling pointer 25 // not ok, because the `as_ptr` call takes a reference to a temporary that will get freed 28 //~^ ERROR encountered dangling pointer 44 const fn fst_ref<T, U>(x: &(T, U)) -> &T { &x.0 } in fst_ref()
|
| /third_party/rust/rust/tests/ui/consts/const-mut-refs/ |
| D | mut_ref_in_final_dynamic_check.rs | 6 // We treat all functions as not returning a mutable reference, because there is no way to 10 const fn helper() -> Option<&'static mut i32> { unsafe { in helper() 14 //~| 0x2a[noalloc] is a dangling pointer in helper() 20 const fn helper2() -> Option<&'static mut i32> { unsafe { in helper2() 21 // Undefined behaviour (dangling pointer), who doesn't love tests like this. in helper2() 25 const B: Option<&mut i32> = helper2(); //~ ERROR encountered dangling pointer in final constant
|
| /third_party/rust/rust/compiler/rustc_const_eval/src/interpret/ |
| D | intern.rs | 9 //! as many allocations as possible immutable so LLVM can put them into read-only memory. At the 11 //! incorrect compilations. To achieve this, we do a type-based traversal of the final value, 13 //! (In principle, we could skip this type-based part for `const` and promoteds, as they need to be 49 /// A list of all encountered allocations. After type-based interning, we traverse this list to 54 /// read-only so LLVM can place them in const memory. 87 ) -> Option<IsStaticOrFn> { in intern_shallow() 93 // map, or dangling. in intern_shallow() 94 // If the pointer is dangling (neither in local nor global memory), we leave it in intern_shallow() 95 // to validation to error -- it has the much better error messages, pointing out where in intern_shallow() 96 // in the value the dangling reference lies. in intern_shallow() [all …]
|
| /third_party/rust/rust/src/tools/miri/tests/fail/function_pointers/ |
| D | cast_int_to_fn_ptr.stderr | 1 error: Undefined Behavior: out-of-bounds pointer use: 0x2a[noalloc] is a dangling pointer (it has n… 2 --> $DIR/cast_int_to_fn_ptr.rs:LL:CC 5 | ^^^^^ out-of-bounds pointer use: 0x2a[noalloc] is a dangling pointer (it has no provenance) 8 …= help: see https://doc.rust-lang.org/nightly/reference/behavior-considered-undefined.html for fur… 12 note: some details are omitted, run with `MIRIFLAGS=-Zmiri-backtrace=full` for a verbose backtrace
|
| /third_party/rust/rust/src/tools/miri/tests/fail/dangling_pointers/ |
| D | wild_pointer_deref.stderr | 1 error: Undefined Behavior: dereferencing pointer failed: 0x2c[noalloc] is a dangling pointer (it ha… 2 --> $DIR/wild_pointer_deref.rs:LL:CC 5 …| ^^ dereferencing pointer failed: 0x2c[noalloc] is a dangling pointer (it ha… 8 …= help: see https://doc.rust-lang.org/nightly/reference/behavior-considered-undefined.html for fur… 12 note: some details are omitted, run with `MIRIFLAGS=-Zmiri-backtrace=full` for a verbose backtrace
|
| D | deref-invalid-ptr.stderr | 1 error: Undefined Behavior: dereferencing pointer failed: 0x10[noalloc] is a dangling pointer (it ha… 2 --> $DIR/deref-invalid-ptr.rs:LL:CC 5 …| ^^^ dereferencing pointer failed: 0x10[noalloc] is a dangling pointer (it … 8 …= help: see https://doc.rust-lang.org/nightly/reference/behavior-considered-undefined.html for fur… 10 = note: inside `main` at $DIR/deref-invalid-ptr.rs:LL:CC 12 note: some details are omitted, run with `MIRIFLAGS=-Zmiri-backtrace=full` for a verbose backtrace
|
| D | null_pointer_deref.stderr | 1 error: Undefined Behavior: dereferencing pointer failed: null pointer is a dangling pointer (it has… 2 --> $DIR/null_pointer_deref.rs:LL:CC 5 … ^^^^^^^^^^^^^^^^^ dereferencing pointer failed: null pointer is a dangling pointer (it has n… 8 …= help: see https://doc.rust-lang.org/nightly/reference/behavior-considered-undefined.html for fur… 12 note: some details are omitted, run with `MIRIFLAGS=-Zmiri-backtrace=full` for a verbose backtrace
|
| D | null_pointer_deref_zst.stderr | 1 error: Undefined Behavior: dereferencing pointer failed: null pointer is a dangling pointer (it has… 2 --> $DIR/null_pointer_deref_zst.rs:LL:CC 5 … ^^^^^^^^^^^^^^^^^ dereferencing pointer failed: null pointer is a dangling pointer (it has n… 8 …= help: see https://doc.rust-lang.org/nightly/reference/behavior-considered-undefined.html for fur… 12 note: some details are omitted, run with `MIRIFLAGS=-Zmiri-backtrace=full` for a verbose backtrace
|
| D | deref-partially-dangling.stderr | 1 …cing pointer failed: ALLOC has size 8, so pointer to 12 bytes starting at offset 0 is out-of-bounds 2 --> $DIR/deref-partially-dangling.rs:LL:CC 5 …cing pointer failed: ALLOC has size 8, so pointer to 12 bytes starting at offset 0 is out-of-bounds 8 …= help: see https://doc.rust-lang.org/nightly/reference/behavior-considered-undefined.html for fur… 10 = note: inside `main` at $DIR/deref-partially-dangling.rs:LL:CC 12 note: some details are omitted, run with `MIRIFLAGS=-Zmiri-backtrace=full` for a verbose backtrace
|
| D | null_pointer_write.stderr | 1 error: Undefined Behavior: dereferencing pointer failed: null pointer is a dangling pointer (it has… 2 --> $DIR/null_pointer_write.rs:LL:CC 5 …^^^^^^^^^^^^^^^^^^^^^^^ dereferencing pointer failed: null pointer is a dangling pointer (it has n… 8 …= help: see https://doc.rust-lang.org/nightly/reference/behavior-considered-undefined.html for fur… 12 note: some details are omitted, run with `MIRIFLAGS=-Zmiri-backtrace=full` for a verbose backtrace
|
| /third_party/rust/rust/src/tools/miri/tests/fail/provenance/ |
| D | ptr_int_unexposed.stderr | 1 error: Undefined Behavior: dereferencing pointer failed: $HEX[noalloc] is a dangling pointer (it ha… 2 --> $DIR/ptr_int_unexposed.rs:LL:CC 5 …| ^^^^ dereferencing pointer failed: $HEX[noalloc] is a dangling pointer (… 8 …= help: see https://doc.rust-lang.org/nightly/reference/behavior-considered-undefined.html for fur… 12 note: some details are omitted, run with `MIRIFLAGS=-Zmiri-backtrace=full` for a verbose backtrace
|
| D | pointer_partial_overwrite.stderr | 1 error: Undefined Behavior: dereferencing pointer failed: $HEX[noalloc] is a dangling pointer (it ha… 2 --> $DIR/pointer_partial_overwrite.rs:LL:CC 5 …| ^^ dereferencing pointer failed: $HEX[noalloc] is a dangling pointer (it has no prov… 8 …= help: see https://doc.rust-lang.org/nightly/reference/behavior-considered-undefined.html for fur… 12 note: some details are omitted, run with `MIRIFLAGS=-Zmiri-backtrace=full` for a verbose backtrace
|
| D | ptr_invalid.stderr | 1 error: Undefined Behavior: dereferencing pointer failed: $HEX[noalloc] is a dangling pointer (it ha… 2 --> $DIR/ptr_invalid.rs:LL:CC 5 … ^^^^^^^^^^^^^ dereferencing pointer failed: $HEX[noalloc] is a dangling pointer (it has n… 8 …= help: see https://doc.rust-lang.org/nightly/reference/behavior-considered-undefined.html for fur… 12 note: some details are omitted, run with `MIRIFLAGS=-Zmiri-backtrace=full` for a verbose backtrace
|
| D | ptr_invalid_offset.stderr | 1 error: Undefined Behavior: out-of-bounds pointer arithmetic: $HEX[noalloc] is a dangling pointer (i… 2 --> $DIR/ptr_invalid_offset.rs:LL:CC 5 …| ^^^^^^^^^^^^^^^^^^^ out-of-bounds pointer arithmetic: $HEX[noalloc] is a da… 8 …= help: see https://doc.rust-lang.org/nightly/reference/behavior-considered-undefined.html for fur… 12 note: some details are omitted, run with `MIRIFLAGS=-Zmiri-backtrace=full` for a verbose backtrace
|
| /third_party/rust/rust/src/tools/miri/tests/fail/intrinsics/ |
| D | ptr_offset_0_plus_0.stderr | 1 error: Undefined Behavior: out-of-bounds pointer arithmetic: null pointer is a dangling pointer (it… 2 --> $DIR/ptr_offset_0_plus_0.rs:LL:CC 5 …| ^^^^^^^^^^^ out-of-bounds pointer arithmetic: null pointer is a dangling p… 8 …= help: see https://doc.rust-lang.org/nightly/reference/behavior-considered-undefined.html for fur… 12 note: some details are omitted, run with `MIRIFLAGS=-Zmiri-backtrace=full` for a verbose backtrace
|
| D | ptr_offset_int_plus_int.stderr | 1 error: Undefined Behavior: out-of-bounds pointer arithmetic: 0x1[noalloc] is a dangling pointer (it… 2 --> $DIR/ptr_offset_int_plus_int.rs:LL:CC 5 … ^^^^^^^^^^^^^^^^^^^^^^^^ out-of-bounds pointer arithmetic: 0x1[noalloc] is a d… 8 …= help: see https://doc.rust-lang.org/nightly/reference/behavior-considered-undefined.html for fur… 12 note: some details are omitted, run with `MIRIFLAGS=-Zmiri-backtrace=full` for a verbose backtrace
|
| /third_party/rust/rust/src/tools/miri/tests/fail/shims/backtrace/ |
| D | bad-backtrace-ptr.stderr | 1 error: Undefined Behavior: out-of-bounds pointer use: null pointer is a dangling pointer (it has no… 2 --> $DIR/bad-backtrace-ptr.rs:LL:CC 5 … ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ out-of-bounds pointer use: null pointer is a dangl… 8 …= help: see https://doc.rust-lang.org/nightly/reference/behavior-considered-undefined.html for fur… 10 = note: inside `main` at $DIR/bad-backtrace-ptr.rs:LL:CC 12 note: some details are omitted, run with `MIRIFLAGS=-Zmiri-backtrace=full` for a verbose backtrace
|