Skip to content

Commit 94f2fef

Browse files
committed
interpret: make read-pointer-as-bytes *always* work in Miri
and show some extra information when it happens in CTFE
1 parent 0644a8c commit 94f2fef

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

src/intrinsics/simd.rs

+4-1
Original file line numberDiff line numberDiff line change
@@ -186,7 +186,10 @@ pub(super) fn codegen_simd_intrinsic_call<'tcx>(
186186
let size = Size::from_bytes(
187187
4 * ret_lane_count, /* size_of([u32; ret_lane_count]) */
188188
);
189-
alloc.inner().get_bytes(fx, alloc_range(offset, size)).unwrap()
189+
alloc
190+
.inner()
191+
.get_bytes_strip_provenance(fx, alloc_range(offset, size))
192+
.unwrap()
190193
}
191194
_ => unreachable!("{:?}", idx_const),
192195
};

0 commit comments

Comments
 (0)