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

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

Macro Definition Documentation

◆ pr_fmt

#define pr_fmt ( fmt)
Value:
"UBSAN: " fmt

Definition at line 3 of file ubsan.cpp.

Function Documentation

◆ log_location()

◆ __ubsan_handle_type_mismatch()

MOSAPI void __ubsan_handle_type_mismatch ( type_mismatch_info * type_mismatch,
ptr_t pointer )

Definition at line 50 of file ubsan.cpp.

Referenced by __ubsan_handle_type_mismatch_v1().

+ Here is the call graph for this function:

◆ __ubsan_handle_pointer_overflow()

MOSAPI void __ubsan_handle_pointer_overflow ( source_location * location,
ptr_t pointer )

Definition at line 64 of file ubsan.cpp.

+ Here is the call graph for this function:

◆ __ubsan_handle_type_mismatch_v1()

MOSAPI void __ubsan_handle_type_mismatch_v1 ( type_mismatch_info * type_mismatch,
ptr_t pointer )

Definition at line 70 of file ubsan.cpp.

+ Here is the call graph for this function:

◆ __ubsan_handle_divrem_overflow()

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

Definition at line 75 of file ubsan.cpp.

+ Here is the call graph for this function:

◆ __ubsan_handle_mul_overflow()

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

Definition at line 81 of file ubsan.cpp.

+ Here is the call graph for this function:

◆ __ubsan_handle_add_overflow()

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

Definition at line 87 of file ubsan.cpp.

+ Here is the call graph for this function:

◆ __ubsan_handle_sub_overflow()

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

Definition at line 93 of file ubsan.cpp.

+ Here is the call graph for this function:

◆ __ubsan_handle_out_of_bounds()

MOSAPI void __ubsan_handle_out_of_bounds ( out_of_bounds_info * out_of_bounds)

Definition at line 99 of file ubsan.cpp.

+ Here is the call graph for this function:

◆ __ubsan_handle_negate_overflow()

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

Definition at line 106 of file ubsan.cpp.

Referenced by __ubsan_handle_negate_overflow_v1().

+ Here is the call graph for this function:

◆ __ubsan_handle_negate_overflow_v1()

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

Definition at line 112 of file ubsan.cpp.

+ Here is the call graph for this function:

◆ __ubsan_handle_load_invalid_value()

MOSAPI void __ubsan_handle_load_invalid_value ( void * data,
ptr_t value )

Definition at line 117 of file ubsan.cpp.

◆ __ubsan_handle_shift_out_of_bounds()

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 )

Definition at line 122 of file ubsan.cpp.

+ Here is the call graph for this function:

◆ __ubsan_handle_invalid_builtin()

MOSAPI void __ubsan_handle_invalid_builtin ( source_location * location)

Definition at line 128 of file ubsan.cpp.

+ Here is the call graph for this function:

◆ __ubsan_handle_vla_bound_not_positive()

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

Definition at line 134 of file ubsan.cpp.

+ Here is the call graph for this function:

◆ __ubsan_handle_builtin_unreachable()

MOSAPI void __ubsan_handle_builtin_unreachable ( unreachable_data * data)

Definition at line 140 of file ubsan.cpp.

+ Here is the call graph for this function: