|
| void | k_sys_fatal_error_handler (unsigned int reason, const struct arch_esf *esf) |
| | Fatal error policy handler.
|
| |
| void | check_input (const char *name, const char *input) |
| | check_input
|
| |
| void | print_loop (const char *name) |
| | print_loop
|
| |
| void | alternate_thread (void *p1, void *p2, void *p3) |
| | This thread passes a long string to check_input function.
|
| |
| | K_THREAD_STACK_DEFINE (alt_thread_stack_area,(2048+CONFIG_TEST_EXTRA_STACK_SIZE)) |
| |
| void | test_stackprot (void) |
| | test Stack Protector feature using canary
|
| |
| void | test_create_alt_thread (void) |
| | Test optional mechanism to detect stack overflow.
|
| |
| void | alternate_thread_canary (void *arg1, void *arg2, void *arg3) |
| | This thread checks its canary value against its parent canary.
|
| |
| void | test_canary_value (void) |
| | Test stack canaries behavior.
|
| |
| | ZTEST_SUITE (stackprot, NULL, NULL, NULL, NULL, NULL) |
| |
| void __noinline check_input |
( |
const char * | name, |
|
|
const char * | input ) |
check_input
This function copies the input string to a buffer of 16 characters and prints the name and buffer as a string. If the input string is longer than the buffer, an error condition is detected.
When stack protection feature is enabled (see prj.conf file), the system error handler is invoked and reports a "Stack Check Fail" error. When stack protection feature is not enabled, the system crashes with error like: Trying to execute code outside RAM or ROM.