about summary refs log tree commit diff
path: root/compiler/rustc_const_eval/src
diff options
context:
space:
mode:
authorDrMeepster <19316085+DrMeepster@users.noreply.github.com>2022-06-26 18:54:03 -0700
committerDrMeepster <19316085+DrMeepster@users.noreply.github.com>2022-06-26 18:54:03 -0700
commitd317988505cade110cc8c9f1d03e6a98622f10bd (patch)
treee7aeb0deae27954a102c58131c26db566fb983d6 /compiler/rustc_const_eval/src
parent6e32a165208242153af66a12cbe4448b05525f82 (diff)
downloadrust-d317988505cade110cc8c9f1d03e6a98622f10bd.tar.gz
rust-d317988505cade110cc8c9f1d03e6a98622f10bd.zip
validate box's allocator
Diffstat (limited to 'compiler/rustc_const_eval/src')
-rw-r--r--compiler/rustc_const_eval/src/interpret/validity.rs3
1 files changed, 3 insertions, 0 deletions
diff --git a/compiler/rustc_const_eval/src/interpret/validity.rs b/compiler/rustc_const_eval/src/interpret/validity.rs
index 3809030b515..00e4472721f 100644
--- a/compiler/rustc_const_eval/src/interpret/validity.rs
+++ b/compiler/rustc_const_eval/src/interpret/validity.rs
@@ -598,6 +598,9 @@ impl<'rt, 'mir, 'tcx: 'mir, M: Machine<'mir, 'tcx>> ValidityVisitor<'rt, 'mir, '
                 let nonnull = self.ecx.operand_field(&unique, 0)?;
                 let ptr = self.ecx.operand_field(&nonnull, 0)?;
                 self.check_safe_pointer(&ptr, "box")?;
+
+                let allocator = self.ecx.operand_field(value, 1)?;
+                self.visit_field(value, 1, &allocator)?;
                 Ok(true)
             }
             ty::FnPtr(_sig) => {