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-apps.git
The following commit(s) were added to refs/heads/master by this push:
new ed510186f graphics/input: Raise input tool default stack size to 4096.
ed510186f is described below
commit ed510186f27432b11f31953805891c7293bd33ff
Author: liuchan3 <[email protected]>
AuthorDate: Tue Aug 18 15:02:45 2026 +0800
graphics/input: Raise input tool default stack size to 4096.
The input tool task defaulted to DEFAULT_TASK_STACKSIZE (2048). After
TLS and argv, only 1880 bytes remain usable, which is not enough for
the task termination path.
When the task is killed by a signal, the exit path consumes more stack
than the normal path. With CONFIG_SCHED_DUMP_ON_EXIT enabled,
nxtask_exithook() calls nxsched_dumponexit() -> sched_dumpstack() plus
syslog formatting, which takes about 716 bytes on top of the existing
frames. On an ARMv8-M target the stack pointer then crosses PSPLIM,
raising a UsageFault (CFSR STKOF) that escalates to a HardFault.
Coredump analysis measured the peak usage as 1756 of 1880 bytes
(93.4%):
business code (input_main -> open -> inode_search) 448 B
arm_sigdeliver saved context (XCPTCONTEXT_SIZE) 224 B
nxsig_deliver -> _exit -> nxtask_exithook 368 B
sched_dumpstack + syslog formatting 716 B
remaining 124 B
Changing the Kconfig default covers every configuration that enables
GRAPHICS_INPUT_TOOL. Configurations that set the stack size explicitly
are unaffected.
Assisted-by: OpenCode:claude-opus-5-5
Signed-off-by: liuchan3 <[email protected]>
---
graphics/input/Kconfig | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/graphics/input/Kconfig b/graphics/input/Kconfig
index 7cda0c370..ab3114e3c 100644
--- a/graphics/input/Kconfig
+++ b/graphics/input/Kconfig
@@ -48,7 +48,7 @@ if GRAPHICS_INPUT_TOOL
config GRAPHICS_INPUT_TOOL_STACKSIZE
int "input stack size"
- default DEFAULT_TASK_STACKSIZE
+ default 4096
---help---
The size of stack allocated for the input task.