summaryrefslogtreecommitdiff
path: root/common_modules/module_lib/src/txm_module_object_pointer_get.c
diff options
context:
space:
mode:
authorFrédéric Desbiens <[email protected]>2026-09-10 11:02:42 -0400
committerGitHub <[email protected]>2026-09-10 11:02:42 -0400
commit9ee198a2d67698e6c7db4cbe47374add909766d5 (patch)
treeed69471684345aeb45bbc789d7ec8e101ae293ed /common_modules/module_lib/src/txm_module_object_pointer_get.c
parentd56f96f37f7242df00bc714e6e7ea54285beafb5 (diff)
Made the stack analyze binary search require several consecutive fill words, so unwritten holes in a used stack no longer cause the highest stack pointer to be under-reported (#720)
The binary search in _tx_thread_stack_analyze() accepted a probe location as unused as soon as a single word still held TX_STACK_FILL. A word inside an otherwise used region that simply was never written - the padding of a partially initialized local array, for example - therefore made the search move away from the real boundary and report far less stack usage than the thread had actually consumed, which in turn kept the stack guard from firing. The probe now walks down from the candidate location and requires TX_THREAD_STACK_ANALYZE_FILL_WORDS consecutive fill words before it treats the location as unused, stopping early at the lowest location already known to hold the fill pattern. The new macro defaults to eight words and can be overridden in tx_port.h; setting it to one restores the previous behavior. Holes shorter than the configured run no longer mislead the search, and the result is unchanged for stacks that contain no such holes. Assisted-by: Copilot (Opus 5) <[email protected]>
Diffstat (limited to 'common_modules/module_lib/src/txm_module_object_pointer_get.c')
0 files changed, 0 insertions, 0 deletions