summaryrefslogtreecommitdiff
path: root/common_modules/module_manager/utilities/module_binary_to_c_array.c
diff options
context:
space:
mode:
authorFrédéric Desbiens <[email protected]>2026-09-08 16:44:48 -0400
committerGitHub <[email protected]>2026-09-08 16:44:48 -0400
commite99f0d42073c6418881e89ff0d98e9b9f7cee2d3 (patch)
tree29e63587ccaf6c458492f7feec1b219098219650 /common_modules/module_manager/utilities/module_binary_to_c_array.c
parent945f5f5caa7e2ba39a6ff5d90dda60b116c94a49 (diff)
Corrected the module kernel stack size so it no longer overstates the usable stack (#701)
The module manager recorded tx_thread_module_kernel_stack_size as the raw TXM_MODULE_KERNEL_STACK_SIZE constant, but the end of the kernel stack is aligned downwards to an eight-byte boundary while _txm_module_manager_object_allocate only guarantees ULONG alignment. The recorded size could therefore overstate the usable stack by up to seven bytes. The scheduler copies this value into tx_thread_stack_size whenever a user mode module thread enters the kernel, so the overstated value is visible to RTOS-aware debuggers and to anything built on it. The size is now derived from the aligned end minus the start. Also documented that TX_ENABLE_STACK_CHECKING is not supported for module threads. Refs #181 Assisted-by: Copilot (Opus 5) <[email protected]>
Diffstat (limited to 'common_modules/module_manager/utilities/module_binary_to_c_array.c')
0 files changed, 0 insertions, 0 deletions