summaryrefslogtreecommitdiff
path: root/common_modules/module_manager
diff options
context:
space:
mode:
authorFrédéric Desbiens <[email protected]>2026-09-15 16:24:35 -0400
committerGitHub <[email protected]>2026-09-15 16:24:35 -0400
commit1d4a4aeec84832f74b11c300cd53d980dd5980b8 (patch)
tree7e51c6278e6cf4e2471fbb38f8a0be2b0709aa74 /common_modules/module_manager
parent5d235a534c8969cc5ed50bfd492806b5b6993a3b (diff)
Guarded _tx_thread_stack_analyze against inverted stack pointers (#727)
Fixes #460 `TX_ULONG_POINTER_DIF` casts the pointer difference to `ULONG`, so when `tx_thread_stack_highest_ptr` sits below `tx_thread_stack_start` the midpoint wraps to a huge value, the probe lands outside the stack, and the search never converges: the caller hangs or faults. `_tx_thread_stack_analyze` now requires the highest pointer to be strictly above the start of the stack, and bounds the final scan by it. #464 covered the `TX_THREAD_STACK_CHECK` path; this covers direct callers too, as @billlamiework suggested on the issue. Inconsistent pointers still mean a real overflow or a corrupted control block, which remains the application's problem. What changes is that ThreadX reports it through the stack error handler instead of hanging. New cases for an inverted and an equal pointer pair crash the suite without the fix and pass with it. Assisted-by: Copilot (Opus 5) <[email protected]>
Diffstat (limited to 'common_modules/module_manager')
0 files changed, 0 insertions, 0 deletions