1
Fork 0

properly track why we checked whether a pointer is in-bounds

also simplify the in-bounds checking in Miri's borrow trackers
This commit is contained in:
Ralf Jung 2023-08-01 17:03:19 +02:00
parent 7d5886504c
commit 8496292dda
44 changed files with 130 additions and 122 deletions

View file

@ -282,8 +282,8 @@ pub enum UndefinedBehaviorInfo<'a> {
InvalidMeta(InvalidMetaKind),
/// Reading a C string that does not end within its allocation.
UnterminatedCString(Pointer),
/// Dereferencing a dangling pointer after it got freed.
PointerUseAfterFree(AllocId),
/// Using a pointer after it got freed.
PointerUseAfterFree(AllocId, CheckInAllocMsg),
/// Used a pointer outside the bounds it is valid for.
/// (If `ptr_size > 0`, determines the size of the memory range that was expected to be in-bounds.)
PointerOutOfBounds {