From 89a79e8ac0ef2b4cfa77778858d58fa819c8ea3c Mon Sep 17 00:00:00 2001 From: David Sidrane Date: Mon, 27 Jun 2016 15:56:21 -1000 Subject: [PATCH] Double faulting on Idle task with 0 stack --- arch/arm/src/common/up_checkstack.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/arch/arm/src/common/up_checkstack.c b/arch/arm/src/common/up_checkstack.c index 55f89388e3e..cce1a9874a1 100644 --- a/arch/arm/src/common/up_checkstack.c +++ b/arch/arm/src/common/up_checkstack.c @@ -84,6 +84,10 @@ static size_t do_stackcheck(uintptr_t alloc, size_t size) FAR uint32_t *ptr; size_t mark; + if (size == 0) + { + return 0; + } /* Get aligned addresses of the top and bottom of the stack */ #ifdef CONFIG_TLS /* Skip over the TLS data structure at the bottom of the stack */