From 64fbeaa0d1b4321cb439923c86993d134fbd3acb Mon Sep 17 00:00:00 2001 From: Sebastian Huber Date: Thu, 6 Oct 2022 08:47:14 +0200 Subject: score: INTERNAL_ERROR_IDLE_THREAD_STACK_TOO_SMALL Ensure that the IDLE storage allocator did allocate a suffiently large area. Update #3835. Update #4524. --- cpukit/score/src/threadcreateidle.c | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'cpukit/score') diff --git a/cpukit/score/src/threadcreateidle.c b/cpukit/score/src/threadcreateidle.c index 04565f910b..cb15d5cc3c 100644 --- a/cpukit/score/src/threadcreateidle.c +++ b/cpukit/score/src/threadcreateidle.c @@ -84,6 +84,10 @@ static void _Thread_Create_idle_for_CPU( &config.stack_size ); + if ( config.stack_size < storage_size ) { + _Internal_error( INTERNAL_ERROR_IDLE_THREAD_STACK_TOO_SMALL ); + } + /* * The entire workspace is zeroed during its initialization. Thus, all * fields not explicitly assigned were explicitly zeroed by -- cgit v1.2.3