Skip to content

Commit e632940

Browse files
oli-obkRalfJung
andauthored
Update src/librustc_mir/interpret/place.rs
Co-Authored-By: Ralf Jung <[email protected]>
1 parent d0b24e5 commit e632940

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

src/librustc_mir/interpret/place.rs

+1
Original file line numberDiff line numberDiff line change
@@ -182,6 +182,7 @@ impl<'tcx, Tag> MPlaceTy<'tcx, Tag> {
182182
pub fn dangling(layout: TyLayout<'tcx>, cx: &impl HasDataLayout) -> Self {
183183
let align = layout.align.abi;
184184
let ptr = Scalar::from_uint(align.bytes(), cx.pointer_size());
185+
// `Poison` this to make sure that the pointer value `ptr` is never observable by the program.
185186
MPlaceTy { mplace: MemPlace { ptr, align, meta: MemPlaceMeta::Poison }, layout }
186187
}
187188

0 commit comments

Comments
 (0)