safec 3.8.0
Safe C Library - ISO TR24731 Bounds Checking Interface
Loading...
Searching...
No Matches
safe_mem_constraint.h File Reference
#include "safe_mem_lib.h"
+ Include dependency graph for safe_mem_constraint.h:
+ This graph shows which files directly or indirectly include this file:

Functions

EXTERN void invoke_safe_mem_constraint_handler (const char *msg, void *ptr, errno_t error)
 Invokes the currently set thread-safe or not constraint handler or the default.
 
static void handle_mem_error (void *restrict dest, rsize_t dmax, const char *err_msg, errno_t err_code)
 
void handle_mem_bos_chk_warn (const char *restrict func, void *restrict dest, const rsize_t dmax, const size_t destbos)
 

Function Documentation

◆ invoke_safe_mem_constraint_handler()

EXTERN void invoke_safe_mem_constraint_handler ( const char *  msg,
void *  ptr,
errno_t  error 
)

Invokes the currently set thread-safe or not constraint handler or the default.

Can be disabled via --disable-constraint-handler

Parameters
*msgPointer to the message describing the error.
*ptrPointer to associated data. Can be NULL.
errorThe error code encountered.

◆ handle_mem_error()

static void handle_mem_error ( void *restrict  dest,
rsize_t  dmax,
const char *  err_msg,
errno_t  err_code 
)
inlinestatic

◆ handle_mem_bos_chk_warn()

void handle_mem_bos_chk_warn ( const char *restrict  func,
void *restrict  dest,
const rsize_t  dmax,
const size_t  destbos 
)