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 %p of value %llu", data, value);
124 pr_emerg(
"shift out of bounds, lhs=(%s) %p, rhs=(%s) %p", lhs_type->
name, (
void *) lhs, rhs_type->
name, (
void *) rhs);
136 pr_emerg(
"VLA bound not positive, bound=%p of type %s", (
void *) bound, type->
name);
142 pr_emerg(
"builtin unreachable was reached");
#define is_aligned(ptr, alignment)
#define pr_emerg(fmt,...)
type_descriptor * array_type
type_descriptor * index_type
MOSAPI void __ubsan_handle_sub_overflow(source_location *location, type_descriptor *type, ptr_t left, ptr_t right)
MOSAPI void __ubsan_handle_negate_overflow(source_location *location, type_descriptor *type, ptr_t old_value)
MOSAPI void __ubsan_handle_negate_overflow_v1(source_location *location, type_descriptor *type, ptr_t old_value)
MOSAPI void __ubsan_handle_mul_overflow(source_location *location, type_descriptor *type, ptr_t left, ptr_t right)
MOSAPI void __ubsan_handle_builtin_unreachable(unreachable_data *data)
MOSAPI void __ubsan_handle_type_mismatch(type_mismatch_info *type_mismatch, ptr_t pointer)
MOSAPI void __ubsan_handle_vla_bound_not_positive(source_location *location, type_descriptor *type, ptr_t bound)
MOSAPI void __ubsan_handle_invalid_builtin(source_location *location)
MOSAPI void __ubsan_handle_shift_out_of_bounds(source_location *location, type_descriptor *lhs_type, ptr_t lhs, type_descriptor *rhs_type, ptr_t rhs)
MOSAPI void __ubsan_handle_load_invalid_value(void *data, ptr_t value)
MOSAPI void __ubsan_handle_pointer_overflow(source_location *location, ptr_t pointer)
MOSAPI void __ubsan_handle_add_overflow(source_location *location, type_descriptor *type, ptr_t left, ptr_t right)
MOSAPI void __ubsan_handle_divrem_overflow(source_location *location, type_descriptor *type, ptr_t left, ptr_t right)
MOSAPI void __ubsan_handle_type_mismatch_v1(type_mismatch_info *type_mismatch, ptr_t pointer)
MOSAPI void __ubsan_handle_out_of_bounds(out_of_bounds_info *out_of_bounds)
static void log_location(source_location *location)