From 01512616d15b779de4a63f41351ade91dee88ac1 Mon Sep 17 00:00:00 2001 From: Ralf Jung Date: Wed, 24 Jul 2019 20:18:15 +0200 Subject: [PATCH 1/2] bump Miri --- src/tools/miri | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/tools/miri b/src/tools/miri index b269bb0707844..7ef40979157b4 160000 --- a/src/tools/miri +++ b/src/tools/miri @@ -1 +1 @@ -Subproject commit b269bb07078446c9c153e0f2acaf83bf8f19b935 +Subproject commit 7ef40979157b4117faa52bbe79ec144ebd45b0e3 From f2900b0b411f655dba96d278cf21d2face3811f6 Mon Sep 17 00:00:00 2001 From: Ralf Jung Date: Wed, 24 Jul 2019 20:47:24 +0200 Subject: [PATCH 2/2] re-enable debug checks in Miri --- src/libcore/intrinsics.rs | 2 -- 1 file changed, 2 deletions(-) diff --git a/src/libcore/intrinsics.rs b/src/libcore/intrinsics.rs index aff36aba01f9e..56e45c3695f61 100644 --- a/src/libcore/intrinsics.rs +++ b/src/libcore/intrinsics.rs @@ -1333,7 +1333,6 @@ pub(crate) fn is_aligned_and_not_null(ptr: *const T) -> bool { /// Checks whether the regions of memory starting at `src` and `dst` of size /// `count * size_of::()` overlap. -#[cfg(not(miri))] // Cannot compare with `>` across allocations in Miri fn overlaps(src: *const T, dst: *const T, count: usize) -> bool { let src_usize = src as usize; let dst_usize = dst as usize; @@ -1438,7 +1437,6 @@ pub unsafe fn copy_nonoverlapping(src: *const T, dst: *mut T, count: usize) { debug_assert!(is_aligned_and_not_null(src), "attempt to copy from unaligned or null pointer"); debug_assert!(is_aligned_and_not_null(dst), "attempt to copy to unaligned or null pointer"); - #[cfg(not(miri))] debug_assert!(!overlaps(src, dst, count), "attempt to copy to overlapping memory"); copy_nonoverlapping(src, dst, count) }