Skip to content

Commit

Permalink
Hide the full path to the sysroot
Browse files Browse the repository at this point in the history
  • Loading branch information
oli-obk committed Mar 17, 2022
1 parent 5bd594c commit b70464d
Show file tree
Hide file tree
Showing 47 changed files with 179 additions and 322 deletions.
2 changes: 1 addition & 1 deletion cargo-miri/bin.rs
Original file line number Diff line number Diff line change
Expand Up @@ -461,7 +461,7 @@ path = "lib.rs"
command.env_remove("RUSTFLAGS");
// Disable debug assertions in the standard library -- Miri is already slow enough.
// But keep the overflow checks, they are cheap.
command.env("RUSTFLAGS", "-Cdebug-assertions=off -Coverflow-checks=on");
command.env("RUSTFLAGS", "-Cdebug-assertions=off -Coverflow-checks=on -Zremap-cwd-prefix=rustc_src");
// Finally run it!
if command.status().expect("failed to run xargo").success().not() {
show_error(format!("failed to run xargo"));
Expand Down
6 changes: 1 addition & 5 deletions tests/compile-fail/alloc/deallocate-bad-alignment.stderr
Original file line number Diff line number Diff line change
@@ -1,13 +1,9 @@
error: Undefined Behavior: incorrect layout on deallocation: alloc962 has size 1 and alignment 1, but gave size 1 and alignment 2
--> /home/ubuntu/.rustup/toolchains/miri/lib/rustlib/src/rust/library/alloc/src/alloc.rs:105:14
|
LL | unsafe { __rust_dealloc(ptr, layout.size(), layout.align()) }
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ incorrect layout on deallocation: alloc962 has size 1 and alignment 1, but gave size 1 and alignment 2
|
= help: this indicates a bug in the program: it performed an invalid operation, and caused Undefined Behavior
= help: see https://doc.rust-lang.org/nightly/reference/behavior-considered-undefined.html for further information

= note: inside `std::alloc::dealloc` at /home/ubuntu/.rustup/toolchains/miri/lib/rustlib/src/rust/library/alloc/src/alloc.rs:105:14
= note: inside `std::alloc::dealloc` at rustc_src/src/alloc.rs:105:14
note: inside `main` at $DIR/deallocate-bad-alignment.rs:8:9
--> $DIR/deallocate-bad-alignment.rs:8:9
|
Expand Down
6 changes: 1 addition & 5 deletions tests/compile-fail/alloc/deallocate-bad-size.stderr
Original file line number Diff line number Diff line change
@@ -1,13 +1,9 @@
error: Undefined Behavior: incorrect layout on deallocation: alloc962 has size 1 and alignment 1, but gave size 2 and alignment 1
--> /home/ubuntu/.rustup/toolchains/miri/lib/rustlib/src/rust/library/alloc/src/alloc.rs:105:14
|
LL | unsafe { __rust_dealloc(ptr, layout.size(), layout.align()) }
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ incorrect layout on deallocation: alloc962 has size 1 and alignment 1, but gave size 2 and alignment 1
|
= help: this indicates a bug in the program: it performed an invalid operation, and caused Undefined Behavior
= help: see https://doc.rust-lang.org/nightly/reference/behavior-considered-undefined.html for further information

= note: inside `std::alloc::dealloc` at /home/ubuntu/.rustup/toolchains/miri/lib/rustlib/src/rust/library/alloc/src/alloc.rs:105:14
= note: inside `std::alloc::dealloc` at rustc_src/src/alloc.rs:105:14
note: inside `main` at $DIR/deallocate-bad-size.rs:8:9
--> $DIR/deallocate-bad-size.rs:8:9
|
Expand Down
6 changes: 1 addition & 5 deletions tests/compile-fail/alloc/deallocate-twice.stderr
Original file line number Diff line number Diff line change
@@ -1,13 +1,9 @@
error: Undefined Behavior: pointer to alloc962 was dereferenced after this allocation got freed
--> /home/ubuntu/.rustup/toolchains/miri/lib/rustlib/src/rust/library/alloc/src/alloc.rs:105:14
|
LL | unsafe { __rust_dealloc(ptr, layout.size(), layout.align()) }
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ pointer to alloc962 was dereferenced after this allocation got freed
|
= help: this indicates a bug in the program: it performed an invalid operation, and caused Undefined Behavior
= help: see https://doc.rust-lang.org/nightly/reference/behavior-considered-undefined.html for further information

= note: inside `std::alloc::dealloc` at /home/ubuntu/.rustup/toolchains/miri/lib/rustlib/src/rust/library/alloc/src/alloc.rs:105:14
= note: inside `std::alloc::dealloc` at rustc_src/src/alloc.rs:105:14
note: inside `main` at $DIR/deallocate-twice.rs:9:9
--> $DIR/deallocate-twice.rs:9:9
|
Expand Down
8 changes: 2 additions & 6 deletions tests/compile-fail/alloc/global_system_mixup.stderr
Original file line number Diff line number Diff line change
@@ -1,14 +1,10 @@
error: Undefined Behavior: deallocating alloc975, which is Rust heap memory, using C heap deallocation operation
--> /home/ubuntu/.rustup/toolchains/miri/lib/rustlib/src/rust/library/std/src/sys/unix/alloc.rs:42:9
|
LL | libc::free(ptr as *mut libc::c_void)
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ deallocating alloc975, which is Rust heap memory, using C heap deallocation operation
|
= help: this indicates a bug in the program: it performed an invalid operation, and caused Undefined Behavior
= help: see https://doc.rust-lang.org/nightly/reference/behavior-considered-undefined.html for further information

= note: inside `std::sys::unix::alloc::<impl std::alloc::GlobalAlloc for std::alloc::System>::dealloc` at /home/ubuntu/.rustup/toolchains/miri/lib/rustlib/src/rust/library/std/src/sys/unix/alloc.rs:42:9
= note: inside `<std::alloc::System as std::alloc::Allocator>::deallocate` at /home/ubuntu/.rustup/toolchains/miri/lib/rustlib/src/rust/library/std/src/alloc.rs:218:22
= note: inside `std::sys::unix::alloc::<impl std::alloc::GlobalAlloc for std::alloc::System>::dealloc` at rustc_src/src/sys/unix/alloc.rs:42:9
= note: inside `<std::alloc::System as std::alloc::Allocator>::deallocate` at rustc_src/src/alloc.rs:218:22
note: inside `main` at $DIR/global_system_mixup.rs:12:14
--> $DIR/global_system_mixup.rs:12:14
|
Expand Down
6 changes: 1 addition & 5 deletions tests/compile-fail/alloc/reallocate-bad-size.stderr
Original file line number Diff line number Diff line change
@@ -1,13 +1,9 @@
error: Undefined Behavior: incorrect layout on deallocation: alloc962 has size 1 and alignment 1, but gave size 2 and alignment 1
--> /home/ubuntu/.rustup/toolchains/miri/lib/rustlib/src/rust/library/alloc/src/alloc.rs:124:14
|
LL | unsafe { __rust_realloc(ptr, layout.size(), layout.align(), new_size) }
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ incorrect layout on deallocation: alloc962 has size 1 and alignment 1, but gave size 2 and alignment 1
|
= help: this indicates a bug in the program: it performed an invalid operation, and caused Undefined Behavior
= help: see https://doc.rust-lang.org/nightly/reference/behavior-considered-undefined.html for further information

= note: inside `std::alloc::realloc` at /home/ubuntu/.rustup/toolchains/miri/lib/rustlib/src/rust/library/alloc/src/alloc.rs:124:14
= note: inside `std::alloc::realloc` at rustc_src/src/alloc.rs:124:14
note: inside `main` at $DIR/reallocate-bad-size.rs:8:18
--> $DIR/reallocate-bad-size.rs:8:18
|
Expand Down
6 changes: 1 addition & 5 deletions tests/compile-fail/alloc/reallocate-dangling.stderr
Original file line number Diff line number Diff line change
@@ -1,13 +1,9 @@
error: Undefined Behavior: pointer to alloc962 was dereferenced after this allocation got freed
--> /home/ubuntu/.rustup/toolchains/miri/lib/rustlib/src/rust/library/alloc/src/alloc.rs:124:14
|
LL | unsafe { __rust_realloc(ptr, layout.size(), layout.align(), new_size) }
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ pointer to alloc962 was dereferenced after this allocation got freed
|
= help: this indicates a bug in the program: it performed an invalid operation, and caused Undefined Behavior
= help: see https://doc.rust-lang.org/nightly/reference/behavior-considered-undefined.html for further information

= note: inside `std::alloc::realloc` at /home/ubuntu/.rustup/toolchains/miri/lib/rustlib/src/rust/library/alloc/src/alloc.rs:124:14
= note: inside `std::alloc::realloc` at rustc_src/src/alloc.rs:124:14
note: inside `main` at $DIR/reallocate-dangling.rs:9:18
--> $DIR/reallocate-dangling.rs:9:18
|
Expand Down
14 changes: 5 additions & 9 deletions tests/compile-fail/alloc/stack_free.stderr
Original file line number Diff line number Diff line change
@@ -1,17 +1,13 @@
error: Undefined Behavior: deallocating alloc508, which is stack variable memory, using Rust heap deallocation operation
--> /home/ubuntu/.rustup/toolchains/miri/lib/rustlib/src/rust/library/alloc/src/alloc.rs:105:14
|
LL | unsafe { __rust_dealloc(ptr, layout.size(), layout.align()) }
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ deallocating alloc508, which is stack variable memory, using Rust heap deallocation operation
|
= help: this indicates a bug in the program: it performed an invalid operation, and caused Undefined Behavior
= help: see https://doc.rust-lang.org/nightly/reference/behavior-considered-undefined.html for further information

= note: inside `std::alloc::dealloc` at /home/ubuntu/.rustup/toolchains/miri/lib/rustlib/src/rust/library/alloc/src/alloc.rs:105:14
= note: inside `<std::alloc::Global as std::alloc::Allocator>::deallocate` at /home/ubuntu/.rustup/toolchains/miri/lib/rustlib/src/rust/library/alloc/src/alloc.rs:242:22
= note: inside `alloc::alloc::box_free::<i32, std::alloc::Global>` at /home/ubuntu/.rustup/toolchains/miri/lib/rustlib/src/rust/library/alloc/src/alloc.rs:340:9
= note: inside `std::ptr::drop_in_place::<std::boxed::Box<i32>> - shim(Some(std::boxed::Box<i32>))` at /home/ubuntu/.rustup/toolchains/miri/lib/rustlib/src/rust/library/core/src/ptr/mod.rs:188:1
= note: inside `std::mem::drop::<std::boxed::Box<i32>>` at /home/ubuntu/.rustup/toolchains/miri/lib/rustlib/src/rust/library/core/src/mem/mod.rs:965:24
= note: inside `std::alloc::dealloc` at rustc_src/src/alloc.rs:105:14
= note: inside `<std::alloc::Global as std::alloc::Allocator>::deallocate` at rustc_src/src/alloc.rs:242:22
= note: inside `alloc::alloc::box_free::<i32, std::alloc::Global>` at rustc_src/src/alloc.rs:340:9
= note: inside `std::ptr::drop_in_place::<std::boxed::Box<i32>> - shim(Some(std::boxed::Box<i32>))` at rustc_src/src/ptr/mod.rs:188:1
= note: inside `std::mem::drop::<std::boxed::Box<i32>>` at rustc_src/src/mem/mod.rs:965:24
note: inside `main` at $DIR/stack_free.rs:9:5
--> $DIR/stack_free.rs:9:5
|
Expand Down
2 changes: 1 addition & 1 deletion tests/compile-fail/concurrency/too_few_args.stderr
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ LL | panic!()
= help: this indicates a bug in the program: it performed an invalid operation, and caused Undefined Behavior
= help: see https://doc.rust-lang.org/nightly/reference/behavior-considered-undefined.html for further information

= note: inside `thread_start` at /home/ubuntu/.rustup/toolchains/miri/lib/rustlib/src/rust/library/std/src/panic.rs:19:9
= note: inside `thread_start` at rustc_src/src/panic.rs:19:9
= note: this error originates in the macro `$crate::panic::panic_2015` (in Nightly builds, run with -Z macro-backtrace for more info)

error: aborting due to previous error; 1 warning emitted
Expand Down
2 changes: 1 addition & 1 deletion tests/compile-fail/concurrency/too_many_args.stderr
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ LL | panic!()
= help: this indicates a bug in the program: it performed an invalid operation, and caused Undefined Behavior
= help: see https://doc.rust-lang.org/nightly/reference/behavior-considered-undefined.html for further information

= note: inside `thread_start` at /home/ubuntu/.rustup/toolchains/miri/lib/rustlib/src/rust/library/std/src/panic.rs:19:9
= note: inside `thread_start` at rustc_src/src/panic.rs:19:9
= note: this error originates in the macro `$crate::panic::panic_2015` (in Nightly builds, run with -Z macro-backtrace for more info)

error: aborting due to previous error; 1 warning emitted
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ LL | let x = unsafe { ptr::addr_of!(*p) }; //~ ERROR dereferenced after this
= help: this indicates a bug in the program: it performed an invalid operation, and caused Undefined Behavior
= help: see https://doc.rust-lang.org/nightly/reference/behavior-considered-undefined.html for further information

= note: inside `main` at /home/ubuntu/.rustup/toolchains/miri/lib/rustlib/src/rust/library/core/src/ptr/mod.rs:1482:5
= note: inside `main` at rustc_src/src/ptr/mod.rs:1482:5
= note: this error originates in the macro `ptr::addr_of` (in Nightly builds, run with -Z macro-backtrace for more info)

note: some details are omitted, run with `MIRIFLAGS=-Zmiri-backtrace=full` for a verbose backtrace
Expand Down
18 changes: 7 additions & 11 deletions tests/compile-fail/fs/isolated_file.stderr
Original file line number Diff line number Diff line change
@@ -1,19 +1,15 @@
error: unsupported operation: `open` not available when isolation is enabled
--> /home/ubuntu/.rustup/toolchains/miri/lib/rustlib/src/rust/library/std/src/sys/unix/fs.rs:843:36
|
LL | let fd = cvt_r(|| unsafe { open64(path.as_ptr(), flags, opts.mode as c_int) })?;
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ `open` not available when isolation is enabled
|
= help: pass the flag `-Zmiri-disable-isolation` to disable isolation;
= help: or pass `-Zmiri-isolation-error=warn` to configure Miri to return an error code from isolated operations (if supported for that operation) and continue with a warning

= note: inside closure at /home/ubuntu/.rustup/toolchains/miri/lib/rustlib/src/rust/library/std/src/sys/unix/fs.rs:843:36
= note: inside `std::sys::unix::cvt_r::<i32, [closure@std::sys::unix::fs::File::open_c::{closure#0}]>` at /home/ubuntu/.rustup/toolchains/miri/lib/rustlib/src/rust/library/std/src/sys/unix/mod.rs:212:19
= note: inside `std::sys::unix::fs::File::open_c` at /home/ubuntu/.rustup/toolchains/miri/lib/rustlib/src/rust/library/std/src/sys/unix/fs.rs:843:18
= note: inside `std::sys::unix::fs::File::open` at /home/ubuntu/.rustup/toolchains/miri/lib/rustlib/src/rust/library/std/src/sys/unix/fs.rs:831:9
= note: inside `std::fs::OpenOptions::_open` at /home/ubuntu/.rustup/toolchains/miri/lib/rustlib/src/rust/library/std/src/fs.rs:952:9
= note: inside `std::fs::OpenOptions::open::<&std::path::Path>` at /home/ubuntu/.rustup/toolchains/miri/lib/rustlib/src/rust/library/std/src/fs.rs:948:9
= note: inside `std::fs::File::open::<&str>` at /home/ubuntu/.rustup/toolchains/miri/lib/rustlib/src/rust/library/std/src/fs.rs:328:9
= note: inside closure at rustc_src/src/sys/unix/fs.rs:843:36
= note: inside `std::sys::unix::cvt_r::<i32, [closure@std::sys::unix::fs::File::open_c::{closure#0}]>` at rustc_src/src/sys/unix/mod.rs:212:19
= note: inside `std::sys::unix::fs::File::open_c` at rustc_src/src/sys/unix/fs.rs:843:18
= note: inside `std::sys::unix::fs::File::open` at rustc_src/src/sys/unix/fs.rs:831:9
= note: inside `std::fs::OpenOptions::_open` at rustc_src/src/fs.rs:952:9
= note: inside `std::fs::OpenOptions::open::<&std::path::Path>` at rustc_src/src/fs.rs:948:9
= note: inside `std::fs::File::open::<&str>` at rustc_src/src/fs.rs:328:9
note: inside `main` at $DIR/isolated_file.rs:5:17
--> $DIR/isolated_file.rs:5:17
|
Expand Down
2 changes: 1 addition & 1 deletion tests/compile-fail/generator-pinned-moved.stderr
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ note: inside `<GeneratorIteratorAdapter<[static generator@$DIR/generator-pinned-
|
LL | match me.resume(()) {
| ^^^^^^^^^^^^^
= note: inside `<std::boxed::Box<GeneratorIteratorAdapter<[static generator@$DIR/generator-pinned-moved.rs:9:5: 15:6]>> as std::iter::Iterator>::next` at /home/ubuntu/.rustup/toolchains/miri/lib/rustlib/src/rust/library/alloc/src/boxed.rs:1787:9
= note: inside `<std::boxed::Box<GeneratorIteratorAdapter<[static generator@$DIR/generator-pinned-moved.rs:9:5: 15:6]>> as std::iter::Iterator>::next` at rustc_src/src/boxed.rs:1787:9
note: inside `main` at $DIR/generator-pinned-moved.rs:43:5
--> $DIR/generator-pinned-moved.rs:43:5
|
Expand Down
8 changes: 2 additions & 6 deletions tests/compile-fail/intrinsics/copy_overflow.stderr
Original file line number Diff line number Diff line change
@@ -1,14 +1,10 @@
error: Undefined Behavior: overflow computing total size of `copy`
--> /home/ubuntu/.rustup/toolchains/miri/lib/rustlib/src/rust/library/core/src/intrinsics.rs:2193:14
|
LL | unsafe { copy(src, dst, count) }
| ^^^^^^^^^^^^^^^^^^^^^ overflow computing total size of `copy`
|
= help: this indicates a bug in the program: it performed an invalid operation, and caused Undefined Behavior
= help: see https://doc.rust-lang.org/nightly/reference/behavior-considered-undefined.html for further information

= note: inside `std::intrinsics::copy::<i32>` at /home/ubuntu/.rustup/toolchains/miri/lib/rustlib/src/rust/library/core/src/intrinsics.rs:2193:14
= note: inside `std::ptr::mut_ptr::<impl *mut i32>::copy_from` at /home/ubuntu/.rustup/toolchains/miri/lib/rustlib/src/rust/library/core/src/ptr/mut_ptr.rs:1032:18
= note: inside `std::intrinsics::copy::<i32>` at rustc_src/src/intrinsics.rs:2193:14
= note: inside `std::ptr::mut_ptr::<impl *mut i32>::copy_from` at rustc_src/src/ptr/mut_ptr.rs:1032:18
note: inside `main` at $DIR/copy_overflow.rs:8:9
--> $DIR/copy_overflow.rs:8:9
|
Expand Down
6 changes: 1 addition & 5 deletions tests/compile-fail/intrinsics/out_of_bounds_ptr_1.stderr
Original file line number Diff line number Diff line change
@@ -1,13 +1,9 @@
error: Undefined Behavior: pointer arithmetic failed: alloc956 has size 4, so pointer to 5 bytes starting at offset 0 is out-of-bounds
--> /home/ubuntu/.rustup/toolchains/miri/lib/rustlib/src/rust/library/core/src/ptr/const_ptr.rs:295:18
|
LL | unsafe { intrinsics::offset(self, count) }
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ pointer arithmetic failed: alloc956 has size 4, so pointer to 5 bytes starting at offset 0 is out-of-bounds
|
= help: this indicates a bug in the program: it performed an invalid operation, and caused Undefined Behavior
= help: see https://doc.rust-lang.org/nightly/reference/behavior-considered-undefined.html for further information

= note: inside `std::ptr::const_ptr::<impl *const i8>::offset` at /home/ubuntu/.rustup/toolchains/miri/lib/rustlib/src/rust/library/core/src/ptr/const_ptr.rs:295:18
= note: inside `std::ptr::const_ptr::<impl *const i8>::offset` at rustc_src/src/ptr/const_ptr.rs:295:18
note: inside `main` at $DIR/out_of_bounds_ptr_1.rs:6:22
--> $DIR/out_of_bounds_ptr_1.rs:6:22
|
Expand Down
6 changes: 1 addition & 5 deletions tests/compile-fail/intrinsics/out_of_bounds_ptr_2.stderr
Original file line number Diff line number Diff line change
@@ -1,13 +1,9 @@
error: Undefined Behavior: overflowing in-bounds pointer arithmetic
--> /home/ubuntu/.rustup/toolchains/miri/lib/rustlib/src/rust/library/core/src/ptr/const_ptr.rs:295:18
|
LL | unsafe { intrinsics::offset(self, count) }
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ overflowing in-bounds pointer arithmetic
|
= help: this indicates a bug in the program: it performed an invalid operation, and caused Undefined Behavior
= help: see https://doc.rust-lang.org/nightly/reference/behavior-considered-undefined.html for further information

= note: inside `std::ptr::const_ptr::<impl *const i8>::offset` at /home/ubuntu/.rustup/toolchains/miri/lib/rustlib/src/rust/library/core/src/ptr/const_ptr.rs:295:18
= note: inside `std::ptr::const_ptr::<impl *const i8>::offset` at rustc_src/src/ptr/const_ptr.rs:295:18
note: inside `main` at $DIR/out_of_bounds_ptr_2.rs:5:22
--> $DIR/out_of_bounds_ptr_2.rs:5:22
|
Expand Down
6 changes: 1 addition & 5 deletions tests/compile-fail/intrinsics/out_of_bounds_ptr_3.stderr
Original file line number Diff line number Diff line change
@@ -1,13 +1,9 @@
error: Undefined Behavior: pointer arithmetic failed: alloc956 has size 4, so pointer to 1 byte starting at offset -1 is out-of-bounds
--> /home/ubuntu/.rustup/toolchains/miri/lib/rustlib/src/rust/library/core/src/ptr/const_ptr.rs:295:18
|
LL | unsafe { intrinsics::offset(self, count) }
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ pointer arithmetic failed: alloc956 has size 4, so pointer to 1 byte starting at offset -1 is out-of-bounds
|
= help: this indicates a bug in the program: it performed an invalid operation, and caused Undefined Behavior
= help: see https://doc.rust-lang.org/nightly/reference/behavior-considered-undefined.html for further information

= note: inside `std::ptr::const_ptr::<impl *const i8>::offset` at /home/ubuntu/.rustup/toolchains/miri/lib/rustlib/src/rust/library/core/src/ptr/const_ptr.rs:295:18
= note: inside `std::ptr::const_ptr::<impl *const i8>::offset` at rustc_src/src/ptr/const_ptr.rs:295:18
note: inside `main` at $DIR/out_of_bounds_ptr_3.rs:5:22
--> $DIR/out_of_bounds_ptr_3.rs:5:22
|
Expand Down
6 changes: 1 addition & 5 deletions tests/compile-fail/intrinsics/ptr_offset_0_plus_0.stderr
Original file line number Diff line number Diff line change
@@ -1,13 +1,9 @@
error: Undefined Behavior: pointer arithmetic failed: null pointer is not a valid pointer
--> /home/ubuntu/.rustup/toolchains/miri/lib/rustlib/src/rust/library/core/src/ptr/mut_ptr.rs:307:18
|
LL | unsafe { intrinsics::offset(self, count) as *mut T }
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ pointer arithmetic failed: null pointer is not a valid pointer
|
= help: this indicates a bug in the program: it performed an invalid operation, and caused Undefined Behavior
= help: see https://doc.rust-lang.org/nightly/reference/behavior-considered-undefined.html for further information

= note: inside `std::ptr::mut_ptr::<impl *mut i32>::offset` at /home/ubuntu/.rustup/toolchains/miri/lib/rustlib/src/rust/library/core/src/ptr/mut_ptr.rs:307:18
= note: inside `std::ptr::mut_ptr::<impl *mut i32>::offset` at rustc_src/src/ptr/mut_ptr.rs:307:18
note: inside `main` at $DIR/ptr_offset_0_plus_0.rs:6:23
--> $DIR/ptr_offset_0_plus_0.rs:6:23
|
Expand Down
Loading

0 comments on commit b70464d

Please sign in to comment.