From da8b234261dadbc09bfdd7fdebf56ca1bab78b02 Mon Sep 17 00:00:00 2001 From: Sebastian Huber Date: Tue, 28 Jun 2022 16:21:49 +0200 Subject: samples/minimum: Prevent a stack overflow Prevent a stack overflow if RTEMS_COVERAGE is enabled. --- testsuites/samples/minimum/init.c | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'testsuites/samples') diff --git a/testsuites/samples/minimum/init.c b/testsuites/samples/minimum/init.c index c988d6d750..347b6ce991 100644 --- a/testsuites/samples/minimum/init.c +++ b/testsuites/samples/minimum/init.c @@ -81,7 +81,12 @@ static void *Init( uintptr_t ignored ) * demonstrates that the user can specify how small of a minimum * stack they want. */ +#ifdef RTEMS_GCOV_COVERAGE +#define CONFIGURE_MINIMUM_TASK_STACK_SIZE \ + (CPU_STACK_MINIMUM_SIZE - CPU_STACK_ALIGNMENT) +#else #define CONFIGURE_MINIMUM_TASK_STACK_SIZE 512 +#endif /* * Keep the interrupt/initialization stack as is. Otherwise, the test may fail -- cgit v1.2.3