Skip to content

Commit c8c391f

Browse files
committed
Auto merge of #114569 - matthiaskrgr:rollup-p8tcxtz, r=matthiaskrgr
Rollup of 8 pull requests Successful merges: - #98935 (Implement `Option::take_if`) - #114093 (Add regression test for `echo 'mod unknown;' | rustc -`) - #114229 (Nest tests/codegen/sanitizer*.rs tests in sanitizer dir) - #114230 (Nest other codegen test topics) - #114362 (string.rs: remove "Basic usage" text) - #114365 (str.rs: remove "Basic usage" text) - #114382 (Add a new `compare_bytes` intrinsic instead of calling `memcmp` directly) - #114549 (Style fix and refactor on resolve diagnostics) r? `@ghost` `@rustbot` modify labels: rollup
2 parents f7d0344 + 6ff3f0b commit c8c391f

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

tests/fail/uninit_buffer.stderr

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
error: Undefined Behavior: reading memory at ALLOC[0x0..0x10], but memory is uninitialized at [0x4..0x10], and this operation requires initialized memory
22
--> RUSTLIB/core/src/slice/cmp.rs:LL:CC
33
|
4-
LL | let mut order = unsafe { memcmp(left.as_ptr(), right.as_ptr(), len) as isize };
5-
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ reading memory at ALLOC[0x0..0x10], but memory is uninitialized at [0x4..0x10], and this operation requires initialized memory
4+
LL | let mut order = unsafe { compare_bytes(left.as_ptr(), right.as_ptr(), len) as isize };
5+
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ reading memory at ALLOC[0x0..0x10], but memory is uninitialized at [0x4..0x10], and this operation requires initialized memory
66
|
77
= help: this indicates a bug in the program: it performed an invalid operation, and caused Undefined Behavior
88
= help: see https://doc.rust-lang.org/nightly/reference/behavior-considered-undefined.html for further information

tests/fail/uninit_buffer_with_provenance.stderr

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
error: Undefined Behavior: reading memory at ALLOC[0x0..0x8], but memory is uninitialized at [0x4..0x8], and this operation requires initialized memory
22
--> RUSTLIB/core/src/slice/cmp.rs:LL:CC
33
|
4-
LL | let mut order = unsafe { memcmp(left.as_ptr(), right.as_ptr(), len) as isize };
5-
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ reading memory at ALLOC[0x0..0x8], but memory is uninitialized at [0x4..0x8], and this operation requires initialized memory
4+
LL | let mut order = unsafe { compare_bytes(left.as_ptr(), right.as_ptr(), len) as isize };
5+
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ reading memory at ALLOC[0x0..0x8], but memory is uninitialized at [0x4..0x8], and this operation requires initialized memory
66
|
77
= help: this indicates a bug in the program: it performed an invalid operation, and caused Undefined Behavior
88
= help: see https://doc.rust-lang.org/nightly/reference/behavior-considered-undefined.html for further information

0 commit comments

Comments
 (0)