lib/ubsan.h
Source file repositories/reference/linux-study-clean/lib/ubsan.h
File Facts
- System
- Linux kernel
- Corpus path
lib/ubsan.h- Extension
.h- Size
- 4372 bytes
- Lines
- 164
- Domain
- Kernel Services
- Bucket
- lib
- Inferred role
- Kernel Services: implementation source
- Status
- source implementation candidate
Why This File Exists
Shared kernel service surface used by multiple subsystems, including helpers, cryptography, virtualization support, and async I/O infrastructure.
- Shared kernel service surface used by multiple subsystems, including helpers, cryptography, virtualization support, and async I/O infrastructure.
- Defines or uses C structs; map object ownership, embedded links, reference counts, and lock ownership.
Dependency Surface
- No C-style include directives detected by the generator.
Detected Declarations
struct type_descriptorstruct source_locationstruct overflow_datastruct implicit_conversion_datastruct type_mismatch_datastruct type_mismatch_data_v1struct type_mismatch_data_commonstruct nonnull_arg_datastruct out_of_bounds_datastruct shift_out_of_bounds_datastruct unreachable_datastruct invalid_value_datastruct alignment_assumption_dataenum ubsan_checks
Annotated Snippet
struct type_descriptor {
u16 type_kind;
u16 type_info;
char type_name[];
};
struct source_location {
const char *file_name;
union {
unsigned long reported;
struct {
u32 line;
u32 column;
};
};
};
struct overflow_data {
struct source_location location;
struct type_descriptor *type;
};
struct implicit_conversion_data {
struct source_location location;
struct type_descriptor *from_type;
struct type_descriptor *to_type;
unsigned char type_check_kind;
};
struct type_mismatch_data {
struct source_location location;
struct type_descriptor *type;
unsigned long alignment;
unsigned char type_check_kind;
};
struct type_mismatch_data_v1 {
struct source_location location;
struct type_descriptor *type;
unsigned char log_alignment;
unsigned char type_check_kind;
};
struct type_mismatch_data_common {
struct source_location *location;
struct type_descriptor *type;
unsigned long alignment;
unsigned char type_check_kind;
};
struct nonnull_arg_data {
struct source_location location;
struct source_location attr_location;
int arg_index;
};
struct out_of_bounds_data {
struct source_location location;
struct type_descriptor *array_type;
struct type_descriptor *index_type;
};
struct shift_out_of_bounds_data {
struct source_location location;
struct type_descriptor *lhs_type;
struct type_descriptor *rhs_type;
};
struct unreachable_data {
struct source_location location;
};
struct invalid_value_data {
struct source_location location;
struct type_descriptor *type;
};
struct alignment_assumption_data {
struct source_location location;
struct source_location assumption_location;
struct type_descriptor *type;
};
#if defined(CONFIG_ARCH_SUPPORTS_INT128)
typedef __int128 s_max;
typedef unsigned __int128 u_max;
#else
typedef s64 s_max;
typedef u64 u_max;
#endif
Annotation
- Detected declarations: `struct type_descriptor`, `struct source_location`, `struct overflow_data`, `struct implicit_conversion_data`, `struct type_mismatch_data`, `struct type_mismatch_data_v1`, `struct type_mismatch_data_common`, `struct nonnull_arg_data`, `struct out_of_bounds_data`, `struct shift_out_of_bounds_data`.
- Atlas domain: Kernel Services / lib.
- Implementation status: source implementation candidate.
Implementation Notes
- This generated page is the file-by-file coverage layer; curated subsystem chapters should link here when they synthesize a multi-file control flow.
- Core OS pages should be promoted from atlas-only to deep-reviewed when they explain data structures, invariants, locking, lifecycle, and C implementation snippets.
- Driver-family pages are intentionally pattern-oriented unless they are part of the selected PCIe/NVMe representative device path.