safec 3.8.0
Safe C Library - ISO TR24731 Bounds Checking Interface
|
Functions | |
EXPORT constraint_handler_t | set_mem_constraint_handler_s (constraint_handler_t handler) |
The set_mem_constraint_handler_s function sets the runtime-constraint handler to be handler. | |
EXPORT constraint_handler_t | thrd_set_mem_constraint_handler_s (constraint_handler_t handler) |
The thrd_set_mem_constraint_handler_s function sets the runtime-constraint handler to a thread-local handler. | |
EXPORT 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. | |
void | handle_mem_bos_chk_warn (const char *restrict func, void *restrict dest, const rsize_t dmax, const size_t destbos) |
Variables | |
static constraint_handler_t | mem_handler |
static constraint_handler_t | thrd_mem_handler |
EXPORT constraint_handler_t set_mem_constraint_handler_s | ( | constraint_handler_t | handler | ) |
The set_mem_constraint_handler_s function sets the runtime-constraint handler to be handler.
The runtime-constraint handler is the function to be called when a library function detects a runtime-constraint order:
EXPORT constraint_handler_t thrd_set_mem_constraint_handler_s | ( | constraint_handler_t | handler | ) |
The thrd_set_mem_constraint_handler_s function sets the runtime-constraint handler to a thread-local handler.
The thrd_set_mem_constraint_handler_s function behaves the same way as the set_mem_constraint_handler_s function except that it sets the runtime-constraint handler to the handler only for the calling thread and for any threads that are yet to be created by the calling thread. The function has no effect on other threads in the program. The remaining effects of the two functions are identical, as are their return values.
EXPORT 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
*msg | Pointer to the message describing the error. |
*ptr | Pointer to associated data. Can be NULL. |
error | The error code encountered. |
void handle_mem_bos_chk_warn | ( | const char *restrict | func, |
void *restrict | dest, | ||
const rsize_t | dmax, | ||
const size_t | destbos | ||
) |
|
static |
|
static |