[rtems commit] samples/minimum: Prevent a stack overflow

Sebastian Huber sebh at rtems.org
Mon Jul 4 06:24:57 UTC 2022


Module:    rtems
Branch:    master
Commit:    da8b234261dadbc09bfdd7fdebf56ca1bab78b02
Changeset: http://git.rtems.org/rtems/commit/?id=da8b234261dadbc09bfdd7fdebf56ca1bab78b02

Author:    Sebastian Huber <sebastian.huber at embedded-brains.de>
Date:      Tue Jun 28 16:21:49 2022 +0200

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(+)

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



More information about the vc mailing list