From 54325540ea3289fa8aaa017a79c5596a2ee45bad Mon Sep 17 00:00:00 2001 From: Stefan Date: Wed, 19 Feb 2025 18:18:41 +0100 Subject: [PATCH 1/2] [FIX] add NULL pointer check to xTaskIncrementTick() --- tasks.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/tasks.c b/tasks.c index def843fe6ae..1c53dba79c3 100644 --- a/tasks.c +++ b/tasks.c @@ -4766,6 +4766,11 @@ BaseType_t xTaskIncrementTick( void ) { for( ; ; ) { + /* if the system tick interrupt is started independent from the + * scheduler the first tick increment might occur before the + * the first task is created and therefore pxDelayedTaskList is + * still not set */ + configASSERT( pxDelayedTaskList != NULL ); if( listLIST_IS_EMPTY( pxDelayedTaskList ) != pdFALSE ) { /* The delayed list is empty. Set xNextTaskUnblockTime From 9779830a4adfc86cbe15f39706f218a305a40c9f Mon Sep 17 00:00:00 2001 From: GitHub Action Date: Wed, 19 Feb 2025 20:06:55 +0000 Subject: [PATCH 2/2] Uncrustify: triggered by comment. --- tasks.c | 1 + 1 file changed, 1 insertion(+) diff --git a/tasks.c b/tasks.c index 1c53dba79c3..6b594dd3c25 100644 --- a/tasks.c +++ b/tasks.c @@ -4771,6 +4771,7 @@ BaseType_t xTaskIncrementTick( void ) * the first task is created and therefore pxDelayedTaskList is * still not set */ configASSERT( pxDelayedTaskList != NULL ); + if( listLIST_IS_EMPTY( pxDelayedTaskList ) != pdFALSE ) { /* The delayed list is empty. Set xNextTaskUnblockTime