interpret: better error message for out-of-bounds pointer arithmetic and accesses

This commit is contained in:
Ralf Jung
2025-04-30 16:52:25 +02:00
parent 427288b3ce
commit 00f25a8e1c
81 changed files with 202 additions and 213 deletions

View File

@@ -510,7 +510,7 @@ impl<'rt, 'tcx, M: Machine<'tcx>> ValidityVisitor<'rt, 'tcx, M> {
self.ecx.check_ptr_access(
place.ptr(),
size,
CheckInAllocMsg::InboundsTest, // will anyway be replaced by validity message
CheckInAllocMsg::Dereferenceable, // will anyway be replaced by validity message
),
self.path,
Ub(DanglingIntPointer { addr: 0, .. }) => NullPtr { ptr_kind },