From 7794dc8821026a6249ef098f041483c74266ef7b Mon Sep 17 00:00:00 2001 From: Xiang Xiao Date: Sun, 9 Feb 2020 20:12:51 +0800 Subject: [PATCH] arch/sim: Set idle thread stack size to zero To avoid ps generate "Segmentation fault" because do_stackcheck check the stack color if the stack size doesn't equal zero BTW, it is better to set idle task stack size to zero since idle task use the host thread and the stack size from config isn't the actual value. --- arch/sim/src/sim/up_cpuidlestack.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/arch/sim/src/sim/up_cpuidlestack.c b/arch/sim/src/sim/up_cpuidlestack.c index 04aed42f6b..d7e374662c 100644 --- a/arch/sim/src/sim/up_cpuidlestack.c +++ b/arch/sim/src/sim/up_cpuidlestack.c @@ -99,7 +99,7 @@ int up_cpu_idlestack(int cpu, FAR struct tcb_s *tcb, size_t stack_size) { /* REVISIT: I don't think anything is needed here */ - tcb->adj_stack_size = stack_size; + tcb->adj_stack_size = 0; tcb->stack_alloc_ptr = NULL; tcb->adj_stack_ptr = NULL; return OK;