You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: src/tools/miri/tests/fail-dep/shims/mmap_use_after_munmap.stderr
+1-16
Original file line number
Diff line number
Diff line change
@@ -1,18 +1,3 @@
1
-
warning: integer-to-pointer cast
2
-
--> $DIR/mmap_use_after_munmap.rs:LL:CC
3
-
|
4
-
LL | libc::munmap(ptr, 4096);
5
-
| ^^^^^^^^^^^^^^^^^^^^^^^ integer-to-pointer cast
6
-
|
7
-
= help: This program is using integer-to-pointer casts or (equivalently) `ptr::from_exposed_addr`,
8
-
= help: which means that Miri might miss pointer bugs in this program.
9
-
= help: See https://doc.rust-lang.org/nightly/std/ptr/fn.from_exposed_addr.html for more details on that operation.
10
-
= help: To ensure that Miri does not miss bugs in your program, use Strict Provenance APIs (https://doc.rust-lang.org/nightly/std/ptr/index.html#strict-provenance, https://crates.io/crates/sptr) instead.
11
-
= help: You can then pass the `-Zmiri-strict-provenance` flag to Miri, to ensure you are not relying on `from_exposed_addr` semantics.
12
-
= help: Alternatively, the `-Zmiri-permissive-provenance` flag disables this warning.
13
-
= note: BACKTRACE:
14
-
= note: inside `main` at $DIR/mmap_use_after_munmap.rs:LL:CC
15
-
16
1
error: Undefined Behavior: memory access failed: ALLOC has been freed, so this pointer is dangling
17
2
--> $DIR/mmap_use_after_munmap.rs:LL:CC
18
3
|
@@ -43,5 +28,5 @@ LL | libc::munmap(ptr, 4096);
43
28
44
29
note: some details are omitted, run with `MIRIFLAGS=-Zmiri-backtrace=full` for a verbose backtrace
45
30
46
-
error: aborting due to 1 previous error; 1 warning emitted
error: Undefined Behavior: incorrect layout on deallocation: ALLOC has size SIZE and alignment ALIGN, but gave size SIZE and alignment ALIGN
2
2
--> $DIR/munmap_partial.rs:LL:CC
3
3
|
4
4
LL | libc::munmap(ptr, 1);
5
-
| ^^^^^^^^^^^^^^^^^^^^ integer-to-pointer cast
5
+
| ^^^^^^^^^^^^^^^^^^^^ incorrect layout on deallocation: ALLOC has size SIZE and alignment ALIGN, but gave size SIZE and alignment ALIGN
6
6
|
7
-
= help: This program is using integer-to-pointer casts or (equivalently) `ptr::from_exposed_addr`,
8
-
= help: which means that Miri might miss pointer bugs in this program.
9
-
= help: See https://doc.rust-lang.org/nightly/std/ptr/fn.from_exposed_addr.html for more details on that operation.
10
-
= help: To ensure that Miri does not miss bugs in your program, use Strict Provenance APIs (https://doc.rust-lang.org/nightly/std/ptr/index.html#strict-provenance, https://crates.io/crates/sptr) instead.
11
-
= help: You can then pass the `-Zmiri-strict-provenance` flag to Miri, to ensure you are not relying on `from_exposed_addr` semantics.
12
-
= help: Alternatively, the `-Zmiri-permissive-provenance` flag disables this warning.
13
-
= note: BACKTRACE:
14
-
= note: inside `main` at $DIR/munmap_partial.rs:LL:CC
15
-
16
-
error: unsupported operation: Miri only supports munmap calls that exactly unmap a region previously returned by mmap
17
-
--> $DIR/munmap_partial.rs:LL:CC
18
-
|
19
-
LL | libc::munmap(ptr, 1);
20
-
| ^^^^^^^^^^^^^^^^^^^^ Miri only supports munmap calls that exactly unmap a region previously returned by mmap
21
-
|
22
-
= help: this is likely not a bug in the program; it indicates that the program performed an operation that the interpreter does not support
7
+
= help: this indicates a bug in the program: it performed an invalid operation, and caused Undefined Behavior
8
+
= help: see https://doc.rust-lang.org/nightly/reference/behavior-considered-undefined.html for further information
23
9
= note: BACKTRACE:
24
10
= note: inside `main` at $DIR/munmap_partial.rs:LL:CC
25
11
26
12
note: some details are omitted, run with `MIRIFLAGS=-Zmiri-backtrace=full` for a verbose backtrace
27
13
28
-
error: aborting due to 1 previous error; 1 warning emitted
0 commit comments