This is an automated email from the ASF dual-hosted git repository. xiaoxiang781216 pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/nuttx.git
commit a0289488e997cb004e581c6a8b879a3d8895d6ca Author: yangao1 <[email protected]> AuthorDate: Thu Nov 27 21:08:36 2025 +0800 assert.c:use 'top' as the postion of the stack for printing dump_end only stood in for top in dump_stackinfo(). Clamp top itself to CONFIG_ARCH_STACKDUMP_MAX_LENGTH and drop the extra variable. No functional change. Signed-off-by: yangao1 <[email protected]> --- sched/misc/assert.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/sched/misc/assert.c b/sched/misc/assert.c index b4818b24274..893eed295bd 100644 --- a/sched/misc/assert.c +++ b/sched/misc/assert.c @@ -226,7 +226,6 @@ static void dump_stackinfo(FAR const char *tag, uintptr_t sp, if (sp != 0) { uintptr_t top = base + size; - uintptr_t dump_end = top; _emerg(" sp: %p\n", (FAR void *)sp); @@ -240,11 +239,11 @@ static void dump_stackinfo(FAR const char *tag, uintptr_t sp, #if CONFIG_ARCH_STACKDUMP_MAX_LENGTH > 0 if (top - sp > CONFIG_ARCH_STACKDUMP_MAX_LENGTH) { - dump_end = sp + CONFIG_ARCH_STACKDUMP_MAX_LENGTH; + top = sp + CONFIG_ARCH_STACKDUMP_MAX_LENGTH; } #endif - stack_dump(sp, dump_end); + stack_dump(sp, top); } else {
