1
Fork 0

use CheckInAllocMsg::PointerArithmeticTest for ptr_offset error

This commit is contained in:
Ralf Jung 2021-05-06 00:16:27 +02:00
parent d620ae1070
commit abdba81d03
8 changed files with 14 additions and 10 deletions

View file

@ -306,6 +306,9 @@ impl fmt::Display for UndefinedBehaviorInfo<'_> {
ptr.alloc_id,
allocation_size.bytes()
),
DanglingIntPointer(_, CheckInAllocMsg::InboundsTest) => {
write!(f, "null pointer is not allowed for this operation")
}
DanglingIntPointer(i, msg) => {
write!(f, "{} failed: 0x{:x} is not a valid pointer", msg, i)
}