3#define pr_fmt(fmt) "UBSAN: " fmt
66 pr_emerg(
"pointer overflow, pointer=%p", (
void *) pointer);
77 pr_emerg(
"division overflow, left=%p, right=%p of type %s", (
void *) left, (
void *) right, type->
name);
83 pr_emerg(
"multiplication overflow, left=%p, right=%p of type %s", (
void *) left, (
void *) right, type->
name);
89 pr_emerg(
"addition overflow, left=%p, right=%p of type %s", (
void *) left, (
void *) right, type->
name);
95 pr_emerg(
"subtraction overflow, left=%p, right=%p of type %s", (
void *) left, (
void *) right, type->
name);
108 pr_emerg(
"negate overflow, old value %p of type %s", (
void *) old_value, type->
name);
119 pr_emerg(
"load invalid value at address %p, value %p of type %s", (
void *) location, (
void *) value, type->
name);
125 pr_emerg(
"shift out of bounds, lhs=(%s) %p, rhs=(%s) %p", lhs_type->
name, (
void *) lhs, rhs_type->
name, (
void *) rhs);
137 pr_emerg(
"VLA bound not positive, bound=%p of type %s", (
void *) bound, type->
name);
143 pr_emerg(
"builtin unreachable was reached");
#define is_aligned(ptr, alignment)
#define pr_emerg(fmt,...)
struct type_descriptor * array_type
struct source_location location
struct type_descriptor * index_type
struct source_location location
struct type_descriptor * type
struct source_location location
void __ubsan_handle_builtin_unreachable(struct unreachable_data *data)
void __ubsan_handle_pointer_overflow(struct source_location *location, ptr_t pointer)
void __ubsan_handle_sub_overflow(struct source_location *location, struct type_descriptor *type, ptr_t left, ptr_t right)
void __ubsan_handle_negate_overflow(struct source_location *location, struct type_descriptor *type, ptr_t old_value)
void __ubsan_handle_negate_overflow_v1(struct source_location *location, struct type_descriptor *type, ptr_t old_value)
void __ubsan_handle_out_of_bounds(struct out_of_bounds_info *out_of_bounds)
void __ubsan_handle_type_mismatch_v1(struct type_mismatch_info *type_mismatch, ptr_t pointer)
void __ubsan_handle_divrem_overflow(struct source_location *location, struct type_descriptor *type, ptr_t left, ptr_t right)
void __ubsan_handle_load_invalid_value(struct source_location *location, struct type_descriptor *type, ptr_t value)
void __ubsan_handle_type_mismatch(struct type_mismatch_info *type_mismatch, ptr_t pointer)
void __ubsan_handle_invalid_builtin(struct source_location *location)
void __ubsan_handle_shift_out_of_bounds(struct source_location *location, struct type_descriptor *lhs_type, ptr_t lhs, struct type_descriptor *rhs_type, ptr_t rhs)
void __ubsan_handle_vla_bound_not_positive(struct source_location *location, struct type_descriptor *type, ptr_t bound)
static void log_location(struct source_location *location)
void __ubsan_handle_mul_overflow(struct source_location *location, struct type_descriptor *type, ptr_t left, ptr_t right)
void __ubsan_handle_add_overflow(struct source_location *location, struct type_descriptor *type, ptr_t left, ptr_t right)