MOS Source Code
Loading...
Searching...
No Matches
ubsan.c File Reference
#include "mos/syslog/printk.h"
#include <mos/types.h>
+ Include dependency graph for ubsan.c:

Go to the source code of this file.

Classes

struct  source_location
 
struct  type_descriptor
 
struct  type_mismatch_info
 
struct  out_of_bounds_info
 
struct  unreachable_data
 

Macros

#define pr_fmt(fmt)
 

Functions

static void log_location (struct source_location *location)
 
void __ubsan_handle_type_mismatch (struct type_mismatch_info *type_mismatch, ptr_t pointer)
 
void __ubsan_handle_pointer_overflow (struct source_location *location, ptr_t pointer)
 
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_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)
 
void __ubsan_handle_sub_overflow (struct source_location *location, struct type_descriptor *type, ptr_t left, ptr_t right)
 
void __ubsan_handle_out_of_bounds (struct out_of_bounds_info *out_of_bounds)
 
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_load_invalid_value (struct source_location *location, struct type_descriptor *type, ptr_t value)
 
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_invalid_builtin (struct source_location *location)
 
void __ubsan_handle_vla_bound_not_positive (struct source_location *location, struct type_descriptor *type, ptr_t bound)
 
void __ubsan_handle_builtin_unreachable (struct unreachable_data *data)
 

Macro Definition Documentation

◆ pr_fmt

#define pr_fmt ( fmt)
Value:
"UBSAN: " fmt
u32 const char * fmt
Definition assert.h:36

Definition at line 3 of file ubsan.c.

Function Documentation

◆ log_location()

◆ __ubsan_handle_type_mismatch()

void __ubsan_handle_type_mismatch ( struct type_mismatch_info * type_mismatch,
ptr_t pointer )

Definition at line 50 of file ubsan.c.

Referenced by __ubsan_handle_type_mismatch_v1().

+ Here is the call graph for this function:

◆ __ubsan_handle_pointer_overflow()

void __ubsan_handle_pointer_overflow ( struct source_location * location,
ptr_t pointer )

Definition at line 64 of file ubsan.c.

+ Here is the call graph for this function:

◆ __ubsan_handle_type_mismatch_v1()

void __ubsan_handle_type_mismatch_v1 ( struct type_mismatch_info * type_mismatch,
ptr_t pointer )

Definition at line 70 of file ubsan.c.

+ Here is the call graph for this function:

◆ __ubsan_handle_divrem_overflow()

void __ubsan_handle_divrem_overflow ( struct source_location * location,
struct type_descriptor * type,
ptr_t left,
ptr_t right )

Definition at line 75 of file ubsan.c.

+ Here is the call graph for this function:

◆ __ubsan_handle_mul_overflow()

void __ubsan_handle_mul_overflow ( struct source_location * location,
struct type_descriptor * type,
ptr_t left,
ptr_t right )

Definition at line 81 of file ubsan.c.

+ Here is the call graph for this function:

◆ __ubsan_handle_add_overflow()

void __ubsan_handle_add_overflow ( struct source_location * location,
struct type_descriptor * type,
ptr_t left,
ptr_t right )

Definition at line 87 of file ubsan.c.

+ Here is the call graph for this function:

◆ __ubsan_handle_sub_overflow()

void __ubsan_handle_sub_overflow ( struct source_location * location,
struct type_descriptor * type,
ptr_t left,
ptr_t right )

Definition at line 93 of file ubsan.c.

+ Here is the call graph for this function:

◆ __ubsan_handle_out_of_bounds()

void __ubsan_handle_out_of_bounds ( struct out_of_bounds_info * out_of_bounds)

Definition at line 99 of file ubsan.c.

+ Here is the call graph for this function:

◆ __ubsan_handle_negate_overflow()

void __ubsan_handle_negate_overflow ( struct source_location * location,
struct type_descriptor * type,
ptr_t old_value )

Definition at line 106 of file ubsan.c.

Referenced by __ubsan_handle_negate_overflow_v1().

+ Here is the call graph for this function:

◆ __ubsan_handle_negate_overflow_v1()

void __ubsan_handle_negate_overflow_v1 ( struct source_location * location,
struct type_descriptor * type,
ptr_t old_value )

Definition at line 112 of file ubsan.c.

+ Here is the call graph for this function:

◆ __ubsan_handle_load_invalid_value()

void __ubsan_handle_load_invalid_value ( struct source_location * location,
struct type_descriptor * type,
ptr_t value )

Definition at line 117 of file ubsan.c.

+ Here is the call graph for this function:

◆ __ubsan_handle_shift_out_of_bounds()

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 )

Definition at line 123 of file ubsan.c.

+ Here is the call graph for this function:

◆ __ubsan_handle_invalid_builtin()

void __ubsan_handle_invalid_builtin ( struct source_location * location)

Definition at line 129 of file ubsan.c.

+ Here is the call graph for this function:

◆ __ubsan_handle_vla_bound_not_positive()

void __ubsan_handle_vla_bound_not_positive ( struct source_location * location,
struct type_descriptor * type,
ptr_t bound )

Definition at line 135 of file ubsan.c.

+ Here is the call graph for this function:

◆ __ubsan_handle_builtin_unreachable()

void __ubsan_handle_builtin_unreachable ( struct unreachable_data * data)

Definition at line 141 of file ubsan.c.

+ Here is the call graph for this function: