30 #pragma GCC diagnostic ignored "-Wmissing-prototypes"
33 const char *violation) {
40 if (!location || !location->
filename)
41 location = &unknown_location;
43 (
unsigned long int)location->
line,
44 (
unsigned long int)location->
column);
45 die(
"ubsan: unrecoverable error.\n");
48 #define ABORT_VARIANT(name, params, call) \
49 __noreturn void __ubsan_handle_##name##_abort params; \
50 __noreturn void __ubsan_handle_##name##_abort params { \
51 __ubsan_handle_##name call; \
52 __builtin_unreachable(); \
55 #define ABORT_VARIANT_VP(name) \
56 ABORT_VARIANT(name, (void *a), (a))
57 #define ABORT_VARIANT_VP_VP(name) \
58 ABORT_VARIANT(name, (void *a, void *b), (a, b))
59 #define ABORT_VARIANT_VP_IP(name) \
60 ABORT_VARIANT(name, (void *a, intptr_t b), (a, b))
61 #define ABORT_VARIANT_VP_VP_VP(name) \
62 ABORT_VARIANT(name, (void *a, void *b, void *c), (a, b, c))
76 const char *violation =
"type mismatch";
78 violation =
"null pointer access";
80 violation =
"unaligned access";
337 static const char *abort_text
338 =
"cfi: integrity failure during indirect call.";
#define printk(level,...)
void __noreturn die(const char *fmt,...)
#define BIOS_ERR
BIOS_ERR - System in incomplete state.
struct ubsan_type_descriptor * type
struct ubsan_source_location location
struct ubsan_type_descriptor * from_type
struct ubsan_type_descriptor * to_type
struct ubsan_source_location location
struct ubsan_source_location location
struct ubsan_type_descriptor * type
struct ubsan_source_location location
struct ubsan_type_descriptor * type
struct ubsan_source_location location
struct ubsan_source_location attr_location
struct ubsan_source_location attr_location
struct ubsan_source_location location
struct ubsan_type_descriptor * index_type
struct ubsan_source_location location
struct ubsan_type_descriptor * array_type
struct ubsan_type_descriptor * type
struct ubsan_source_location location
struct ubsan_source_location location
struct ubsan_source_location location
struct ubsan_type_descriptor * rhs_type
struct ubsan_type_descriptor * lhs_type
unsigned char type_check_kind
struct ubsan_type_descriptor * type
struct ubsan_source_location location
struct ubsan_source_location location
struct ubsan_type_descriptor * type
struct ubsan_source_location location
void __ubsan_handle_float_cast_overflow(void *data_raw, void *from_raw)
void __ubsan_handle_pointer_overflow(void *data_raw, void *base_raw, void *result_raw)
void __ubsan_handle_mul_overflow(void *data_raw, void *lhs_raw, void *rhs_raw)
void __ubsan_handle_shift_out_of_bounds(void *data_raw, void *lhs_raw, void *rhs_raw)
void __ubsan_handle_add_overflow(void *data_raw, void *lhs_raw, void *rhs_raw)
void __ubsan_handle_sub_overflow(void *data_raw, void *lhs_raw, void *rhs_raw)
#define ABORT_VARIANT_VP_VP_VP(name)
void __ubsan_handle_nonnull_return(void *data_raw)
#define ABORT_VARIANT_VP(name)
void __noreturn __ubsan_handle_missing_return(void *data_raw)
void __ubsan_handle_type_mismatch_v1(void *data_raw, void *pointer_raw)
void __ubsan_handle_negate_overflow(void *data_raw, void *old_value_raw)
void __ubsan_handle_cfi_bad_icall(void *data_raw, void *value_raw)
#define ABORT_VARIANT_VP_VP(name)
void __ubsan_handle_divrem_overflow(void *data_raw, void *lhs_raw, void *rhs_raw)
uintptr_t ubsan_value_handle_t
#define ABORT_VARIANT_VP_IP(name)
void __ubsan_handle_out_of_bounds(void *data_raw, void *index_raw)
void __ubsan_handle_nonnull_arg(void *data_raw, intptr_t index_raw)
static void __noreturn ubsan_abort(const struct ubsan_source_location *location, const char *violation)
void __ubsan_handle_vla_bound_not_positive(void *data_raw, void *bound_raw)
void __noreturn __ubsan_handle_builtin_unreachable(void *data_raw)
void __ubsan_handle_function_type_mismatch(void *data_raw, void *value_raw)
void __ubsan_handle_load_invalid_value(void *data_raw, void *value_raw)
typedef void(X86APIP X86EMU_intrFuncs)(int num)