LOG_FATAL
- Macro
- October 8, 2025
Table of Contents
LOG_FATAL
LOG_FATAL
Description
Writes a fatal log message and aborts the program. …[in] : Format string and arguments following printf-style syntax.
Success
Message logged and program aborted via abort()
Failure
Logging may fail silently, but abort() will still execute
Usage example (Cross-references)
- In
Memory.c:13
:
i32 MemCompare(const void *p1, const void *p2, size n) {
if (!p1 || !p2) {
LOG_FATAL("Invalid arguments");
}
- In
Memory.c:30
:
void *MemCopy(void *dst, const void *src, size n) {
if (!dst || !src) {
LOG_FATAL("Invalid arguments");
}
- In
Memory.c:43
:
void *MemMove(void *dst, const void *src, size n) {
if (!dst || !src) {
LOG_FATAL("Invalid arguments");
}
- In
Memory.c:64
:
void *MemSet(void *dst, i32 val, size n) {
if (!dst) {
LOG_FATAL("Invalid arguments");
}
- In
Memory.c:76
:
size ZstrLen(const char *str) {
if (!str) {
LOG_FATAL("Invalid arguments");
}
- In
Memory.c:87
:
i32 ZstrCompare(const char *s1, const char *s2) {
if (!s1 || !s2) {
LOG_FATAL("Invalid arguments");
}
- In
Memory.c:99
:
i32 ZstrCompareN(const char *s1, const char *s2, size n) {
if (!s1 || !s2) {
LOG_FATAL("Invalid arguments");
}
- In
Memory.c:122
:
char *ZstrDupN(const char *src, size n) {
if (!src) {
LOG_FATAL("Invalid arguments");
}
- In
Memory.c:145
:
bool ZstrInitClone(const char **dst, const char **src) {
if (!dst || !src || !*src) {
LOG_FATAL("Invalid arguments.");
}
- In
Memory.c:154
:
void ZstrDeinit(const char **zs) {
if (!zs) {
LOG_FATAL("Invalid arguments");
}
- In
Memory.c:163
:
char *ZstrFindSubstring(const char *haystack, const char *needle) {
if (!haystack || !needle) {
LOG_FATAL("Invalid arguments");
}
- In
Memory.c:188
:
char *ZstrFindSubstringN(const char *haystack, const char *needle, size needle_len) {
if (!haystack || !needle) {
LOG_FATAL("Invalid arguments");
}
- In
Io.c:92
:
static bool ParseFormatSpec(const char *spec, u32 len, FmtInfo *fi) {
if (!spec || !fi) {
LOG_FATAL("Invalid arguments to ParseFormatSpec");
return false;
}
- In
Io.c:244
:
bool StrWriteFmtInternal(Str *o, const char *fmt, TypeSpecificIO *args, u64 argc) {
if (!o || !fmt) {
LOG_FATAL("Invalid arguments");
return false;
}
- In
Io.c:304
:
}
#else
LOG_FATAL("Invalid writer or data pointer");
#endif
}
- In
Io.c:422
:
const char *StrReadFmtInternal(const char *input, const char *fmtstr, TypeSpecificIO *argv, u64 argc) {
if (!input || !fmtstr) {
LOG_FATAL("Invalid arguments");
}
- In
Io.c:647
:
void FReadFmtInternal(FILE *file, const char *fmtstr, TypeSpecificIO *argv, u64 argc) {
if (!file || !fmtstr) {
LOG_FATAL("Invalid arguments");
}
- In
Io.c:709
:
static inline void write_int_as_chars(Str *o, FormatFlags flags, u64 value, size num_bytes) {
if (!o || !num_bytes || num_bytes > 8) {
LOG_FATAL("Invalid arguments to write_int_as_chars");
}
- In
Io.c:744
:
static inline void write_char_internal(Str *o, FormatFlags flags, const char *vs, size len) {
if (!o || !vs || !len) {
LOG_FATAL("Invalid arguments");
}
- In
Io.c:786
:
static inline const char *read_chars_internal(const char *i, u8 *buffer, size buffer_size, FmtInfo *fmt_info) {
if (!i || !buffer || !buffer_size) {
LOG_FATAL("Invalid arguments to read_chars_internal");
}
- In
Io.c:838
:
void _write_Str(Str *o, FmtInfo *fmt_info, Str *s) {
if (!o || !s || !fmt_info) {
LOG_FATAL("Invalid arguments");
}
- In
Io.c:906
:
void _write_Zstr(Str *o, FmtInfo *fmt_info, const char **s) {
if (!o || !s || !*s || !fmt_info) {
LOG_FATAL("Invalid arguments");
return;
}
- In
Io.c:979
:
void _write_u64(Str *o, FmtInfo *fmt_info, u64 *v) {
if (!o || !fmt_info || !v) {
LOG_FATAL("Invalid arguments");
return;
}
- In
Io.c:1023
:
void _write_u32(Str *o, FmtInfo *fmt_info, u32 *v) {
if (!o || !fmt_info || !v) {
LOG_FATAL("Invalid arguments");
return;
}
- In
Io.c:1039
:
void _write_u16(Str *o, FmtInfo *fmt_info, u16 *v) {
if (!o || !fmt_info || !v) {
LOG_FATAL("Invalid arguments");
return;
}
- In
Io.c:1055
:
void _write_u8(Str *o, FmtInfo *fmt_info, u8 *v) {
if (!o || !fmt_info || !v) {
LOG_FATAL("Invalid arguments");
return;
}
- In
Io.c:1071
:
void _write_i64(Str *o, FmtInfo *fmt_info, i64 *v) {
if (!o || !fmt_info || !v) {
LOG_FATAL("Invalid arguments");
return;
}
- In
Io.c:1115
:
void _write_i32(Str *o, FmtInfo *fmt_info, i32 *v) {
if (!o || !fmt_info || !v) {
LOG_FATAL("Invalid arguments");
return;
}
- In
Io.c:1131
:
void _write_i16(Str *o, FmtInfo *fmt_info, i16 *v) {
if (!o || !fmt_info || !v) {
LOG_FATAL("Invalid arguments");
return;
}
- In
Io.c:1147
:
void _write_i8(Str *o, FmtInfo *fmt_info, i8 *v) {
if (!o || !fmt_info || !v) {
LOG_FATAL("Invalid arguments");
return;
}
- In
Io.c:1163
:
void _write_f64(Str *o, FmtInfo *fmt_info, f64 *v) {
if (!o || !fmt_info || !v) {
LOG_FATAL("Invalid arguments");
return;
}
- In
Io.c:1226
:
void _write_f32(Str *o, FmtInfo *fmt_info, f32 *v) {
if (!o || !fmt_info || !v) {
LOG_FATAL("Invalid arguments");
return;
}
- In
Io.c:1313
:
const char *_read_Str(const char *i, FmtInfo *fmt_info, Str *s) {
if (!i || !s)
LOG_FATAL("Invalid arguments");
ValidateStr(s);
- In
Io.c:1579
:
const char *_read_f64(const char *i, FmtInfo *fmt_info, f64 *v) {
if (!i || !v)
LOG_FATAL("Invalid arguments");
// Handle character format specifier
- In
Io.c:1687
:
const char *_read_u8(const char *i, FmtInfo *fmt_info, u8 *v) {
if (!i || !v)
LOG_FATAL("Invalid arguments");
// Skip whitespace
- In
Io.c:1760
:
const char *_read_u16(const char *i, FmtInfo *fmt_info, u16 *v) {
if (!i || !v)
LOG_FATAL("Invalid arguments");
// Handle character format specifier
- In
Io.c:1835
:
const char *_read_u32(const char *i, FmtInfo *fmt_info, u32 *v) {
if (!i || !v)
LOG_FATAL("Invalid arguments");
// Handle character format specifier
- In
Io.c:1909
:
const char *_read_u64(const char *i, FmtInfo *fmt_info, u64 *v) {
if (!i || !v)
LOG_FATAL("Invalid arguments");
// Handle character format specifier
- In
Io.c:1975
:
const char *_read_i8(const char *i, FmtInfo *fmt_info, i8 *v) {
if (!i || !v)
LOG_FATAL("Invalid arguments");
// Handle character format specifier
- In
Io.c:2049
:
const char *_read_i16(const char *i, FmtInfo *fmt_info, i16 *v) {
if (!i || !v)
LOG_FATAL("Invalid arguments");
// Handle character format specifier
- In
Io.c:2124
:
const char *_read_i32(const char *i, FmtInfo *fmt_info, i32 *v) {
if (!i || !v)
LOG_FATAL("Invalid arguments");
// Handle character format specifier
- In
Io.c:2199
:
const char *_read_i64(const char *i, FmtInfo *fmt_info, i64 *v) {
if (!i || !v)
LOG_FATAL("Invalid arguments");
// Handle character format specifier
- In
Io.c:2266
:
(void)fmt_info; // Unused parameter
if (!i || !out)
LOG_FATAL("Invalid arguments");
// For string types, :c has no effect - work like regular string reading
- In
Io.c:2297
:
void _write_BitVec(Str *o, FmtInfo *fmt_info, BitVec *bv) {
if (!o || !fmt_info || !bv) {
LOG_FATAL("Invalid arguments");
return;
}
- In
Io.c:2348
:
(void)fmt_info;
(void)s;
LOG_FATAL("Attempt to write unsupported type");
}
- In
Io.c:2354
:
(void)fmt_info; // Unused parameter
if (!i || !bv) {
LOG_FATAL("Invalid arguments");
return i;
}
- In
Io.c:2470
:
(void)fmt_info; // Unused parameter
(void)s;
LOG_FATAL("Attempt to read unsupported type.");
return i;
}
- In
Io.c:2476
:
const char *_read_f32(const char *i, FmtInfo *fmt_info, f32 *v) {
if (!i || !v)
LOG_FATAL("Invalid arguments");
// Handle character format specifier
- In
Io.c:2588
:
static void _write_r8(Str *o, FmtInfo *fmt_info, u8 *v) {
if (!o || !fmt_info || !v) {
LOG_FATAL("Invalid arguments");
}
- In
Io.c:2596
:
static void _write_r16(Str *o, FmtInfo *fmt_info, u16 *v) {
if (!o || !fmt_info || !v) {
LOG_FATAL("Invalid arguments");
}
- In
Io.c:2618
:
case ENDIAN_NATIVE :
default : {
LOG_FATAL("Invalid endianness provided. Unexpected code reached.");
}
}
- In
Io.c:2625
:
static void _write_r32(Str *o, FmtInfo *fmt_info, u32 *v) {
if (!o || !fmt_info || !v) {
LOG_FATAL("Invalid arguments");
}
- In
Io.c:2652
:
case ENDIAN_NATIVE :
default : {
LOG_FATAL("Invalid endianness provided. Unexpected code reached.");
}
}
- In
Io.c:2660
:
static void _write_r64(Str *o, FmtInfo *fmt_info, u64 *v) {
if (!o || !fmt_info || !v) {
LOG_FATAL("Invalid arguments");
}
- In
Io.c:2694
:
case ENDIAN_NATIVE :
default : {
LOG_FATAL("Invalid endianness provided. Unexpected code reached.");
}
}
- In
Io.c:2701
:
static const char *_read_r8(const char *i, FmtInfo *fmt_info, u8 *v) {
if (!i || !fmt_info || !v) {
LOG_FATAL("Invalid arguments");
}
- In
Io.c:2713
:
static const char *_read_r16(const char *i, FmtInfo *fmt_info, u16 *v) {
if (!i || !fmt_info || !v) {
LOG_FATAL("Invalid arguments to _read_r16");
}
- In
Io.c:2733
:
case ENDIAN_NATIVE :
default :
LOG_FATAL("Invalid endianness provided. Unexpected code reached in _read_r16.");
}
- In
Io.c:2743
:
static const char *_read_r32(const char *i, FmtInfo *fmt_info, u32 *v) {
if (!i || !fmt_info || !v) {
LOG_FATAL("Invalid arguments to _read_r32");
}
- In
Io.c:2762
:
case ENDIAN_NATIVE :
default :
LOG_FATAL("Invalid endianness provided. Unexpected code reached in _read_r32.");
}
- In
Io.c:2772
:
static const char *_read_r64(const char *i, FmtInfo *fmt_info, u64 *v) {
if (!i || !fmt_info || !v) {
LOG_FATAL("Invalid arguments to _read_r64");
}
- In
Io.c:2793
:
case ENDIAN_NATIVE :
default :
LOG_FATAL("Invalid endianness provided. Unexpected code reached in _read_r64.");
}
- In
Iter.c:21
:
}
} else {
LOG_FATAL("Invalid direction");
return 0;
}
- In
Iter.c:28
:
void validate_iter(GenericIter *i) {
if (((i)->dir != -1 && (i)->dir != 1) || !(i)->alignment || !(i)->length || (i)->pos >= (i)->length) {
LOG_FATAL("Invalid iter object.");
}
(void)(*(char *)(void *)((i)->data));
- In
BitVec.c:94
:
if (!new_data) {
LOG_FATAL("Failed to allocate memory for bitvec");
return;
}
- In
BitVec.c:189
:
ValidateBitVec(bitvec);
if (idx >= bitvec->length) {
LOG_FATAL("Index {} exceeds bitvector length {}", idx, bitvec->length);
}
u64 byte_idx = BIT_INDEX(idx);
- In
BitVec.c:200
:
ValidateBitVec(bitvec);
if (idx >= bitvec->length) {
LOG_FATAL("Index {} exceeds bitvector length {}", idx, bitvec->length);
}
u64 byte_idx = BIT_INDEX(idx);
- In
BitVec.c:215
:
ValidateBitVec(bitvec);
if (idx >= bitvec->length) {
LOG_FATAL("Index {} exceeds bitvector length {}", idx, bitvec->length);
}
u64 byte_idx = BIT_INDEX(idx);
- In
BitVec.c:237
:
ValidateBitVec(bitvec);
if (bitvec->length == 0) {
LOG_FATAL("Cannot pop from empty bitvector");
}
bool value = BitVecGet(bitvec, bitvec->length - 1);
- In
BitVec.c:247
:
ValidateBitVec(bitvec);
if (idx > bitvec->length) {
LOG_FATAL("Index {} exceeds bitvector length {}", idx, bitvec->length);
}
// For now, implement as push + manual bit shifting (simple but not efficient)
- In
BitVec.c:264
:
ValidateBitVec(bv);
if (idx > bv->length) {
LOG_FATAL("Index {} exceeds bitvector length {}", idx, bv->length);
}
if (count == 0) {
- In
BitVec.c:291
:
ValidateBitVec(other);
if (idx > bv->length) {
LOG_FATAL("Index {} exceeds bitvector length {}", idx, bv->length);
}
if (other->length == 0) {
- In
BitVec.c:318
:
ValidateBitVec(bv);
if (idx > bv->length) {
LOG_FATAL("Index {} exceeds bitvector length {}", idx, bv->length);
}
if (pattern_bits == 0 || pattern_bits > 8) {
- In
BitVec.c:345
:
ValidateBitVec(bv);
if (idx >= bv->length) {
LOG_FATAL("Index {} exceeds bitvector length {}", idx, bv->length);
}
- In
BitVec.c:364
:
ValidateBitVec(bv);
if (idx >= bv->length) {
LOG_FATAL("Index {} exceeds bitvector length {}", idx, bv->length);
}
if (count == 0) {
- In
BitVec.c:528
:
if (start1 + len > bv1->length) {
LOG_FATAL("Range [{}:{}] exceeds bitvector1 length {}", start1, LVAL(start1 + len - 1), bv1->length);
}
if (start2 + len > bv2->length) {
- In
BitVec.c:531
:
}
if (start2 + len > bv2->length) {
LOG_FATAL("Range [{}:{}] exceeds bitvector2 length {}", start2, LVAL(start2 + len - 1), bv2->length);
}
- In
BitVec.c:570
:
if (start1 + len > bv1->length) {
LOG_FATAL("Range [{}:{}] exceeds bitvector1 length {}", start1, LVAL(start1 + len - 1), bv1->length);
}
if (start2 + len > bv2->length) {
- In
BitVec.c:573
:
}
if (start2 + len > bv2->length) {
LOG_FATAL("Range [{}:{}] exceeds bitvector2 length {}", start2, LVAL(start2 + len - 1), bv2->length);
}
- In
BitVec.c:746
:
BitVec BitVecFromStr(const char *str) {
if (!str) {
LOG_FATAL("str is NULL");
}
- In
BitVec.c:769
:
ValidateBitVec(bv);
if (!bytes) {
LOG_FATAL("bytes is NULL");
}
if (max_len == 0) {
- In
BitVec.c:772
:
}
if (max_len == 0) {
LOG_FATAL("max_len is 0");
}
if (bv->length == 0) {
- In
BitVec.c:798
:
BitVec BitVecFromBytes(const u8 *bytes, u64 bit_len) {
if (!bytes) {
LOG_FATAL("bytes is NULL");
}
- In
BitVec.c:1093
:
if (!results || max_results == 0) {
LOG_FATAL("results is NULL or max_results is 0");
}
- In
BitVec.c:1117
:
ValidateBitVec(bv);
if (!runs || !values || max_runs == 0) {
LOG_FATAL("invalid arguments");
}
- In
BitVec.c:1262
:
FREE(prev_row);
FREE(curr_row);
LOG_FATAL("Memory allocation failed");
}
- In
BitVec.c:1588
:
ValidateBitVec(bv);
if (!pattern) {
LOG_FATAL("pattern is NULL");
}
- In
BitVec.c:1611
:
ValidateBitVec(bv);
if (!patterns) {
LOG_FATAL("invalid BitVecs object provided");
}
- In
BitVec.c:1626
:
ValidateBitVec(bv);
if (!patterns) {
LOG_FATAL("invalid arguments");
}
- In
BitVec.c:1640
:
void ValidateBitVec(const BitVec *bv) {
if (!(bv)) {
LOG_FATAL("Invalid bitvec object: NULL.");
}
if ((bv)->__magic != MISRA_BITVEC_MAGIC) {
- In
BitVec.c:1643
:
}
if ((bv)->__magic != MISRA_BITVEC_MAGIC) {
LOG_FATAL("Invalid bitvec. Either uninitialized or curropted!");
}
if ((bv)->length > (bv)->capacity) {
- In
BitVec.c:1646
:
}
if ((bv)->length > (bv)->capacity) {
LOG_FATAL("Invalid bitvec object: length > capacity.");
}
if ((bv)->length > 0 && !(bv)->data) {
- In
BitVec.c:1649
:
}
if ((bv)->length > 0 && !(bv)->data) {
LOG_FATAL("Invalid bitvec object: length > 0 but data is NULL.");
}
if ((bv)->capacity > 0 && (bv)->byte_size * 8 < (bv)->capacity) {
- In
BitVec.c:1652
:
}
if ((bv)->capacity > 0 && (bv)->byte_size * 8 < (bv)->capacity) {
LOG_FATAL("Invalid bitvec object: byte_u64 too small for capacity.");
}
if ((bv)->data) {
- In
List.c:24
:
void insert_into_list(GenericList *list, void *item_data, u64 item_size, u64 idx) {
if (!list || !item_size || !item_data) {
LOG_FATAL("invalid arguments.");
}
- In
List.c:81
:
}
} else {
LOG_FATAL("list index out of range.");
}
- In
List.c:89
:
void remove_range_list(GenericList *list, void *removed_data, u64 item_size, u64 start, u64 count) {
if (!list || !item_size) {
LOG_FATAL("invalid arguments.");
}
- In
List.c:99
:
if (start + count > list->length) {
LOG_FATAL("List range out of bounds.");
}
- In
List.c:156
:
void qsort_list(GenericList *list, u64 item_size, GenericCompare comp) {
if (!list || !item_size) {
LOG_FATAL("invalid arguments.");
}
- In
List.c:172
:
void swap_list(GenericList *list, u64 item_size, u64 idx1, u64 idx2) {
if (!list || !item_size) {
LOG_FATAL("invalid arguments.");
}
- In
List.c:179
:
GenericListNode *n1 = node_at_list(list, item_size, idx1);
if (!n1) {
LOG_FATAL("failed to get node at specified index");
}
- In
List.c:184
:
GenericListNode *n2 = node_at_list(list, item_size, idx2);
if (!n2) {
LOG_FATAL("failed to get node at specified index");
}
- In
List.c:201
:
void reverse_list(GenericList *list, u64 item_size) {
if (!list || !item_size) {
LOG_FATAL("invalid arguments.");
}
- In
List.c:215
:
void push_arr_list(GenericList *list, u64 item_size, void *arr, u64 count) {
if (!list || !arr || !item_size) {
LOG_FATAL("invalid arguments.");
}
- In
List.c:229
:
if (!new_tail) {
LOG_FATAL("Failed to allocate memory for new node");
}
- In
List.c:235
:
if (!new_tail->data) {
free(new_tail);
LOG_FATAL("Failed to allocate memory for node data");
}
- In
List.c:268
:
void merge_list(GenericList *list1, u64 item_size, GenericList *list2) {
if (!list1 || !item_size || !list2) {
LOG_FATAL("invalid arguments.");
}
- In
List.c:284
:
void clear_list(GenericList *list, u64 item_size) {
if (!list || !item_size) {
LOG_FATAL("invalid arguments.");
}
- In
List.c:295
:
GenericListNode *node_at_list(GenericList *list, u64 item_size, u64 idx) {
if (!list || !item_size) {
LOG_FATAL("invalid arguments.");
}
- In
List.c:301
:
if (idx >= list->length) {
LOG_FATAL("list index out of range.");
}
- In
List.c:314
:
void *item_ptr_at_list(GenericList *list, u64 item_size, u64 idx) {
if (!list || !item_size) {
LOG_FATAL("invalid arguments.");
}
- In
List.c:320
:
if (idx >= list->length) {
LOG_FATAL("list index out of bounds.");
}
- In
List.c:329
:
void validate_list(const GenericList *l) {
if (!(l)) {
LOG_FATAL("List pointer is NULL.");
}
if ((l)->__magic != MISRA_LIST_MAGIC) {
- In
List.c:332
:
}
if ((l)->__magic != MISRA_LIST_MAGIC) {
LOG_FATAL("Invalid list. Either not initialized or corrupted!");
}
if ((l)->length > 0) {
- In
List.c:336
:
if ((l)->length > 0) {
if (!(l)->head) {
LOG_FATAL("Non-empty list has NULL head.");
}
if (!(l)->tail) {
- In
List.c:339
:
}
if (!(l)->tail) {
LOG_FATAL("Non-empty list has NULL tail.");
}
}
- In
List.c:346
:
GenericListNode *get_node_relative_to_list_node(GenericListNode *node, i64 ridx) {
if (!node) {
LOG_FATAL("Invalid arguments");
}
- In
List.c:372
:
GenericListNode *get_node_random_access(GenericList *list, GenericListNode *node, u64 nidx, i64 ridx) {
if (!list || !node) {
LOG_FATAL("Invalid arguments");
}
- In
List.c:376
:
if (nidx >= list->length) {
LOG_FATAL("Node index exceeds list bounds");
}
- In
List.c:380
:
if ((ridx < 0 && (u64)(-ridx) > nidx) || (ridx > 0 && nidx + (u64)ridx >= list->length)) {
LOG_FATAL("Relative node index outside of list bounds");
}
- In
Vec.c:24
:
if (!v->alignment) {
LOG_FATAL("Invalid alignment. Did you initialize before use? Aborting...");
}
- In
Vec.c:151
:
if (idx > vec->length) {
LOG_FATAL("vector index out of bounds, insertion at index greater than length");
}
- In
Vec.c:189
:
if (idx > vec->length) {
LOG_FATAL("vector index out of bounds, insertion at index greater than length");
}
- In
Vec.c:225
:
if (start + count > vec->length) {
LOG_FATAL("vector range out of bounds.");
}
- In
Vec.c:266
:
if (start + count > vec->length) {
LOG_FATAL("vector range out of bounds.");
}
- In
Vec.c:320
:
if (vec_aligned_size(vec, item_size) != item_size) {
LOG_FATAL(
"QSort not implemented for vectors wherein the size of items don't "
"match their aligned size."
- In
Vec.c:334
:
if (idx1 >= vec->length || idx2 >= vec->length) {
LOG_FATAL("vector index out of bounds.");
}
- In
Vec.c:381
:
void validate_vec(const GenericVec *v) {
if (!(v)) {
LOG_FATAL("NULL vec object pointer.");
}
if ((v)->__magic != MISRA_VEC_MAGIC) {
- In
Vec.c:384
:
}
if ((v)->__magic != MISRA_VEC_MAGIC) {
LOG_FATAL("Invalid vec object. Either uninitialized or corrupted!");
}
if (!(v)->alignment || (v)->length > (v)->capacity) {
- In
Vec.c:387
:
}
if (!(v)->alignment || (v)->length > (v)->capacity) {
LOG_FATAL("Invalid vec object.");
}
// if memory is invalid, system will segfault here
- In
Dir.c:50
:
SysDirEntry *SysDirEntryInitCopy(SysDirEntry *dst, SysDirEntry *src) {
if (!dst || !src) {
LOG_FATAL("invalid arguments.");
}
- In
Dir.c:62
:
SysDirEntry *SysDirEntryDeinitCopy(SysDirEntry *copy) {
if (!copy) {
LOG_FATAL("invalid arguments.");
}
- In
Dir.c:75
:
SysDirContents SysGetDirContents(const char *path) {
if (!path) {
LOG_FATAL("Invalid argument");
}
- In
Dir.c:121
:
SysDirContents SysGetDirContents(const char *path) {
if (!path) {
LOG_FATAL("invalid arguments.");
}
- In
Proc.c:230
:
void SysProcWait(SysProc *proc) {
if (!proc) {
LOG_FATAL("Invalid argument");
}
- In
Proc.c:267
:
SysProcStatus SysProcWaitFor(SysProc *proc, u64 timeout_ms) {
if (!proc) {
LOG_FATAL("Invalid arguments");
}
- In
Proc.c:335
:
void SysProcTerminate(SysProc *proc) {
if (!proc) {
LOG_FATAL("Invalid argument");
}
- In
Proc.c:390
:
void SysProcDestroy(SysProc *proc) {
if (!proc) {
LOG_FATAL("Invalid argument");
}
SysProcTerminate(proc);
- In
Proc.c:409
:
i32 SysProcWriteToStdin(SysProc *proc, Str *buf) {
if (!proc || !buf) {
LOG_FATAL("Invalid arguments");
}
- In
Proc.c:424
:
i32 sys_proc_read_internal(SysProc *proc, Str *buf, bool is_stdout) {
if (!proc || !buf) {
LOG_FATAL("Invalid argument");
}
- In
Proc.c:516
:
i32 SysProcGetId(SysProc *proc) {
if (!proc) {
LOG_FATAL("Invalid argument");
}
- In
Proc.c:528
:
i32 SysProcIsRunning(SysProc *proc) {
if (!proc) {
LOG_FATAL("Invalid argument");
}
- In
Proc.c:552
:
i32 SysProcGetExitCode(SysProc *proc) {
if (!proc) {
LOG_FATAL("Invalid argument");
}
- In
Proc.c:580
:
Str *SysGetCurrentExecutablePath(Str *exe_path) {
if (!exe_path) {
LOG_FATAL("Invalid arguments: exe_path is NULL");
}
BitVecPush(&pattern, true);
BitVecFindPattern(NULL, &pattern); // Should cause LOG_FATAL
BitVecDeinit(&pattern);
BitVecPush(&source, false);
BitVecFindPattern(&source, NULL); // Should cause LOG_FATAL
BitVecDeinit(&source);
BitVecPush(&pattern, true);
BitVecFindLastPattern(NULL, &pattern); // Should cause LOG_FATAL
BitVecDeinit(&pattern);
BitVecPush(&source, false);
BitVecFindLastPattern(&source, NULL); // Should cause LOG_FATAL
BitVecDeinit(&source);
// Don't create pattern BitVec since we're testing NULL source validation
BitVecFindAllPattern(NULL, (BitVec *)0x1, results, 10); // Should cause LOG_FATAL
return true;
BitVecPush(&source, false);
BitVecFindAllPattern(&source, NULL, results, 10); // Should cause LOG_FATAL
BitVecDeinit(&source);
BitVecPush(&pattern, true);
BitVecFindAllPattern(&source, &pattern, NULL, 10); // Should cause LOG_FATAL
BitVecDeinit(&source);
BitVecPush(&pattern, true);
BitVecFindAllPattern(&source, &pattern, results, 0); // Should cause LOG_FATAL
BitVecDeinit(&source);
BitVecPush(&pattern, true);
BitVecFindPattern(NULL, &pattern); // Should cause LOG_FATAL
BitVecDeinit(&pattern);
BitVecPush(&source, false);
BitVecFindPattern(&source, NULL); // Should cause LOG_FATAL
BitVecDeinit(&source);
BitVecPush(&pattern, true);
BitVecFindLastPattern(NULL, &pattern); // Should cause LOG_FATAL
BitVecDeinit(&pattern);
BitVecPush(&source, false);
BitVecFindLastPattern(&source, NULL); // Should cause LOG_FATAL
BitVecDeinit(&source);
// Don't create pattern BitVec since we're testing NULL source validation
BitVecFindAllPattern(NULL, (BitVec *)0x1, results, 10); // Should cause LOG_FATAL
return true;
BitVecPush(&source, false);
BitVecFindAllPattern(&source, NULL, results, 10); // Should cause LOG_FATAL
BitVecDeinit(&source);
BitVecPush(&pattern, true);
BitVecFindAllPattern(&source, &pattern, NULL, 10); // Should cause LOG_FATAL
BitVecDeinit(&source);
BitVecPush(&pattern, true);
BitVecFindAllPattern(&source, &pattern, results, 0); // Should cause LOG_FATAL
BitVecDeinit(&source);
- In
ElfInfo.c:336
:
int main(int argc, char **argv) {
if (argc < 2) {
LOG_FATAL("USAGE: {} {}", argv[0], argv[1]);
}
- In
ElfInfo.c:355
:
// for an invalid elf magic, any subsequent fields will be zero, and hence will be invalid
if (eh.meta.class != ELF_CLASS_64) {
LOG_FATAL("Only 64-bit binaries supported for now. Class for provided binary is = {}", eh.meta.class);
}
- In
MisraDoc.c:113
:
Scope(&config, StrDeinit, {
if (!ReadCompleteFile(config_path, &config.data, &config.length, &config.capacity)) {
LOG_FATAL("Failed to read config file.");
}
StrIter json = StrIterFromStr(config);
- In
Insert.h:207
:
{ \
if (varr == NULL) { \
LOG_FATAL("Expected a valid pointer"); \
} \
VEC_DATATYPE(v) __tmp_val_##__LINE__ = *(varr); \
- In
Insert.h:244
:
{ \
if (varr == NULL) { \
LOG_FATAL("Expected a valid pointer"); \
} \
VEC_DATATYPE(v) __tmp_val_##__LINE__ = *(varr); \
- In
Insert.h:303
:
{ \
if (varr == NULL) { \
LOG_FATAL("Expected a valid pointer"); \
} \
VEC_DATATYPE(v) __tmp_val_##__LINE__ = *(varr); \
- In
Insert.h:348
:
{ \
if (varr == NULL) { \
LOG_FATAL("Expected a valid pointer"); \
} \
VEC_DATATYPE(v) __tmp_val_##__LINE__ = *(varr); \