6 #include "debug/ubsan.h"
11 qemu_err(
"[%s:%d:%d]: Out of bounds: %x",
12 type_mismatch->location.file,
13 type_mismatch->location.line,
14 type_mismatch->location.column,
21 qemu_err(
"Pointer overflow!");
27 qemu_err(
"[%s:%d:%d]: Null pointer access!",
28 type_mismatch->location.file,
29 type_mismatch->location.line,
30 type_mismatch->location.column);
31 }
else if(type_mismatch->alignment != 0 &&
32 is_aligned(pointer, type_mismatch->alignment)) {
33 qemu_err(
"[%s:%d:%d]: Misaligned access: %x",
34 type_mismatch->location.file,
35 type_mismatch->location.line,
36 type_mismatch->location.column, pointer);
38 qemu_err(
"[%s:%d:%d]: %s address %x with insufficient space for object of type %s",
39 type_mismatch->location.file,
40 type_mismatch->location.line,
41 type_mismatch->location.column,
42 Type_Check_Kinds[type_mismatch->type_check_kind],
44 type_mismatch->type->name
51 qemu_err(
"Multiplication overflow!");
56 qemu_err(
"Addition overflow!");
61 qemu_err(
"Substraction overflow!");
66 qemu_err(
"Shift out of bounds!");
71 qemu_err(
"Division remainder overflow!");
76 qemu_err(
"Float cast overflow!");
81 qemu_err(
"Negation overflow!");
86 qemu_err(
"VLA bound is not positive!");
Основные определения ядра