diff options
Diffstat (limited to 'core/cortex-m0')
-rw-r--r-- | core/cortex-m0/task.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/core/cortex-m0/task.c b/core/cortex-m0/task.c index f63e9824db..315b8d6d16 100644 --- a/core/cortex-m0/task.c +++ b/core/cortex-m0/task.c @@ -231,7 +231,8 @@ task_ __attribute__((noinline)) * __svc_handler(int desched, task_id_t resched) current = current_task; #ifdef CONFIG_DEBUG_STACK_OVERFLOW - if (*current->stack != STACK_UNUSED_VALUE) { + if (*current->stack != STACK_UNUSED_VALUE && + task_enabled(current - tasks)) { panic_printf("\n\nStack overflow in %s task!\n", task_names[current - tasks]); software_panic(PANIC_SW_STACK_OVERFLOW, current - tasks); |