Validate all fields of box instead of validating allocator specifically

This commit is contained in:
DrMeepster 2022-06-28 02:19:52 -07:00
parent d317988505
commit 9f9c311718

View file

@ -599,8 +599,8 @@ impl<'rt, 'mir, 'tcx: 'mir, M: Machine<'mir, 'tcx>> ValidityVisitor<'rt, 'mir, '
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)?;
// Check other fields of Box
self.walk_value(op)?;
Ok(true)
}
ty::FnPtr(_sig) => {