diff options
| author | Oliver Scherer <github35764891676564198441@oli-obk.de> | 2020-01-09 10:56:05 +0100 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2020-01-09 10:56:05 +0100 |
| commit | e632940a41fe6d65bd677da85d87046dc5da5022 (patch) | |
| tree | b312c893a9036f2d80890f255d9b4e9ff7add8bc | |
| parent | d0b24e5ee292cc785401c880f21b690f5f3fa1d6 (diff) | |
| download | rust-e632940a41fe6d65bd677da85d87046dc5da5022.tar.gz rust-e632940a41fe6d65bd677da85d87046dc5da5022.zip | |
Update src/librustc_mir/interpret/place.rs
Co-Authored-By: Ralf Jung <post@ralfj.de>
| -rw-r--r-- | src/librustc_mir/interpret/place.rs | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/src/librustc_mir/interpret/place.rs b/src/librustc_mir/interpret/place.rs index 6428caa8fb0..87bb4c04b73 100644 --- a/src/librustc_mir/interpret/place.rs +++ b/src/librustc_mir/interpret/place.rs @@ -182,6 +182,7 @@ impl<'tcx, Tag> MPlaceTy<'tcx, Tag> { pub fn dangling(layout: TyLayout<'tcx>, cx: &impl HasDataLayout) -> Self { let align = layout.align.abi; let ptr = Scalar::from_uint(align.bytes(), cx.pointer_size()); + // `Poison` this to make sure that the pointer value `ptr` is never observable by the program. MPlaceTy { mplace: MemPlace { ptr, align, meta: MemPlaceMeta::Poison }, layout } } |
