[rtems commit] bsps: Fix bsp_fatal_extension()

Sebastian Huber sebh at rtems.org
Fri Jul 23 14:01:51 UTC 2021


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

Author:    Sebastian Huber <sebastian.huber at embedded-brains.de>
Date:      Fri Jul 23 16:00:10 2021 +0200

bsps: Fix bsp_fatal_extension()

The heap protection is conditional.

---

 bsps/shared/start/bspfatal-default.c | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/bsps/shared/start/bspfatal-default.c b/bsps/shared/start/bspfatal-default.c
index 84ca7e5..a600986 100644
--- a/bsps/shared/start/bspfatal-default.c
+++ b/bsps/shared/start/bspfatal-default.c
@@ -11,6 +11,7 @@
 #include <bsp/bootcard.h>
 #include <rtems/bspIo.h>
 #include <rtems/version.h>
+#include <rtems/score/heap.h>
 #include <rtems/score/threadimpl.h>
 #include <inttypes.h>
 
@@ -74,6 +75,7 @@ void bsp_fatal_extension(
         (uintmax_t) code,
         rtems_internal_error_text( code )
       );
+    #if defined(HEAP_PROTECTION)
     } else if ( source == RTEMS_FATAL_SOURCE_HEAP ) {
       Heap_Error_context *error_context = (Heap_Error_context*) code;
       const char* reasons[] = {
@@ -108,6 +110,7 @@ void bsp_fatal_extension(
         );
         printk( "\n" );
       }
+    #endif
     } else if ( source != RTEMS_FATAL_SOURCE_EXIT || code != 0 ) {
       printk(
         "%s code: %ju (0x%08jx)\n",



More information about the vc mailing list