[PATCH 11/12] samples/minimum: Prevent a stack overflow

Sebastian Huber sebastian.huber at embedded-brains.de
Wed Jun 29 06:30:47 UTC 2022


Prevent a stack overflow if RTEMS_COVERAGE is enabled.
---
 testsuites/samples/minimum/init.c | 5 +++++
 1 file changed, 5 insertions(+)

diff --git a/testsuites/samples/minimum/init.c b/testsuites/samples/minimum/init.c
index c988d6d750..4238c47659 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_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
-- 
2.35.3



More information about the devel mailing list